mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-23 00:55:32 +00:00
Refactor "opt_rmdff -sat"
Signed-off-by: Clifford Wolf <clifford@clifford.at>
This commit is contained in:
parent
73bd1d59a7
commit
2454ad99bf
4 changed files with 57 additions and 372 deletions
|
@ -1,15 +1,12 @@
|
|||
module top(
|
||||
input clk,
|
||||
input a,
|
||||
output b
|
||||
);
|
||||
reg b_reg;
|
||||
initial begin
|
||||
b_reg <= 0;
|
||||
end
|
||||
|
||||
assign b = b_reg;
|
||||
always @(posedge clk) begin
|
||||
b_reg <= a && b_reg;
|
||||
end
|
||||
module top (
|
||||
input clk,
|
||||
output reg [7:0] cnt
|
||||
);
|
||||
initial cnt = 0;
|
||||
always @(posedge clk) begin
|
||||
if (cnt < 20)
|
||||
cnt <= cnt + 1;
|
||||
else
|
||||
cnt <= 0;
|
||||
end
|
||||
endmodule
|
||||
|
|
|
@ -2,3 +2,4 @@ read_verilog opt_ff_sat.v
|
|||
prep -flatten
|
||||
opt_rmdff -sat
|
||||
synth
|
||||
select -assert-count 5 t:$_DFF_P_
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue