-
Notifications
You must be signed in to change notification settings - Fork 771
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[multitop] New bazel rules to describe HW #24791
Open
pamaury
wants to merge
50
commits into
lowRISC:master
Choose a base branch
from
pamaury:multitop_hw
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
+1,431
−1,543
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pamaury
force-pushed
the
multitop_hw
branch
4 times, most recently
from
October 18, 2024 14:37
aa03af3
to
0148575
Compare
pamaury
force-pushed
the
multitop_hw
branch
9 times, most recently
from
October 29, 2024 13:44
2a0ca50
to
ad3f459
Compare
pamaury
force-pushed
the
multitop_hw
branch
2 times, most recently
from
October 29, 2024 16:22
93278aa
to
352da59
Compare
pamaury
requested review from
a team,
msfschaffner and
vogelpi
as code owners
October 29, 2024 20:18
pamaury
requested review from
engdoreis and
a-will
and removed request for
a team
October 29, 2024 20:18
pamaury
changed the title
[experiment][multitop] New bazel rules to describe HW
[multitop] New bazel rules to describe HW
Oct 30, 2024
This commit was generated by running /home/pamaury/project/opentitan/util/rewrite_hw.py -v -g --root /home/pamaury/project/opentitan --hjson hw/ip/entropy_src/data/entropy_src.hjson --top hw/top_earlgrey hw/ip/entropy_src Signed-off-by: Amaury Pouly <[email protected]>
This commit was generated by running /home/pamaury/project/opentitan/util/rewrite_hw.py -v -g --root /home/pamaury/project/opentitan --hjson hw/ip/gpio/data/gpio.hjson --top hw/top_earlgrey hw/ip/gpio Signed-off-by: Amaury Pouly <[email protected]>
This commit was generated by running /home/pamaury/project/opentitan/util/rewrite_hw.py -v -g --root /home/pamaury/project/opentitan --hjson hw/ip/hmac/data/hmac.hjson --top hw/top_earlgrey hw/ip/hmac Signed-off-by: Amaury Pouly <[email protected]>
This commit was generated by running /home/pamaury/project/opentitan/util/rewrite_hw.py -v -g --root /home/pamaury/project/opentitan --hjson hw/ip/i2c/data/i2c.hjson --top hw/top_earlgrey hw/ip/i2c Signed-off-by: Amaury Pouly <[email protected]>
This commit was generated by running /home/pamaury/project/opentitan/util/rewrite_hw.py -v -g --root /home/pamaury/project/opentitan --hjson hw/ip/keymgr/data/keymgr.hjson --top hw/top_earlgrey hw/ip/keymgr Signed-off-by: Amaury Pouly <[email protected]>
This commit was generated by running /home/pamaury/project/opentitan/util/rewrite_hw.py -v -g --root /home/pamaury/project/opentitan --hjson hw/ip/kmac/data/kmac.hjson --top hw/top_earlgrey hw/ip/kmac Signed-off-by: Amaury Pouly <[email protected]>
This commit was generated by running /home/pamaury/project/opentitan/util/rewrite_hw.py -v -g --root /home/pamaury/project/opentitan --hjson hw/ip/lc_ctrl/data/lc_ctrl.hjson --top hw/top_earlgrey hw/ip/lc_ctrl Signed-off-by: Amaury Pouly <[email protected]>
This commit was generated by running /home/pamaury/project/opentitan/util/rewrite_hw.py -v -g --root /home/pamaury/project/opentitan --hjson hw/ip/otbn/data/otbn.hjson --top hw/top_earlgrey --keep-all-files hw/ip/otbn Signed-off-by: Amaury Pouly <[email protected]>
This commit was generated by running /home/pamaury/project/opentitan/util/rewrite_hw.py -v -g --root /home/pamaury/project/opentitan --hjson hw/ip/otp_ctrl/data/otp_ctrl.hjson --top hw/top_earlgrey hw/ip/otp_ctrl Signed-off-by: Amaury Pouly <[email protected]>
This commit was generated by running /home/pamaury/project/opentitan/util/rewrite_hw.py -v -g --root /home/pamaury/project/opentitan --hjson hw/ip/pattgen/data/pattgen.hjson --top hw/top_earlgrey hw/ip/pattgen Signed-off-by: Amaury Pouly <[email protected]>
This commit was generated by running /home/pamaury/project/opentitan/util/rewrite_hw.py -v -g --root /home/pamaury/project/opentitan --no-regs --top hw/top_earlgrey hw/ip/prim Signed-off-by: Amaury Pouly <[email protected]>
This commit was generated by running /home/pamaury/project/opentitan/util/rewrite_hw.py -v -g --root /home/pamaury/project/opentitan --hjson hw/ip/pwm/data/pwm.hjson --top hw/top_earlgrey hw/ip/pwm Signed-off-by: Amaury Pouly <[email protected]>
This commit was generated by running /home/pamaury/project/opentitan/util/rewrite_hw.py -v -g --root /home/pamaury/project/opentitan --hjson hw/ip/rom_ctrl/data/rom_ctrl.hjson --top hw/top_earlgrey hw/ip/rom_ctrl Signed-off-by: Amaury Pouly <[email protected]>
This commit was generated by running /home/pamaury/project/opentitan/util/rewrite_hw.py -v -g --root /home/pamaury/project/opentitan --hjson hw/ip/rv_core_ibex/data/rv_core_ibex.hjson --top hw/top_earlgrey hw/ip/rv_core_ibex Signed-off-by: Amaury Pouly <[email protected]>
This commit was generated by running /home/pamaury/project/opentitan/util/rewrite_hw.py -v -g --root /home/pamaury/project/opentitan --hjson hw/ip/rv_dm/data/rv_dm.hjson --top hw/top_earlgrey hw/ip/rv_dm Signed-off-by: Amaury Pouly <[email protected]>
This commit was generated by running /home/pamaury/project/opentitan/util/rewrite_hw.py -v -g --root /home/pamaury/project/opentitan --hjson hw/ip/rv_timer/data/rv_timer.hjson --top hw/top_earlgrey hw/ip/rv_timer Signed-off-by: Amaury Pouly <[email protected]>
This commit was generated by running /home/pamaury/project/opentitan/util/rewrite_hw.py -v -g --root /home/pamaury/project/opentitan --hjson hw/ip/spi_device/data/spi_device.hjson --top hw/top_earlgrey hw/ip/spi_device Signed-off-by: Amaury Pouly <[email protected]>
This commit was generated by running /home/pamaury/project/opentitan/util/rewrite_hw.py -v -g --root /home/pamaury/project/opentitan --hjson hw/ip/spi_host/data/spi_host.hjson --top hw/top_earlgrey hw/ip/spi_host Signed-off-by: Amaury Pouly <[email protected]>
This commit was generated by running /home/pamaury/project/opentitan/util/rewrite_hw.py -v -g --root /home/pamaury/project/opentitan --hjson hw/ip/sram_ctrl/data/sram_ctrl.hjson --top hw/top_earlgrey hw/ip/sram_ctrl Signed-off-by: Amaury Pouly <[email protected]>
This commit was generated by running /home/pamaury/project/opentitan/util/rewrite_hw.py -v -g --root /home/pamaury/project/opentitan --hjson hw/ip/sysrst_ctrl/data/sysrst_ctrl.hjson --top hw/top_earlgrey hw/ip/sysrst_ctrl Signed-off-by: Amaury Pouly <[email protected]>
This commit was generated by running /home/pamaury/project/opentitan/util/rewrite_hw.py -v -g --root /home/pamaury/project/opentitan --no-regs --top hw/top_earlgrey hw/ip/tlul Signed-off-by: Amaury Pouly <[email protected]>
This commit was generated by running /home/pamaury/project/opentitan/util/rewrite_hw.py -v -g --root /home/pamaury/project/opentitan --hjson hw/ip/uart/data/uart.hjson --top hw/top_earlgrey hw/ip/uart Signed-off-by: Amaury Pouly <[email protected]>
This commit was generated by running /home/pamaury/project/opentitan/util/rewrite_hw.py -v -g --root /home/pamaury/project/opentitan --hjson hw/ip/usbdev/data/usbdev.hjson --top hw/top_earlgrey hw/ip/usbdev Signed-off-by: Amaury Pouly <[email protected]>
This commit was generated by running /home/pamaury/project/opentitan/util/rewrite_hw.py -v -g --root /home/pamaury/project/opentitan --hjson hw/top_earlgrey/ip/ast/data/ast.hjson --top hw/top_earlgrey hw/top_earlgrey/ip/ast Signed-off-by: Amaury Pouly <[email protected]>
This commit was generated by running /home/pamaury/project/opentitan/util/rewrite_hw.py -v -g --root /home/pamaury/project/opentitan --hjson hw/top_earlgrey/ip/sensor_ctrl/data/sensor_ctrl.hjson --top hw/top_earlgrey hw/top_earlgrey/ip/sensor_ctrl Signed-off-by: Amaury Pouly <[email protected]>
This commit was generated by running /home/pamaury/project/opentitan/util/rewrite_hw.py -v -g --root /home/pamaury/project/opentitan --no-regs --top hw/top_earlgrey hw/top_earlgrey/ip/xbar Signed-off-by: Amaury Pouly <[email protected]>
This commit was generated by running /home/pamaury/project/opentitan/util/rewrite_hw.py -v -g --root /home/pamaury/project/opentitan --no-regs --top hw/top_earlgrey hw/top_earlgrey/ip/xbar_main Signed-off-by: Amaury Pouly <[email protected]>
This commit was generated by running /home/pamaury/project/opentitan/util/rewrite_hw.py -v -g --root /home/pamaury/project/opentitan --no-regs --top hw/top_earlgrey hw/top_earlgrey/ip/xbar_peri Signed-off-by: Amaury Pouly <[email protected]>
This commit switches the HW targets (verilator, bitstream) to use the target create by `opentitan_top`. This allows to remove many of the hacky `all_files` targets used everywhere. This commit does keep a few and even creates some, but tries to adhere to the following convention: only use `glob()` or `all_files` for sub-directories that contain no bazel targets and should be passed "as-is" to fusesoc. Signed-off-by: Amaury Pouly <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The goal of this experiment is to design new rules to better describe the HW and eventually get rid of our current usage of
all_files
targets. The idea is that each IP contains a new target created byopentitan_ip
where the RTL, doc and hjson files are listed. Then, those files targets are collected by anopentitan_top
rule that puts together the entire list of doc, RTL and hjson files. One this is done, we start replace all direct usages of HW files by reference to this new top target where we selectively extra only the files we need. Eventually this should apply to:More is possible, for example we could point to testplans, we could separate RTL from DV, etc
This change will eventually be needed for multi-top because collecting all files as we currently do will not scale.
Finally, this PR contains another change: instead of pointing to //hw/ip/... for headers, we now collect everything in a new package //hw/top. There are several reasons for that:
Since there are many IPs to convert and many files to patch, the approach in this PR is to create a script to automate most of the process. All commits before
[util] Add script to convert...
are manual. The rest is created automatically by the script to convert IPs and uses one by one, except for the last commit is manual.Important remark: this does not duplicate any information that fusesoc has, this is completely orthogonal and only use coarse-grained globs to gather all files.
TODO:
pinmux
: if Ipgen pinmux #24808 is merged before, will need to do a few tweaksnode
attribute of previous C/rust headers to select the default register node, or if we need to generate several headers for some IPs (one per node)TODO in follow-up PRs:
sys.path
to point toutil/
is not great. I couldn't quite get rid ofall_files
due to that.