aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorClaire Wolf <clifford@clifford.at>2020-04-01 08:38:14 +0200
committerGitHub <noreply@github.com>2020-04-01 08:38:14 +0200
commit926a010b495ff6568bef7043fcfd657470c2feee (patch)
tree602fe58c10edcfb04ea5c26e087e81a82fb63c93 /tests
parent1bb5a5215fc3e1e84af3cb77bb26cc5705ab7837 (diff)
parent5132f4099b0a09b542cdb32c3bcdee24917ca5f1 (diff)
downloadyosys-926a010b495ff6568bef7043fcfd657470c2feee.tar.gz
yosys-926a010b495ff6568bef7043fcfd657470c2feee.tar.bz2
yosys-926a010b495ff6568bef7043fcfd657470c2feee.zip
Merge pull request #1848 from YosysHQ/eddie/fix_dynslice
ast: simplify to fully populate dynamic slicing case transformation
Diffstat (limited to 'tests')
-rw-r--r--tests/simple/dynslice.v12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/simple/dynslice.v b/tests/simple/dynslice.v
new file mode 100644
index 000000000..7236ac3a5
--- /dev/null
+++ b/tests/simple/dynslice.v
@@ -0,0 +1,12 @@
+module dynslice (
+ input clk ,
+ input [9:0] ctrl ,
+ input [15:0] din ,
+ input [3:0] sel ,
+ output reg [127:0] dout
+);
+always @(posedge clk)
+begin
+ dout[ctrl*sel+:16] <= din ;
+end
+endmodule