Skip to content

Commit

Permalink
[tools,topgen] Enhance validate pass
Browse files Browse the repository at this point in the history
Add support for added top config attributes.
Dive deeper into a few attributes.
Left a few TODOs for some attributes, most of these are not
yet populated.

Part of lowRISC#25920

Signed-off-by: Guillermo Maturana <[email protected]>
  • Loading branch information
matutem committed Feb 7, 2025
1 parent 1611c22 commit 530603b
Show file tree
Hide file tree
Showing 3 changed files with 275 additions and 12 deletions.
1 change: 1 addition & 0 deletions util/tlgen/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ clock_srcs | optional | group | Remnant from auto-generation scripts. Ignore.
domain | optional | string | Power domain for the crossbar
reset_connections | added by tool | group | Generated by topgen. Key is the reset signal inside IP and value is the top reset signal
addr_spaces | added by tool | list | Generated by topgen. List of address spaces used across all hosts
inter_signal_list | added by tool | list | Generated by topgen. List of inter signals for this xbar


### Node configuration
Expand Down
7 changes: 6 additions & 1 deletion util/tlgen/validate.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@
'l', "Generated by topgen. List of address spaces used across all "
"hosts"
],
'inter_signal_list': [
'l', "Generated by topgen. List of inter signals for this xbar"
],
}
}

Expand Down Expand Up @@ -148,7 +151,9 @@ def check_keys(obj: Dict[Any, Any],
elif k in control["optional"]:
checker = control["optional"][k]
elif k in control["added"]:
log.warning(prefix + " contains generated key " + k)
# TODO(lowrisc/opentitan#26082) change severity depending on
# user vs. complete config validation
log.info(prefix + " contains generated key " + k)
checker = control["added"][k]
else:
log.warning(prefix + " contains extra key " + k)
Expand Down
Loading

0 comments on commit 530603b

Please sign in to comment.