aboutsummaryrefslogtreecommitdiffstats
path: root/manual/PRESENTATION_ExAdv/mymul_test.v
blob: 620a06d9e5314b2c0fc6d42c69bfc87274c1fcae (plain)
1
2
3
4
module test(A, B, Y);
    input  [1:0] A, B;
    output [1:0] Y = A * B;
endmodule
t import pprint import click from mitmproxy import tnetstring def read_tnetstring(input): # tnetstring throw a ValueError on EOF, which is hard to catch # because they raise ValueErrors for a couple of other reasons. # Check for EOF to avoid this. if not input.read(1): return None else: input.seek(-1, 1) return tnetstring.load(input) @click.command() @click.argument("input", type=click.File('rb')) def inspect(input): """ pretty-print a dumpfile """ while True: data = read_tnetstring(input) if not data: break pprint(data) if __name__ == "__main__": inspect()