diff --git a/machxo2/cells.cc b/machxo2/cells.cc index 9a682a72..9a522b1a 100644 --- a/machxo2/cells.cc +++ b/machxo2/cells.cc @@ -162,6 +162,9 @@ void dff_to_lc(const Context *ctx, CellInfo *dff, CellInfo *lc, bool pass_thru_l // FACADE_SLICE DI input instead of the FACADE_SLICE M input. lc->params[ctx->id("REG0_SD")] = std::string("0"); + // FIXME: This will have to change once we support FFs with reset value of 1. + lc->params[ctx->id("REG0_REGSET")] = std::string("RESET"); + replace_port(dff, ctx->id("CLK"), lc, ctx->id("CLK")); replace_port(dff, ctx->id("DI"), lc, ctx->id("DI0")); replace_port(dff, ctx->id("LSR"), lc, ctx->id("LSR")); diff --git a/machxo2/examples/blinky.v b/machxo2/examples/blinky.v index c7cde26d..2137ad58 100644 --- a/machxo2/examples/blinky.v +++ b/machxo2/examples/blinky.v @@ -1,6 +1,7 @@ module top(input clk, rst, output [7:0] leds); -reg [7:0] ctr; +// TODO: Test miter circuit without reset value. +reg [7:0] ctr = 8'h00; always @(posedge clk) if (rst) ctr <= 8'h00;