Hi,
SystemVerilog "package" construct should be especially convenient for storing new structure and union data types.
Use the example code from: https://github.com/jeras/ivtest/tree/test_sv
iverilog -g2009 ivltests/sv_package.v && vvp a.out
or the attached file.
Regards,
Iztok Jeras
example Verilog code
Steve pushed a patch about a month ago that allows this example to run under Icarus.