Skip to content

Commit 72c6f2f

Browse files
committed
Update cru_constants_populate for python3
1 parent d5f2227 commit 72c6f2f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Cru/cru_constants_populate.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ def parse_vhdl_hex(vhdl_lines, line):
9898
vhdl_file = open('pack_cru_core.vhd')
9999
vhdl_lines = vhdl_file.readlines()
100100

101-
for (key, value) in roc_regs.iteritems():
101+
for (key, value) in roc_regs.items():
102102
for (i, line) in enumerate(vhdl_lines): #cru-fw regs here
103103
if (re.search("constant " + key + "\s*:", line)): #line has reg info
104104
ret = parse_vhdl_hex(vhdl_lines, line)
@@ -109,7 +109,7 @@ def parse_vhdl_hex(vhdl_lines, line):
109109
cfile = open('Constants.h')
110110
contents = cfile.readlines()
111111

112-
for key,value in to_replace.iteritems():
112+
for key,value in to_replace.items():
113113
for (i, line) in enumerate(contents):
114114
if(re.search("\s+Register\s*" + key, line)):
115115
contents[i] = re.sub("\([^)]*\)", '(' + value + ')', line)

0 commit comments

Comments
 (0)