We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a0a015b commit cf3e351Copy full SHA for cf3e351
util/raclgen/lib.py
@@ -283,13 +283,12 @@ def gen_md(block: IpBlock,
283
module: Dict[str, object],
284
output: TextIO = sys.stdout):
285
286
- if_name = racl_mapping['if_name']
287
- if not if_name or if_name == '':
288
- if_name = 'null'
+ if_name = racl_mapping.get('if_name') or 'null'
289
290
- assert block.reg_blocks
291
- if len(block.reg_blocks) == 1:
292
- assert not if_name or if_name == '' or if_name == 'null'
+ # Look up the requested interface. If there is none (so if_name is 'null'),
+ # this requires there to be exactly one register block.
+ if if_name == 'null':
+ assert len(block.reg_blocks) == 1
293
rb = next(iter(block.reg_blocks.values()))
294
else:
295
rb = block.reg_blocks[if_name]
0 commit comments