3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-07-24 13:18:56 +00:00

Implemented indexed part selects

This commit is contained in:
Clifford Wolf 2013-11-20 13:05:27 +01:00
parent c4c299eb5a
commit 92035fb38e
4 changed files with 19 additions and 3 deletions

5
tests/simple/partsel.v Normal file
View file

@ -0,0 +1,5 @@
module test001(input [2:0] idx, input [31:0] data, output [3:0] slice_up, slice_down);
wire [5:0] offset = idx << 2;
assign slice_up = data[offset +: 4];
assign slice_down = data[offset + 3 -: 4];
endmodule