A hardware component library developed with ROHD.
A hardware component library developed with ROHD. This library aims to collect a set of reusable, configurable components t//hat can be leveraged in other designs. These components are also intended as good examples of ROHD hardware implementations.
Check out the generator web app, which lets you explore some of the available components, configure them, and generate SystemVerilog.
The public library can be compiled to WebAssembly. A browser smoke test covers component simulation, typed interfaces, and SystemVerilog generation:
dart test -p chrome -c dart2wasm test/wasm_compatibility_test.dart
Individual APIs and tests that require native tools or file access may still require the Dart VM.
This project is always improving and growing! In a given category, initial
components are primarily focused on correctness with room for optimization from
there. Please feel free to contribute or provide feedback. Check out
CONTRIBUTING
for details on how to contribute.
This project is not intended to be the only place for reusable hardware components developed in ROHD. It's not even intended to be the only library. Contributions are welcomed to this library, but developers are also welcome to build independent packages or libraries, even if they may overlap.
Modules so that they are convertible to
SystemVerilogextensions to other classes to make component usage easier, when
appropriateChoose a family by the job it does in a design. The guides explain how to
select and compose related components; the component index
has direct links to individual components and their contracts. Family names
below link to source barrels, but applications should import
package:rohd_hcl/rohd_hcl.dart.
| Family | Contents | Guides |
|---|---|---|
| Arithmetic | Accumulation, addition, multiplication, division and roots, rounding, normalization, and numeric conversion | Arithmetic primitives, fixed point, floating point |
| Binary math | Binary transforms, finite fields, recurrences, LFSRs, signatures, and PRBS | Binary math |
| Bit operations | Bit and pattern search, population counts, selection, multiplexing, shifting, and bit manipulation | Bit operations |
| Clocking | Clock and toggle gating, clock enables, event detection, and clock-domain crossing | Clocking overview |
| Dataflow | Sorting, selection, reduction, lane layout, framing, and serialization | Dataflow pipelines, layout and framing, serialization |
| Encodings | Gray, one-hot, thermometer, and priority encoding | Encoding overview |
| Error control | Parity, Hamming/Hsiao protection, BCH, Reed-Solomon, CRC, and LDPC decoding and soft-read retry | Error-control selection and composition |
| Flow control | Arbitration, FIFO storage, elastic buffering, routing, credit accounting, tagged scheduling and retirement, and recovery | Ready/valid, credit transport, tagged flow, protocol composition |
| Inference | Fixed-point attention, tensor movement, storage, layout conversion, and pooling windows | Inference building blocks |
| Interfaces | AMBA interfaces, including AXI4/AXI5, AXI-Lite, ACE, AXI-Stream, LTI, and APB, plus SPI interfaces and endpoints | Standard interfaces, AMBA bus families and revisions |
| [Memory](lib/src/memory/ |
CSRs create a lot of modules
https://github.com/intel/rohd-hcl/issues/291
Labels: enhancement
Wishbone Interconnect
https://github.com/intel/rohd-hcl/issues/269
Labels: enhancement
Update Fifo to leverage summation components
https://github.com/intel/rohd-hcl/issues/267
Labels: enhancement, good first issue
Thank you for considering contributing to the ROHD Hardware Component Library (ROHD-HCL)! Contributions from the community are vital to making this a successful project.
Anyone interested in participating in ROHD-HCL is more than welcome to help!
Check out the component list to see what's already implemented and where there's more work to do.
ROHD-HCL adopts the Contributor Covenant v2.1 for the code of conduct. Read the ROHD-HCL Code of Conduct.
Discord is a free online instant messaging app which you can use directly in your web browser or install to your device. Feel free to join to look around at the conversations and have a real-time discussion with the ROHD community. This a great place to ask questions, get help, engage with the rest of the community, and discuss new ideas.
Join the Discord server here: https://discord.com/invite/jubxF84yGw
GitHub Discussions is a place where you can find announcements, ask questions, share ideas, show new things you're working on, or just discuss in general with the community! If you have a question or need some help, this is a great place to go.
You can access the discussions area here: https://github.com/intel/rohd-hcl/discussions
If something doesn't seem right, you're stuck, there's a critical feature/enhancement missing, you find a bug, etc. then filing an issue on the GitHub repository is a great option. Please try to provide as much detail as possible. Complete, stand-alone reproduction instructions are extremely helpful for bugs!
You can file an issue here: https://github.com/intel/rohd-hcl/issues/new/choose
Stack Overflow is a great tool to ask questions
and get answers from the community. Use the rohd and/or rohd-hcl tag when
asking your question so that others in the community who subscribe to that tag
can find and answer your question more quickly!
The ROHD Forum is a periodic virtual meeting for developers and users of ROHD that anyone can join. Feel free to join the call!
You must have Flutter installed
to develop ROHD-HCL. Flutter provides the Dart SDK and is required because the
pub workspace contains both the Dart rohd_hcl package and the Flutter
confapp package.
The root test suite uses Icarus Verilog. Verilator and SystemC checks are optional locally and skip when their toolchains are unavailable. On Ubuntu, install the native dependencies for full coverage with:
sudo apt-get update
sudo apt-get install -y iverilog verilator g++ libsystemc-dev ccache
CI and the development-container setup install these dependencies. Set
ROHD_REQUIRE_VERILATOR=1 and ROHD_REQUIRE_SYSTEMC=1 to require both optional
backends, as CI does. A failure compiling or running a generated design with
an available tool is still a test failure.
Compiling for the native backends is most of what their tests cost, so use
the helpers that share that work rather than calling the tools directly.
checkVerilatorVector in test/verilator_test_utils.dart builds the model
without C++ optimization and, when ccache is installed, reuses compiled
objects: Verilator's runtime is the same for every design and is most of
building a small one. A test that compiles its own SystemC harness passes
systemCHeaderArguments from test/systemc_test_utils.dart to the compiler,
before the source file, to use a <systemc> header precompiled once under
tmp_test/systemc_pch. The two- and four-state native miter helpers
replay vectors from a table instead of generating C++ statements for every
vector. For large packed Icarus traces, use table-driven replay
with exact X/Z comparisons and independently optional drives and checks.
Run a tool's main in the test rather than starting dart run,
which compiles the tool again each time.
A component stays connected to the signals it was built on. When a loop, or
the tests of a group, build one component after another on the same input
signals, driving those signals simulates every component built so far. Give
each component its own inputs: create them inside the loop, or in setUp.
When only the operands change, build the test circuit once per configuration. Reuse reference calculations across cases where the reference is unchanged, and construct detailed diagnostics only on failure. When combinational variants need identical vectors, a test wrapper can check each variant's outputs in one native invocation per input shape.
Cache behavioral-SystemC hierarchy checks use a three-minute per-test compilation budget, matching the existing CSR checks, rather than the default 30 seconds. Native compiler contention can exceed the default even when simulation is fast. These checks report native generation, compilation, and execution phases on failure; this does not change the global test timeout.
The General workflow runs the full root suite in both Run Host Checks and Run Devcontainer Tests. The jobs can run in parallel on separate runners. The Run Checks gate succeeds only after both pass and still gates deployment.
The Native Backends workflow reports separate SystemC Checks and
Verilator Checks on pull requests, pushes to main, and manual runs.
It selects test files using the SystemC availability guards, an import of the
shared backend comparison helpers (test/memory/backend_miter_utils.dart), or
the Verilator warning-check helper, and runs them with two concurrent suites to limit native
compiler contention. Th