From 92035fb38ef8e7ac6319af659f7d682a047d2f70 Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Wed, 20 Nov 2013 13:05:27 +0100 Subject: Implemented indexed part selects --- tests/simple/partsel.v | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 tests/simple/partsel.v (limited to 'tests') diff --git a/tests/simple/partsel.v b/tests/simple/partsel.v new file mode 100644 index 000000000..acfc1ca5d --- /dev/null +++ b/tests/simple/partsel.v @@ -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 -- cgit v1.2.3