sv2v/test/relong
Zachary Snow 7734fa539d added Reid's new tests 2019-04-23 00:33:27 -04:00
..
README.md updated documentation 2019-04-18 19:33:16 -04:00
alu.sv added hdl-examples tests 2019-03-26 21:32:02 -04:00
alu.v added hdl-examples tests 2019-03-26 21:32:02 -04:00
alu_tb.v added hdl-examples tests 2019-03-26 21:32:02 -04:00
array.sv added hdl-examples tests 2019-03-26 21:32:02 -04:00
array.v use builtin $clog2 in test/relong/array.v 2019-03-27 02:32:11 -04:00
array_tb.v added hdl-examples tests 2019-03-26 21:32:02 -04:00
cache_request.sv struct conversion attempts to size unsized constants when packing patterns 2019-04-10 14:07:38 -04:00
cache_request.v added new cache_request test from hdl examples 2019-04-10 13:15:43 -04:00
cache_request_tb.v added new cache_request test from hdl examples 2019-04-10 13:15:43 -04:00
case.sv added hdl-examples tests 2019-03-26 21:32:02 -04:00
case.v added hdl-examples tests 2019-03-26 21:32:02 -04:00
case_tb.v added hdl-examples tests 2019-03-26 21:32:02 -04:00
complex_interface.sv interface conversion respects port direction when inlining bindings 2019-04-11 14:08:50 -04:00
complex_interface.v interface conversion respects port direction when inlining bindings 2019-04-11 14:08:50 -04:00
complex_interface_tb.v interface conversion respects port direction when inlining bindings 2019-04-11 14:08:50 -04:00
double_clock.sv added hdl-examples tests 2019-03-26 21:32:02 -04:00
double_clock.v added hdl-examples tests 2019-03-26 21:32:02 -04:00
double_clock_tb.v added hdl-examples tests 2019-03-26 21:32:02 -04:00
enum.sv added hdl-examples tests 2019-03-26 21:32:02 -04:00
enum.v added hdl-examples tests 2019-03-26 21:32:02 -04:00
enum_tb.v added hdl-examples tests 2019-03-26 21:32:02 -04:00
fsm.sv added hdl-examples tests 2019-03-26 21:32:02 -04:00
fsm.v added hdl-examples tests 2019-03-26 21:32:02 -04:00
fsm_tb.v added hdl-examples tests 2019-03-26 21:32:02 -04:00
functions.sv added hdl-examples tests 2019-03-26 21:32:02 -04:00
functions.v added hdl-examples tests 2019-03-26 21:32:02 -04:00
functions_tb.v added hdl-examples tests 2019-03-26 21:32:02 -04:00
gen_struct.sv added Reid's new tests 2019-04-23 00:33:27 -04:00
gen_struct.v added Reid's new tests 2019-04-23 00:33:27 -04:00
gen_struct_tb.v added Reid's new tests 2019-04-23 00:33:27 -04:00
inline_concat.sv added hdl-examples tests 2019-03-26 21:32:02 -04:00
inline_concat.v added hdl-examples tests 2019-03-26 21:32:02 -04:00
inline_concat_tb.v added hdl-examples tests 2019-03-26 21:32:02 -04:00
module_struct.sv added Reid's new tests 2019-04-23 00:33:27 -04:00
module_struct.v added Reid's new tests 2019-04-23 00:33:27 -04:00
module_struct_tb.v added Reid's new tests 2019-04-23 00:33:27 -04:00
port_connections.sv added hdl-examples tests 2019-03-26 21:32:02 -04:00
port_connections.v added hdl-examples tests 2019-03-26 21:32:02 -04:00
port_connections_tb.v added hdl-examples tests 2019-03-26 21:32:02 -04:00
run.sh explicitly use bash to avoid dash compatability issues when running tests 2019-04-16 16:35:53 -04:00
simple_interface.sv added hdl-examples tests 2019-03-26 21:32:02 -04:00
simple_interface.v added hdl-examples tests 2019-03-26 21:32:02 -04:00
simple_interface_tb.v added hdl-examples tests 2019-03-26 21:32:02 -04:00
split_ports.sv added hdl-examples tests 2019-03-26 21:32:02 -04:00
split_ports.v added hdl-examples tests 2019-03-26 21:32:02 -04:00
split_ports_tb.v added hdl-examples tests 2019-03-26 21:32:02 -04:00
split_struct.sv added Reid's new tests 2019-04-23 00:33:27 -04:00
split_struct.v added Reid's new tests 2019-04-23 00:33:27 -04:00
split_struct_tb.v added Reid's new tests 2019-04-23 00:33:27 -04:00
struct.sv added hdl-examples tests 2019-03-26 21:32:02 -04:00
struct.v added hdl-examples tests 2019-03-26 21:32:02 -04:00
struct_tb.v added hdl-examples tests 2019-03-26 21:32:02 -04:00
typedef.sv added hdl-examples tests 2019-03-26 21:32:02 -04:00
typedef.v added hdl-examples tests 2019-03-26 21:32:02 -04:00
typedef_tb.v added hdl-examples tests 2019-03-26 21:32:02 -04:00

README.md

relong Tests

These tests are borrowed from Reid Long's HDL Examples repository. That repository was intended to provide examples for how the conversions in this project could be done. sv2v does not necessarily convert code as demonstrated in the examples. Notably, sv2v does not create generate blocks when converted vectors with multiple packed dimensions, uses localparams rather than macros for enum conversion, and converts struct literals to concatenations, rather than multiple statements.

Each test case (say, "foo") is comprised of the following files:

  1. foo.sv: original SystemVerilog
  2. foo.v: hand-converted Verilog
  3. foo_tb.v: basic testbench exercising the given modules

The SystemVerilog source file is converted to Verilog using sv2v, and then both the converted file and the reference Verilog are simulated using Icarus Verilog. This produces VCD files for each which are expected to match exactly, except for the timestamp.

Modifications

The following differences exist between the tests in this folder and their corresponding versions in the source repository.

  1. The inline_concat files were modified to remove a stray trailing semicolon. Though some tools allow for stray semicolons, iverilog does not.
  2. array.v previously had a custom implementation of $clog2, which was removed.
  3. cache_request.sv was modified to include a plain decimal literal to ensure coverage beyond the unbased-unsized literals.
  4. The cache_request2 test is omitted. It was only an example for debugging a VCS-specific issue encountered with cache_request.