mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-23 00:55:32 +00:00
Add new helper class for merging FFs into cells, use for memory_dff.
Fixes #1854.
This commit is contained in:
parent
a23d9409e7
commit
1eea06bcc0
7 changed files with 600 additions and 244 deletions
17
tests/opt/bug1854.ys
Normal file
17
tests/opt/bug1854.ys
Normal file
|
@ -0,0 +1,17 @@
|
|||
read_verilog << EOT
|
||||
module top(input clk, input [3:0] addr, output reg [0:0] dout);
|
||||
reg [1:0] mem[0:15];
|
||||
initial begin
|
||||
mem[0] = 2'b00;
|
||||
mem[1] = 2'b01;
|
||||
mem[2] = 2'b10;
|
||||
mem[3] = 2'b11;
|
||||
end
|
||||
always @(posedge clk)
|
||||
dout <= mem[addr];
|
||||
endmodule
|
||||
EOT
|
||||
|
||||
prep -rdff
|
||||
|
||||
select -assert-none t:$dff
|
Loading…
Add table
Add a link
Reference in a new issue