-
Notifications
You must be signed in to change notification settings - Fork 33
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Consider the below where a DFF is unassigned at reset only under some parameters. yosys-slang currently converts this to an $aldff with an asynchronous load of q, which introduces an error in check as there is a comb loop from Q to AD. Yosys proc_dff optimizes out asynchronous self assignment conditions from DFFs so creates a $dff here, and I think yosys-slang also does this on some other patterns (e.g. if q is unconditionally assigned itself in the reset branch) but it would be good to be able to handle these more general patterns
module top #(
parameter bit RST_Q = 0
) (
input logic clk,
input logic rst,
input logic d,
output logic q
);
always_ff @(posedge clk or posedge rst) begin
if (rst) begin
if (RST_Q)
q <= '0;
end else begin
q <= d;
end
end
endmoduleMetadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request