mirror of
https://github.com/YosysHQ/yosys
synced 2025-06-22 22:03:40 +00:00
Add dynamic slicing Verilog testcase
This commit is contained in:
parent
a0cc795e85
commit
3df66027e0
1 changed files with 12 additions and 0 deletions
12
tests/simple/dynslice.v
Normal file
12
tests/simple/dynslice.v
Normal file
|
@ -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
|
Loading…
Add table
Add a link
Reference in a new issue