yodalee / rsa256

An RSA 256 bits hardware implementation with verification
Other
6 stars 1 forks source link

Use struct in systemverilog implementation #77

Closed yodalee closed 1 year ago

yodalee commented 1 year ago

Using struct basically make testbench implementation easier. The write_verilator_port becomes identical:

write_verilator_port(dut_wrapper.dut->in, verilog::pack(in));
yodalee commented 1 year ago

For record, this change will cause the dumped waveform more difficult to debug. The input/output data will become a long bits array, and difficult to distinguish real content. This issue can be mitigated by extract the struct to set of registers in the module.

johnjohnlin commented 1 year ago

looks good