Closed ArcaneNibble closed 4 years ago
more minimized
module top(r0, clk_);
(* LOC = "FB1_2" *)
output r0;
(* LOC = "FB2_5" *)
input clk_;
// NOTE: Must manually instantiate BUFG
wire clk;
BUFG bufg0 (
.I(clk_),
.O(clk),
);
reg [1:0] dotcnt;
always @(*)
if (dotcnt >= 2) begin
r0 <= 1;
end
always @(posedge clk)
dotcnt <= dotcnt + 1;
endmodule
Bug happens when a constant 0/1 value tries to feed into a FF/latch (which has to be written in such a way so that yosys doesn't optimize it out). The coolrunner2_fixup pass ends up buffering the constant into an ANDTERM which is not valid. Will fix in yosys.
MCVE