SystemRDL
different views of presenting hardware:
- Human description (eg look at the hardware reference manual) - outlines functional and architectural specifications in human language
- Schematics (still falls under human description)
- Behavioural code (describe hardware as an algorithm - inputs, outputs and expected behaviour)
- Register description cpde
- RTL code
- Gate-level code
- Transistor-level code
A regiter description code captures:
- The behaviour of the individual register
- The organization of the registers in memory
- the organization of the registers into register files,
Various variety of register functions:
- Simple storage elements
- storage elements with special read/write behavior (e.g., ‘write 1 to clear’)
- interrupts
- counters
SystemRDL is intended for
- RTL generation
- RTL verification
- SystemC generation
- Documentation
- Pass through material for other tools, e.g., debuggers
- Software development
"SystemRDL was created to minimize problems encountered in describing and managing registers" - what does managing
mean?
SystemRDL was meant to provide a single source describing registers. This description will be constant throughout the design, manufacture, testing, abstraction and usage of the piece of hardware.
Process involved in building hardware:
- Human functional and architectural description
- Test/casual Designs (schematics)
- Formalizing (coming up with formal spec views and designs (RTL, GTL, TL, RDL, Headers, PACs, MACs, HALs, ))
- Design Testing/Verification
- Design Implementation/Manufacture
- Post-Testing/Verification
HumanSpec ==> Schematics|Behavioural Code|SystemRDL ==> {RTL, C, Verilog, Rust, Clash, SpinalHDL}
Access Modes
Properties per component
Compiler
- Which versions of SystemRDL does it support?
- Compatibility to future versions?
Examples
// simple explicit/definitive field
field my_custom_field {
};
// simple anonymous field
field {} ;
Needed Tooling
- Conversion to IP-XACT xml
- Automatic documentation
-
Strict SystemRDL {
- makes sure user fills out every component property explicitly (or the intellisense fills things out automatially)
- every instance is explicitly named (no implicit declarations and instantiations)
- address comments are filled automatically (eg reg {} csr; // 0x400 - 0x408)
- no parameter dependence
- no dynamic assignments
- no implicit declarations or instantiations
- No "Arrays may be used as struct members, or in property or parameter declarations.s"
- Where and how is it recommended to define custom properties?
- "Effectively, multi-dimensional arrays are not supported. This limitation may be circumvented by defining arrays of structs containing arrays." - this is not a limitation, design better!
- remove this rule: "When expression is not specified, it is presumed the property_name is of type boolean and the default value
is set to true" - it does not make sense eg
field myField {
rclr; // Bool property assign, set implicitly to true woset = false; // Bool property assign, set explicitly to false name = “my field”; // string property assignment sw = rw; // accesstype property assignment }; ```
- Dont allow this : "swwe and swwel have precedence over the software access property in determining its current access state, e.g., if a field is declared as sw=rw, has a swwe property, and the value is currently false, the effective software access property is sw=r."
}
- Driver generation
- C header generation
- PAC-generator (with Rust style safety)
- Language server (for IDEs)
- VsCode systemRDL support
- Intellisense
- rust-based compiler
- nixos support
Advantages
- "NOTE—Any hardware-writable field is inherently volatile, which is important for verification and test purposes." - this will reduce the number of volatile reads in our PAC, it will allow the compiler to optimize things
- Elaborate reads/write access descriptions :
- description includes both hardware and software access specifications
- descriptions go beyond RW, RO, WOs
- description includes both read and write effects
-
- does not explain register-register effect
-
- does not explain timing costraints
- fddf