summaryrefslogtreecommitdiff
path: root/tests/simple
diff options
context:
space:
mode:
Diffstat (limited to 'tests/simple')
-rw-r--r--tests/simple/partsel.v5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/simple/partsel.v b/tests/simple/partsel.v
new file mode 100644
index 00000000..acfc1ca5
--- /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