tests: vlog: update carry tests Signed-off-by: Karol Gugala <kgugala@antmicro.com>
diff --git a/tests/carry/cblock/cblock.sim.v b/tests/carry/cblock/cblock.sim.v index 01411d1..b73ddbb 100644 --- a/tests/carry/cblock/cblock.sim.v +++ b/tests/carry/cblock/cblock.sim.v
@@ -1,6 +1,6 @@ `default_nettype none -(* blackbox *) +(* whitebox *) module CBLOCK ( I, O, @@ -8,12 +8,21 @@ COUT ); input wire [3:0] I; + (* carry="C" *) + input wire CIN; + (* DELAY_MATRIX_I="30e-12 30e-12 30e-12 30e-12" *) + (* DELAY_CONST_CIN="30e-12" *) output wire O; (* carry="C" *) - input wire CIN; - (* carry="C" *) + (* DELAY_MATRIX_I="30e-12 30e-12 30e-12 30e-12" *) + (* DELAY_CONST_CIN="30e-12" *) output wire COUT; + wire [4:0] internal_sum; + + assign internal_sum = I + CIN; + assign O = internal_sum[4]; + assign COUT = internal_sum[3]; endmodule
diff --git a/tests/carry/cblock/golden.model.xml b/tests/carry/cblock/golden.model.xml index ddc1c17..a490dc9 100644 --- a/tests/carry/cblock/golden.model.xml +++ b/tests/carry/cblock/golden.model.xml
@@ -1,8 +1,8 @@ <models xmlns:xi="http://www.w3.org/2001/XInclude"> - <model name="cblock"> + <model name="CBLOCK"> <input_ports> - <port name="CIN"/> - <port name="I"/> + <port combinational_sink_ports="COUT O" name="CIN"/> + <port combinational_sink_ports="COUT O" name="I"/> </input_ports> <output_ports> <port name="COUT"/>
diff --git a/tests/carry/cblock/golden.pb_type.xml b/tests/carry/cblock/golden.pb_type.xml index 1acb889..7068655 100644 --- a/tests/carry/cblock/golden.pb_type.xml +++ b/tests/carry/cblock/golden.pb_type.xml
@@ -1,5 +1,5 @@ <?xml version='1.0' encoding='utf-8'?> -<pb_type xmlns:xi="http://www.w3.org/2001/XInclude" blif_model=".subckt cblock" name="CBLOCK" num_pb="1"> +<pb_type xmlns:xi="http://www.w3.org/2001/XInclude" blif_model=".subckt CBLOCK" name="CBLOCK" num_pb="1"> <input name="CIN" num_pins="1"> <pack_pattern name="C" type="carry"/> </input> @@ -8,4 +8,12 @@ <pack_pattern name="C" type="carry"/> </output> <output name="O" num_pins="1"/> + <delay_constant in_port="CBLOCK.CIN" max="30e-12" out_port="CBLOCK.COUT"/> + <delay_matrix in_port="CBLOCK.I" out_port="CBLOCK.COUT" type="max"> +30e-12 30e-12 30e-12 30e-12 +</delay_matrix> + <delay_constant in_port="CBLOCK.CIN" max="30e-12" out_port="CBLOCK.O"/> + <delay_matrix in_port="CBLOCK.I" out_port="CBLOCK.O" type="max"> +30e-12 30e-12 30e-12 30e-12 +</delay_matrix> </pb_type>
diff --git a/tests/carry/golden.pb_type.xml b/tests/carry/golden.pb_type.xml index b420aa4..cc2d36b 100644 --- a/tests/carry/golden.pb_type.xml +++ b/tests/carry/golden.pb_type.xml
@@ -6,10 +6,10 @@ <output name="COUT" num_pins="1"/> <output name="O0" num_pins="1"/> <output name="O1" num_pins="1"/> - <pb_type blif_model=".subckt cblock" name="cblock0" num_pb="1"> + <pb_type blif_model=".subckt CBLOCK" name="cblock0" num_pb="1"> <xi:include href="cblock/cblock.pb_type.xml" xpointer="xpointer(pb_type/child::node())"/> </pb_type> - <pb_type blif_model=".subckt cblock" name="cblock1" num_pb="1"> + <pb_type blif_model=".subckt CBLOCK" name="cblock1" num_pb="1"> <xi:include href="cblock/cblock.pb_type.xml" xpointer="xpointer(pb_type/child::node())"/> </pb_type> <interconnect>