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

[bazel] Update the binary/test rules for building ROMs #19710

Closed
wants to merge 4 commits into from

Commits on Oct 5, 2023

  1. [bazel] Update the binary/test rules for building ROMs

    1. Add a `kind` attribute to the binary and test rules to indicate
       whether the target is for flash, ram or rom.
    2. Plumb flash scrambling support into the exec_env and binary rules.
    3. Update the `rom` attribute in the exec environments and binary rules.
       Allow the label to be any provider.
    4. Implement flash and rom paths for fpga_cw310 and sim_{dv,verilator}.
    4a. When building, apply the scrambling transform to the ROM binary.
    4b. When testing, retrieve the supplied ROM and substitute it into the
        test flow.  Currently, only verilator can run ROM tests.
    5. Update `sim.mk` to collect the correct file resources for the
       test_rom.
    
    Signed-off-by: Chris Frantz <[email protected]>
    cfrantz committed Oct 5, 2023
    Configuration menu
    Copy the full SHA
    e4b636e View commit details
    Browse the repository at this point in the history
  2. [bazel] Build the test_rom with the new rules

    1. Re-arrange the exec_envs so that there are environments that do not
       depend on the ROM targets.
    2. Convert the test_rom target to use `opentitan_binary`.
    3. Update the `test_rom_test` to use the standard exec_envs.
    4. Add tentative CW340 support (build only - testing not yet supported).
    
    Signed-off-by: Chris Frantz <[email protected]>
    cfrantz committed Oct 5, 2023
    Configuration menu
    Copy the full SHA
    0f3198b View commit details
    Browse the repository at this point in the history
  3. [bazel] Update the rom_epmp_test to the new rules

    Demonstrate how to convert a `test_in_rom` test to the new
    opentitan_test rule.
    
    Signed-off-by: Chris Frantz <[email protected]>
    cfrantz committed Oct 5, 2023
    Configuration menu
    Copy the full SHA
    b2cf961 View commit details
    Browse the repository at this point in the history
  4. [bazel] Build non-scrambled VMEM images

    1. Define a basic CW305 exec_env.The build/release pipeline expects to
       find cw305 artifacts for the test_rom.
    2. The englishbreakfast verilator model does not understand ROM scrambling,
       so we also create a non-scrambled VMEM file.
    
    Signed-off-by: Chris Frantz <[email protected]>
    cfrantz committed Oct 5, 2023
    Configuration menu
    Copy the full SHA
    2161256 View commit details
    Browse the repository at this point in the history