ivtest: add array_slice_concat
This commit is contained in:
parent
9a0ce046c7
commit
fbbff9646d
|
|
@ -0,0 +1,17 @@
|
|||
module ArraySliceWithNarrowStart(
|
||||
input wire [159:0] a,
|
||||
input wire start,
|
||||
output wire [95:0] out
|
||||
);
|
||||
wire [31:0] a_unflattened[0:4];
|
||||
assign a_unflattened[0] = a[31:0];
|
||||
assign a_unflattened[1] = a[63:32];
|
||||
assign a_unflattened[2] = a[95:64];
|
||||
assign a_unflattened[3] = a[127:96];
|
||||
assign a_unflattened[4] = a[159:128];
|
||||
wire [31:0] array_slice_6[0:2];
|
||||
assign array_slice_6[0] = a_unflattened[{2'h0, start} > 3'h4 ? 3'h4 : {2'h0, start} + 3'h0];
|
||||
assign array_slice_6[1] = a_unflattened[{2'h0, start} > 3'h3 ? 3'h4 : {2'h0, start} + 3'h1];
|
||||
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
|
||||
|
|
@ -157,6 +157,7 @@ array_select_a normal ivltests
|
|||
array_word_check normal ivltests gold=array_word_check.gold
|
||||
array_word_width normal ivltests gold=array_word_width.gold
|
||||
array_word_width2 normal ivltests
|
||||
array_slice_concat normal ivltests
|
||||
assign3.2A normal ivltests
|
||||
assign3.2B normal ivltests
|
||||
assign3.2C normal ivltests
|
||||
|
|
|
|||
Loading…
Reference in New Issue