#!/usr/bin/env python3 import struct import sys sv_template = None sv_code = None template_name = sys.argv[1] or 'template.sv' code_name = sys.argv[2] or 'result.sv' try: sv_template = open(template_name, mode='r') sv_code = open(code_name, mode='w') var_name = sv_template.readline().strip() rom_formatted = '' index = 0 for line in iter(lambda: sys.stdin.buffer.read(4), ''): if (not line): break value = format(struct.unpack('