Add dedicated port type to harness design.json

Signed-off-by: Andrew Butt <butta@seas.upenn.edu>
This commit is contained in:
Andrew Butt 2020-06-30 19:42:25 -04:00
parent 9749d6d51f
commit 30f35f97bd
1 changed files with 9 additions and 0 deletions

View File

@ -46,6 +46,15 @@ def main():
design_json['info'] = {}
with open(args.design_txt) as f:
for d in csv.DictReader(f, delimiter=' '):
if d['name'].startswith('dout['):
d['type'] = 'out'
elif d['name'].startswith('din['):
d['type'] = 'in'
elif d['name'].startswith('clk'):
d['type'] = 'clk'
else:
assert False, d
design_json['ports'].append(d)
with open(args.design_info_txt) as f: