mirror of https://github.com/openXC7/prjxray.git
Merge pull request #1383 from andrewb1999/json-add-explicit-type
Add dedicated port type to harness design.json
This commit is contained in:
commit
b0432d14d5
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Reference in New Issue