mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-28 03:15:50 +00:00
Modifications of tests as per Eddie's request
This commit is contained in:
parent
50581d5a94
commit
22f440506b
15 changed files with 1237 additions and 78 deletions
19
tests/various/dynamic_part_select/multiple_blocking.v
Normal file
19
tests/various/dynamic_part_select/multiple_blocking.v
Normal file
|
@ -0,0 +1,19 @@
|
|||
module multiple_blocking #(parameter WIDTH=32, SELW=1, CTRLW=$clog2(WIDTH), DINW=2**SELW)
|
||||
(input clk,
|
||||
input [CTRLW-1:0] ctrl,
|
||||
input [DINW-1:0] din,
|
||||
input [SELW-1:0] sel,
|
||||
output reg [WIDTH-1:0] dout);
|
||||
|
||||
localparam SLICE = WIDTH/(SELW**2);
|
||||
reg [CTRLW:0] a;
|
||||
reg [SELW-1:0] b;
|
||||
reg [DINW:0] c;
|
||||
always @(posedge clk) begin
|
||||
a = ctrl + 1;
|
||||
b = sel - 1;
|
||||
c = ~din;
|
||||
dout = dout + 1;
|
||||
dout[a*b+:SLICE] = c;
|
||||
end
|
||||
endmodule
|
Loading…
Add table
Add a link
Reference in a new issue