Skip to content

Import opentitanlib from upstream opentitan#333

Merged
cfrantz merged 5 commits into
OpenPRoT:earlgrey-hwefrom
cfrantz:otlib-import
Jul 9, 2026
Merged

Import opentitanlib from upstream opentitan#333
cfrantz merged 5 commits into
OpenPRoT:earlgrey-hwefrom
cfrantz:otlib-import

Conversation

@cfrantz

@cfrantz cfrantz commented Jul 6, 2026

Copy link
Copy Markdown
Collaborator

Allow importing opentitanlib from the master branch of upstream opentitan.

  • To enable more complex DUT testing, import opentitanlib from upstream. This enables writing host based test harnesses that have more complex interactions with the DUT than can scripted with opentitantool. The upstream opentitan patch is complex and under review; temporarily point to my fork of opentitan.
  • Refactor our opentitan_test rule to support test environments. A test environment is a bazel provider that references resources needed by a particular testing platform (e.g. fpga board, silicon, etc).
  • Update existing tests to specify their environment.

See target/earlgrey/env/README.md for details about test environments.

@cfrantz
cfrantz force-pushed the otlib-import branch 7 times, most recently from 9d1411b to 70428ec Compare July 8, 2026 03:06
Comment thread target/earlgrey/env/README.md Outdated
Comment thread target/earlgrey/env/README.md
Comment thread third_party/rules_rust/default_edition.patch
cfrantz added 5 commits July 9, 2026 14:08
Integrates lowrisc_opentitan as a local path dependency and applies
patches to rules_rust, rules_rust_bindgen, and toolchains_llvm to
support Rust 2024 and allow sub-module LLVM toolchain usage.

TAG=agy
CONV=6581f846-3452-4ca4-b0d0-1eaa6c5c5aa3
Adds the //third_party/lowrisc_opentitan package with transitioned
targets (opentitantool, opentitanlib) to configure preferred build
features (disable OpenSSL, enable only chipwhisperer/hyperdebug/verilator
transports).

TAG=agy
CONV=6581f846-3452-4ca4-b0d0-1eaa6c5c5aa3
This eliminates the `opentitan_runner.py` wrapper script and generates
orchestration bash scripts directly in Starlark.

- FPGA and Silicon targets are executed in two stages: board setup (via
  opentitantool) followed by the test command/harness.
- Verilator targets use a single opentitantool invocation.
- Supports custom `test_cmd` and `test_harness` attributes.
- Uses opentitantool from //third_party/lowrisc_opentitan.

TAG=agy
CONV=6581f846-3452-4ca4-b0d0-1eaa6c5c5aa3
Signed-off-by: Chris Frantz <cfrantz@google.com>
Signed-off-by: Chris Frantz <cfrantz@google.com>
@cfrantz
cfrantz merged commit e6a8bc5 into OpenPRoT:earlgrey-hwe Jul 9, 2026
8 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants