Skip to content
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
wants to merge 50 commits into
base: master
Choose a base branch
from

Commits on Nov 7, 2024

  1. [bazel] Add new rules to describe hardware IP and tops

    Those rules are essentially glorified filegroups that keep track
    of the various types of files that make up an IP/top: hsjon, RTL
    and doc. Finer-grained groups could be added in the future, e.g.
    distinguish DV from RTL, add testplans, etc
    
    Signed-off-by: Amaury Pouly <[email protected]>
    pamaury committed Nov 7, 2024
    Configuration menu
    Copy the full SHA
    47a35d5 View commit details
    Browse the repository at this point in the history
  2. [bazel,top_earlgrey] Use new rules to describe the top

    Use an empty list of IPs for now. The IP rewriting script
    expects to find this field to add IPs to the list.
    
    Signed-off-by: Amaury Pouly <[email protected]>
    pamaury committed Nov 7, 2024
    Configuration menu
    Copy the full SHA
    60839ea View commit details
    Browse the repository at this point in the history
  3. [bazel,autogen] Create new rule to generate C/rust headers from top

    The new rule takes an input a target created by opentitan_top
    and will eventually replace the old one that directly used an
    hjson file.
    
    Signed-off-by: Amaury Pouly <[email protected]>
    pamaury committed Nov 7, 2024
    Configuration menu
    Copy the full SHA
    862078c View commit details
    Browse the repository at this point in the history
  4. [bazel,top] Create a new //hw/top package

    This package will eventually contain top-related artefacts derived
    from the top description: headers, linker files, multi-top, etc
    Currently, it only contains a single item //hw/top:top that points
    to //hw/top_earlgrey:top_earlgrey
    
    Signed-off-by: Amaury Pouly <[email protected]>
    pamaury committed Nov 7, 2024
    Configuration menu
    Copy the full SHA
    7e1bf26 View commit details
    Browse the repository at this point in the history
  5. [bazel,top] Add generated C/rust rules for all IP

    For now the list of IPs is empty but the infrastructure is there.
    The IP rewrite except a list of IPs to add new ones.
    
    Signed-off-by: Amaury Pouly <[email protected]>
    pamaury committed Nov 7, 2024
    Configuration menu
    Copy the full SHA
    c9c15af View commit details
    Browse the repository at this point in the history
  6. [otp_ctrl] Export file from BUILD file

    This file should be exported because it is used in rules/otp.bzl
    The only reason why it worked because is that the "all_files"
    filegroup in otp_ctrl/data captures that files
    
    Signed-off-by: Amaury Pouly <[email protected]>
    pamaury committed Nov 7, 2024
    Configuration menu
    Copy the full SHA
    c108390 View commit details
    Browse the repository at this point in the history
  7. [sw/device] Remove explicit path to register header files

    Register headers always the use "<name>.h" include path to avoid
    depending on where the rule that creates them is located at. For
    some reason, some files were using an explicit path.
    
    Signed-off-by: Amaury Pouly <[email protected]>
    pamaury committed Nov 7, 2024
    Configuration menu
    Copy the full SHA
    0c9dd78 View commit details
    Browse the repository at this point in the history
  8. [mbx] Fix unittest

    Signed-off-by: Amaury Pouly <[email protected]>
    pamaury committed Nov 7, 2024
    Configuration menu
    Copy the full SHA
    c1489b4 View commit details
    Browse the repository at this point in the history
  9. [bazel,flash_ctrl] Use new rules to describe IP

    Update template, replace all old targets with the new ones,
    regenerate top.
    
    Signed-off-by: Amaury Pouly <[email protected]>
    pamaury committed Nov 7, 2024
    Configuration menu
    Copy the full SHA
    c719089 View commit details
    Browse the repository at this point in the history
  10. [bazel,clkmgr] Use new rules to describe IP

    Update template, replace all old targets with the new ones,
    regenerate top.
    
    Signed-off-by: Amaury Pouly <[email protected]>
    pamaury committed Nov 7, 2024
    Configuration menu
    Copy the full SHA
    7ea76db View commit details
    Browse the repository at this point in the history
  11. [bazel,rstmgr] Use new rules to describe IP

    Update template, replace all old targets with the new ones,
    regenerate top.
    
    Signed-off-by: Amaury Pouly <[email protected]>
    pamaury committed Nov 7, 2024
    Configuration menu
    Copy the full SHA
    2a151f1 View commit details
    Browse the repository at this point in the history
  12. [bazel,pwrmgr] Use new rules to describe IP

    Update template, replace all old targets with the new ones,
    regenerate top.
    
    Signed-off-by: Amaury Pouly <[email protected]>
    pamaury committed Nov 7, 2024
    Configuration menu
    Copy the full SHA
    3ca1bc9 View commit details
    Browse the repository at this point in the history
  13. [bazel,rv_plic] Use new rules to describe IP

    Update template, replace all old targets with the new ones,
    regenerate top.
    
    Signed-off-by: Amaury Pouly <[email protected]>
    pamaury committed Nov 7, 2024
    Configuration menu
    Copy the full SHA
    5282746 View commit details
    Browse the repository at this point in the history
  14. [bazel,alert_handler] Use new rules to describe IP

    Update template, replace all old targets with the new ones,
    regenerate top.
    
    Signed-off-by: Amaury Pouly <[email protected]>
    pamaury committed Nov 7, 2024
    Configuration menu
    Copy the full SHA
    ec80a17 View commit details
    Browse the repository at this point in the history
  15. [bazel,pinmux] Use new rules to describe IP

    Replace old targets with the new ones.
    
    Signed-off-by: Amaury Pouly <[email protected]>
    pamaury committed Nov 7, 2024
    Configuration menu
    Copy the full SHA
    03069a7 View commit details
    Browse the repository at this point in the history
  16. [util] Add script to convert IPs to the new rules

    Signed-off-by: Amaury Pouly <[email protected]>
    pamaury committed Nov 7, 2024
    Configuration menu
    Copy the full SHA
    a6b2051 View commit details
    Browse the repository at this point in the history
  17. [bazel,adc_ctrl] Use new rules to describe IP

    This commit was generated by running
    /home/pamaury/project/opentitan/util/rewrite_hw.py -v -g --root /home/pamaury/project/opentitan --hjson hw/ip/adc_ctrl/data/adc_ctrl.hjson --top hw/top_earlgrey hw/ip/adc_ctrl
    
    Signed-off-by: Amaury Pouly <[email protected]>
    pamaury committed Nov 7, 2024
    Configuration menu
    Copy the full SHA
    883358f View commit details
    Browse the repository at this point in the history
  18. [bazel,aes] Use new rules to describe IP

    This commit was generated by running
    /home/pamaury/project/opentitan/util/rewrite_hw.py -v -g --root /home/pamaury/project/opentitan --hjson hw/ip/aes/data/aes.hjson --top hw/top_earlgrey hw/ip/aes
    
    Signed-off-by: Amaury Pouly <[email protected]>
    pamaury committed Nov 7, 2024
    Configuration menu
    Copy the full SHA
    f88bb95 View commit details
    Browse the repository at this point in the history
  19. [bazel,aon_timer] Use new rules to describe IP

    This commit was generated by running
    /home/pamaury/project/opentitan/util/rewrite_hw.py -v -g --root /home/pamaury/project/opentitan --hjson hw/ip/aon_timer/data/aon_timer.hjson --top hw/top_earlgrey hw/ip/aon_timer
    
    Signed-off-by: Amaury Pouly <[email protected]>
    pamaury committed Nov 7, 2024
    Configuration menu
    Copy the full SHA
    f882ea4 View commit details
    Browse the repository at this point in the history
  20. [bazel,csrng] Use new rules to describe IP

    This commit was generated by running
    /home/pamaury/project/opentitan/util/rewrite_hw.py -v -g --root /home/pamaury/project/opentitan --hjson hw/ip/csrng/data/csrng.hjson --top hw/top_earlgrey hw/ip/csrng
    
    Signed-off-by: Amaury Pouly <[email protected]>
    pamaury committed Nov 7, 2024
    Configuration menu
    Copy the full SHA
    19d69b7 View commit details
    Browse the repository at this point in the history
  21. [bazel,edn] Use new rules to describe IP

    This commit was generated by running
    /home/pamaury/project/opentitan/util/rewrite_hw.py -v -g --root /home/pamaury/project/opentitan --hjson hw/ip/edn/data/edn.hjson --top hw/top_earlgrey hw/ip/edn
    
    Signed-off-by: Amaury Pouly <[email protected]>
    pamaury committed Nov 7, 2024
    Configuration menu
    Copy the full SHA
    4d2b64c View commit details
    Browse the repository at this point in the history
  22. [bazel,entropy_src] Use new rules to describe IP

    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]>
    pamaury committed Nov 7, 2024
    Configuration menu
    Copy the full SHA
    0388954 View commit details
    Browse the repository at this point in the history
  23. [bazel,gpio] Use new rules to describe IP

    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]>
    pamaury committed Nov 7, 2024
    Configuration menu
    Copy the full SHA
    23d1772 View commit details
    Browse the repository at this point in the history
  24. [bazel,hmac] Use new rules to describe IP

    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]>
    pamaury committed Nov 7, 2024
    Configuration menu
    Copy the full SHA
    64965e6 View commit details
    Browse the repository at this point in the history
  25. [bazel,i2c] Use new rules to describe IP

    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]>
    pamaury committed Nov 7, 2024
    Configuration menu
    Copy the full SHA
    ea57f11 View commit details
    Browse the repository at this point in the history
  26. [bazel,keymgr] Use new rules to describe IP

    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]>
    pamaury committed Nov 7, 2024
    Configuration menu
    Copy the full SHA
    25cc115 View commit details
    Browse the repository at this point in the history
  27. [bazel,kmac] Use new rules to describe IP

    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]>
    pamaury committed Nov 7, 2024
    Configuration menu
    Copy the full SHA
    2c2b1b5 View commit details
    Browse the repository at this point in the history
  28. [bazel,lc_ctrl] Use new rules to describe IP

    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]>
    pamaury committed Nov 7, 2024
    Configuration menu
    Copy the full SHA
    55c039b View commit details
    Browse the repository at this point in the history
  29. [bazel,otbn] Use new rules to describe IP

    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]>
    pamaury committed Nov 7, 2024
    Configuration menu
    Copy the full SHA
    3ec494d View commit details
    Browse the repository at this point in the history
  30. [bazel,otp_ctrl] Use new rules to describe IP

    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]>
    pamaury committed Nov 7, 2024
    Configuration menu
    Copy the full SHA
    6ae031b View commit details
    Browse the repository at this point in the history
  31. [bazel,pattgen] Use new rules to describe IP

    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]>
    pamaury committed Nov 7, 2024
    Configuration menu
    Copy the full SHA
    8c13437 View commit details
    Browse the repository at this point in the history
  32. [bazel,prim] Use new rules to describe IP

    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]>
    pamaury committed Nov 7, 2024
    Configuration menu
    Copy the full SHA
    36d6687 View commit details
    Browse the repository at this point in the history
  33. [bazel,pwm] Use new rules to describe IP

    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]>
    pamaury committed Nov 7, 2024
    Configuration menu
    Copy the full SHA
    d4210ea View commit details
    Browse the repository at this point in the history
  34. [bazel,rom_ctrl] Use new rules to describe IP

    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]>
    pamaury committed Nov 7, 2024
    Configuration menu
    Copy the full SHA
    cec4265 View commit details
    Browse the repository at this point in the history
  35. [bazel,rv_core_ibex] Use new rules to describe IP

    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]>
    pamaury committed Nov 7, 2024
    Configuration menu
    Copy the full SHA
    7961de6 View commit details
    Browse the repository at this point in the history
  36. [bazel,rv_dm] Use new rules to describe IP

    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]>
    pamaury committed Nov 7, 2024
    Configuration menu
    Copy the full SHA
    5f70de7 View commit details
    Browse the repository at this point in the history
  37. [bazel,rv_timer] Use new rules to describe IP

    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]>
    pamaury committed Nov 7, 2024
    Configuration menu
    Copy the full SHA
    252e2ad View commit details
    Browse the repository at this point in the history
  38. [bazel,spi_device] Use new rules to describe IP

    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]>
    pamaury committed Nov 7, 2024
    Configuration menu
    Copy the full SHA
    7e84951 View commit details
    Browse the repository at this point in the history
  39. [bazel,spi_host] Use new rules to describe IP

    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]>
    pamaury committed Nov 7, 2024
    Configuration menu
    Copy the full SHA
    7166597 View commit details
    Browse the repository at this point in the history
  40. [bazel,sram_ctrl] Use new rules to describe IP

    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]>
    pamaury committed Nov 7, 2024
    Configuration menu
    Copy the full SHA
    25e4d4f View commit details
    Browse the repository at this point in the history
  41. [bazel,sysrst_ctrl] Use new rules to describe IP

    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]>
    pamaury committed Nov 7, 2024
    Configuration menu
    Copy the full SHA
    89bcf29 View commit details
    Browse the repository at this point in the history
  42. [bazel,tlul] Use new rules to describe IP

    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]>
    pamaury committed Nov 7, 2024
    Configuration menu
    Copy the full SHA
    a83f7c9 View commit details
    Browse the repository at this point in the history
  43. [bazel,uart] Use new rules to describe IP

    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]>
    pamaury committed Nov 7, 2024
    Configuration menu
    Copy the full SHA
    f4c481d View commit details
    Browse the repository at this point in the history
  44. [bazel,usbdev] Use new rules to describe IP

    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]>
    pamaury committed Nov 7, 2024
    Configuration menu
    Copy the full SHA
    f6343da View commit details
    Browse the repository at this point in the history
  45. [bazel,ast] Use new rules to describe IP

    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]>
    pamaury committed Nov 7, 2024
    Configuration menu
    Copy the full SHA
    6c42e11 View commit details
    Browse the repository at this point in the history
  46. [bazel,sensor_ctrl] Use new rules to describe IP

    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]>
    pamaury committed Nov 7, 2024
    Configuration menu
    Copy the full SHA
    46aa763 View commit details
    Browse the repository at this point in the history
  47. [bazel,xbar] Use new rules to describe IP

    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]>
    pamaury committed Nov 7, 2024
    Configuration menu
    Copy the full SHA
    ac87a5b View commit details
    Browse the repository at this point in the history
  48. [bazel,xbar_main] Use new rules to describe IP

    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]>
    pamaury committed Nov 7, 2024
    Configuration menu
    Copy the full SHA
    e90de56 View commit details
    Browse the repository at this point in the history
  49. [bazel,xbar_peri] Use new rules to describe IP

    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]>
    pamaury committed Nov 7, 2024
    Configuration menu
    Copy the full SHA
    04cadf9 View commit details
    Browse the repository at this point in the history
  50. [bazel] Rework HW files targets

    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]>
    pamaury committed Nov 7, 2024
    Configuration menu
    Copy the full SHA
    09ae04c View commit details
    Browse the repository at this point in the history