This repo provides examples of how to use structures in IEEE 1800 SystemVerilog.
typedef struct packed {
logic sign;
logic [7:0] biased_exponent;
logic [22:0] mantissa;
} float_t;
# OSS-CAD-Suite and Zachjs-sv2v
wget -O - https://raw.githubusercontent.com/sifferman/hdl-tool-installer/main/install | bash -s -- <build_dir> --oss-cad-suite --zachjs-sv2v
- netlistsvg: https://github.com/nturley/netlistsvg
- Vivado: https://www.xilinx.com/support/download.html
cd cache_example
make
cd float_example
make
cd testbench_example
make
https://ieeexplore.ieee.org/document/8299595
- 5.10 Structure literals
- 6.22.2 Equivalent types
- 7.2 Structures
- 7.2.1 Packed structures
- 7.4.1 Packed arrays
- 10.9 Assignment patterns
- 11.4.12 Concatenation operators
- 13.4.1 Return values and void functions
- 23.2.2 Port declarations
- 23.7 Member selects and hierarchical names
- https://github.com/openhwgroup/cva6/blob/b143be15/core/frontend/bht.sv#L46-L51
- https://github.com/lowRISC/ibex/blob/bac72d96/rtl/ibex_cs_registers.sv#L163-L205
- Examples of bit-select macros
- Sutherland, S. (2017). RTL Modeling with SystemVerilog For Simulation and Synthesis. Section 4.5, pg.124