aboutsummaryrefslogtreecommitdiffstats
path: root/techlibs
diff options
context:
space:
mode:
authorMarcelina Koƛcielnicka <mwk@0x04.net>2022-02-21 16:30:42 +0100
committerMarcelina Koƛcielnicka <mwk@0x04.net>2022-02-21 17:52:31 +0100
commitd0f4d0b153572ddee5f19831f40b9c40eb480db0 (patch)
treec37aa8de5b8942407dfc8d991e992c97ce4e05d1 /techlibs
parent15860000487e2d6748843888b78289f95f3ea46b (diff)
downloadyosys-d0f4d0b153572ddee5f19831f40b9c40eb480db0.tar.gz
yosys-d0f4d0b153572ddee5f19831f40b9c40eb480db0.tar.bz2
yosys-d0f4d0b153572ddee5f19831f40b9c40eb480db0.zip
ecp5: Do not use specify in generate in cells_sim.v.
Diffstat (limited to 'techlibs')
-rw-r--r--techlibs/ecp5/cells_sim.v43
1 files changed, 15 insertions, 28 deletions
diff --git a/techlibs/ecp5/cells_sim.v b/techlibs/ecp5/cells_sim.v
index a5f905cf8..76099f493 100644
--- a/techlibs/ecp5/cells_sim.v
+++ b/techlibs/ecp5/cells_sim.v
@@ -355,37 +355,24 @@ module TRELLIS_FF(input CLK, LSR, CE, DI, M, output reg Q);
end
endgenerate
- generate
- // TODO
- if (CLKMUX == "INV")
- specify
- $setup(DI, negedge CLK, 0);
- $setup(CE, negedge CLK, 0);
- $setup(LSR, negedge CLK, 0);
-`ifndef YOSYS
- if (SRMODE == "ASYNC" && muxlsr) (negedge CLK => (Q : srval)) = 0;
-`else
- if (SRMODE == "ASYNC" && muxlsr) (LSR => Q) = 0; // Technically, this should be an edge sensitive path
- // but for facilitating a bypass box, let's pretend it's
- // a simple path
-`endif
- if (!muxlsr && muxce) (negedge CLK => (Q : DI)) = 0;
- endspecify
- else
- specify
- $setup(DI, posedge CLK, 0);
- $setup(CE, posedge CLK, 0);
- $setup(LSR, posedge CLK, 0);
+ specify
+ $setup(DI, negedge CLK &&& CLKMUX == "INV", 0);
+ $setup(CE, negedge CLK &&& CLKMUX == "INV", 0);
+ $setup(LSR, negedge CLK &&& CLKMUX == "INV", 0);
+ $setup(DI, posedge CLK &&& CLKMUX != "INV", 0);
+ $setup(CE, posedge CLK &&& CLKMUX != "INV", 0);
+ $setup(LSR, posedge CLK &&& CLKMUX != "INV", 0);
`ifndef YOSYS
- if (SRMODE == "ASYNC" && muxlsr) (posedge CLK => (Q : srval)) = 0;
+ if (SRMODE == "ASYNC" && muxlsr && CLKMUX == "INV") (negedge CLK => (Q : srval)) = 0;
+ if (SRMODE == "ASYNC" && muxlsr && CLKMUX != "INV") (posedge CLK => (Q : srval)) = 0;
`else
- if (SRMODE == "ASYNC" && muxlsr) (LSR => Q) = 0; // Technically, this should be an edge sensitive path
- // but for facilitating a bypass box, let's pretend it's
- // a simple path
+ if (SRMODE == "ASYNC" && muxlsr) (LSR => Q) = 0; // Technically, this should be an edge sensitive path
+ // but for facilitating a bypass box, let's pretend it's
+ // a simple path
`endif
- if (!muxlsr && muxce) (posedge CLK => (Q : DI)) = 0;
- endspecify
- endgenerate
+ if (!muxlsr && muxce && CLKMUX == "INV") (negedge CLK => (Q : DI)) = 0;
+ if (!muxlsr && muxce && CLKMUX != "INV") (posedge CLK => (Q : DI)) = 0;
+ endspecify
endmodule
// ---------------------------------------