From 0b22810a257ed2b5c72a2f31ba440ff78311539b Mon Sep 17 00:00:00 2001 From: Johan Euphrosine Date: Thu, 26 Oct 2023 11:30:56 +0900 Subject: [PATCH] ivtests/array_slice_contact: add tb --- ivtest/ivltests/array_slice_concat.v | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/ivtest/ivltests/array_slice_concat.v b/ivtest/ivltests/array_slice_concat.v index 1421d0733..7fca2417d 100644 --- a/ivtest/ivltests/array_slice_concat.v +++ b/ivtest/ivltests/array_slice_concat.v @@ -15,3 +15,21 @@ module ArraySliceWithNarrowStart( assign array_slice_6[2] = a_unflattened[{2'h0, start} > 3'h2 ? 3'h4 : {2'h0, start} + 3'h2]; assign out = {array_slice_6[2], array_slice_6[1], array_slice_6[0]}; endmodule + +module top; + reg [159:0] a; + reg start; + wire [95:0] out; + + ArraySliceWithNarrowStart dut(.a(a), .start(start), .out(out)); + + initial begin + a = {32'h44444444, 32'h33333333, 32'h22222222, 32'h11111111}; + start = 1; + if (out !== 96'h444444443333333322222222) begin + $display("FAILED"); + $finish; + end + $display("PASSED"); + end +endmodule