aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiodrag Milanovic <mmicko@gmail.com>2023-04-10 12:39:09 +0200
committerMiodrag Milanovic <mmicko@gmail.com>2023-04-10 12:39:09 +0200
commitee3162c58d744381ae59261c237e977e631b5979 (patch)
tree22ad2f6eda305fd78a982d49131aa00b09396bb2
parent266f81816bbede3f42fabe59e7d0cd8873e1a467 (diff)
downloadyosys-ee3162c58d744381ae59261c237e977e631b5979.tar.gz
yosys-ee3162c58d744381ae59261c237e977e631b5979.tar.bz2
yosys-ee3162c58d744381ae59261c237e977e631b5979.zip
Add PLL and EBR related primitives
-rw-r--r--techlibs/machxo2/Makefile.inc1
-rw-r--r--techlibs/machxo2/brams_map.v128
-rw-r--r--techlibs/machxo2/cells_bb.v227
-rw-r--r--techlibs/machxo2/cells_sim.v91
-rw-r--r--techlibs/machxo2/synth_machxo2.cc2
5 files changed, 325 insertions, 124 deletions
diff --git a/techlibs/machxo2/Makefile.inc b/techlibs/machxo2/Makefile.inc
index 774b357a2..cd4e27884 100644
--- a/techlibs/machxo2/Makefile.inc
+++ b/techlibs/machxo2/Makefile.inc
@@ -4,6 +4,7 @@ OBJS += techlibs/machxo2/synth_machxo2.o
$(eval $(call add_share_file,share/machxo2,techlibs/ecp5/cells_io.vh))
$(eval $(call add_share_file,share/machxo2,techlibs/machxo2/cells_map.v))
$(eval $(call add_share_file,share/machxo2,techlibs/machxo2/cells_sim.v))
+$(eval $(call add_share_file,share/machxo2,techlibs/machxo2/cells_bb.v))
$(eval $(call add_share_file,share/machxo2,techlibs/ecp5/lutrams.txt))
$(eval $(call add_share_file,share/machxo2,techlibs/ecp5/lutrams_map.v))
diff --git a/techlibs/machxo2/brams_map.v b/techlibs/machxo2/brams_map.v
index 05a8e8a9b..6783e5b29 100644
--- a/techlibs/machxo2/brams_map.v
+++ b/techlibs/machxo2/brams_map.v
@@ -45,38 +45,38 @@ assign PORT_A_RD_DATA = DOA;
assign PORT_B_RD_DATA = DOB;
DP8KC #(
- .INITVAL_00($sformatf("0x%080x", init_slice('h00))),
- .INITVAL_01($sformatf("0x%080x", init_slice('h01))),
- .INITVAL_02($sformatf("0x%080x", init_slice('h02))),
- .INITVAL_03($sformatf("0x%080x", init_slice('h03))),
- .INITVAL_04($sformatf("0x%080x", init_slice('h04))),
- .INITVAL_05($sformatf("0x%080x", init_slice('h05))),
- .INITVAL_06($sformatf("0x%080x", init_slice('h06))),
- .INITVAL_07($sformatf("0x%080x", init_slice('h07))),
- .INITVAL_08($sformatf("0x%080x", init_slice('h08))),
- .INITVAL_09($sformatf("0x%080x", init_slice('h09))),
- .INITVAL_0A($sformatf("0x%080x", init_slice('h0a))),
- .INITVAL_0B($sformatf("0x%080x", init_slice('h0b))),
- .INITVAL_0C($sformatf("0x%080x", init_slice('h0c))),
- .INITVAL_0D($sformatf("0x%080x", init_slice('h0d))),
- .INITVAL_0E($sformatf("0x%080x", init_slice('h0e))),
- .INITVAL_0F($sformatf("0x%080x", init_slice('h0f))),
- .INITVAL_10($sformatf("0x%080x", init_slice('h10))),
- .INITVAL_11($sformatf("0x%080x", init_slice('h11))),
- .INITVAL_12($sformatf("0x%080x", init_slice('h12))),
- .INITVAL_13($sformatf("0x%080x", init_slice('h13))),
- .INITVAL_14($sformatf("0x%080x", init_slice('h14))),
- .INITVAL_15($sformatf("0x%080x", init_slice('h15))),
- .INITVAL_16($sformatf("0x%080x", init_slice('h16))),
- .INITVAL_17($sformatf("0x%080x", init_slice('h17))),
- .INITVAL_18($sformatf("0x%080x", init_slice('h18))),
- .INITVAL_19($sformatf("0x%080x", init_slice('h19))),
- .INITVAL_1A($sformatf("0x%080x", init_slice('h1a))),
- .INITVAL_1B($sformatf("0x%080x", init_slice('h1b))),
- .INITVAL_1C($sformatf("0x%080x", init_slice('h1c))),
- .INITVAL_1D($sformatf("0x%080x", init_slice('h1d))),
- .INITVAL_1E($sformatf("0x%080x", init_slice('h1e))),
- .INITVAL_1F($sformatf("0x%080x", init_slice('h1f))),
+ .INITVAL_00(init_slice('h00)),
+ .INITVAL_01(init_slice('h01)),
+ .INITVAL_02(init_slice('h02)),
+ .INITVAL_03(init_slice('h03)),
+ .INITVAL_04(init_slice('h04)),
+ .INITVAL_05(init_slice('h05)),
+ .INITVAL_06(init_slice('h06)),
+ .INITVAL_07(init_slice('h07)),
+ .INITVAL_08(init_slice('h08)),
+ .INITVAL_09(init_slice('h09)),
+ .INITVAL_0A(init_slice('h0a)),
+ .INITVAL_0B(init_slice('h0b)),
+ .INITVAL_0C(init_slice('h0c)),
+ .INITVAL_0D(init_slice('h0d)),
+ .INITVAL_0E(init_slice('h0e)),
+ .INITVAL_0F(init_slice('h0f)),
+ .INITVAL_10(init_slice('h10)),
+ .INITVAL_11(init_slice('h11)),
+ .INITVAL_12(init_slice('h12)),
+ .INITVAL_13(init_slice('h13)),
+ .INITVAL_14(init_slice('h14)),
+ .INITVAL_15(init_slice('h15)),
+ .INITVAL_16(init_slice('h16)),
+ .INITVAL_17(init_slice('h17)),
+ .INITVAL_18(init_slice('h18)),
+ .INITVAL_19(init_slice('h19)),
+ .INITVAL_1A(init_slice('h1a)),
+ .INITVAL_1B(init_slice('h1b)),
+ .INITVAL_1C(init_slice('h1c)),
+ .INITVAL_1D(init_slice('h1d)),
+ .INITVAL_1E(init_slice('h1e)),
+ .INITVAL_1F(init_slice('h1f)),
.DATA_WIDTH_A(PORT_A_WIDTH),
.DATA_WIDTH_B(PORT_B_WIDTH),
.REGMODE_A("NOREG"),
@@ -211,38 +211,38 @@ wire [17:0] DO;
assign PORT_R_RD_DATA = PORT_R_WIDTH == 18 ? DO : DO[17:9];
DP8KC #(
- .INITVAL_00($sformatf("0x%080x", init_slice('h00))),
- .INITVAL_01($sformatf("0x%080x", init_slice('h01))),
- .INITVAL_02($sformatf("0x%080x", init_slice('h02))),
- .INITVAL_03($sformatf("0x%080x", init_slice('h03))),
- .INITVAL_04($sformatf("0x%080x", init_slice('h04))),
- .INITVAL_05($sformatf("0x%080x", init_slice('h05))),
- .INITVAL_06($sformatf("0x%080x", init_slice('h06))),
- .INITVAL_07($sformatf("0x%080x", init_slice('h07))),
- .INITVAL_08($sformatf("0x%080x", init_slice('h08))),
- .INITVAL_09($sformatf("0x%080x", init_slice('h09))),
- .INITVAL_0A($sformatf("0x%080x", init_slice('h0a))),
- .INITVAL_0B($sformatf("0x%080x", init_slice('h0b))),
- .INITVAL_0C($sformatf("0x%080x", init_slice('h0c))),
- .INITVAL_0D($sformatf("0x%080x", init_slice('h0d))),
- .INITVAL_0E($sformatf("0x%080x", init_slice('h0e))),
- .INITVAL_0F($sformatf("0x%080x", init_slice('h0f))),
- .INITVAL_10($sformatf("0x%080x", init_slice('h10))),
- .INITVAL_11($sformatf("0x%080x", init_slice('h11))),
- .INITVAL_12($sformatf("0x%080x", init_slice('h12))),
- .INITVAL_13($sformatf("0x%080x", init_slice('h13))),
- .INITVAL_14($sformatf("0x%080x", init_slice('h14))),
- .INITVAL_15($sformatf("0x%080x", init_slice('h15))),
- .INITVAL_16($sformatf("0x%080x", init_slice('h16))),
- .INITVAL_17($sformatf("0x%080x", init_slice('h17))),
- .INITVAL_18($sformatf("0x%080x", init_slice('h18))),
- .INITVAL_19($sformatf("0x%080x", init_slice('h19))),
- .INITVAL_1A($sformatf("0x%080x", init_slice('h1a))),
- .INITVAL_1B($sformatf("0x%080x", init_slice('h1b))),
- .INITVAL_1C($sformatf("0x%080x", init_slice('h1c))),
- .INITVAL_1D($sformatf("0x%080x", init_slice('h1d))),
- .INITVAL_1E($sformatf("0x%080x", init_slice('h1e))),
- .INITVAL_1F($sformatf("0x%080x", init_slice('h1f))),
+ .INITVAL_00(init_slice('h00)),
+ .INITVAL_01(init_slice('h01)),
+ .INITVAL_02(init_slice('h02)),
+ .INITVAL_03(init_slice('h03)),
+ .INITVAL_04(init_slice('h04)),
+ .INITVAL_05(init_slice('h05)),
+ .INITVAL_06(init_slice('h06)),
+ .INITVAL_07(init_slice('h07)),
+ .INITVAL_08(init_slice('h08)),
+ .INITVAL_09(init_slice('h09)),
+ .INITVAL_0A(init_slice('h0a)),
+ .INITVAL_0B(init_slice('h0b)),
+ .INITVAL_0C(init_slice('h0c)),
+ .INITVAL_0D(init_slice('h0d)),
+ .INITVAL_0E(init_slice('h0e)),
+ .INITVAL_0F(init_slice('h0f)),
+ .INITVAL_10(init_slice('h10)),
+ .INITVAL_11(init_slice('h11)),
+ .INITVAL_12(init_slice('h12)),
+ .INITVAL_13(init_slice('h13)),
+ .INITVAL_14(init_slice('h14)),
+ .INITVAL_15(init_slice('h15)),
+ .INITVAL_16(init_slice('h16)),
+ .INITVAL_17(init_slice('h17)),
+ .INITVAL_18(init_slice('h18)),
+ .INITVAL_19(init_slice('h19)),
+ .INITVAL_1A(init_slice('h1a)),
+ .INITVAL_1B(init_slice('h1b)),
+ .INITVAL_1C(init_slice('h1c)),
+ .INITVAL_1D(init_slice('h1d)),
+ .INITVAL_1E(init_slice('h1e)),
+ .INITVAL_1F(init_slice('h1f)),
.DATA_WIDTH_A(PORT_W_WIDTH),
.DATA_WIDTH_B(PORT_R_WIDTH),
.REGMODE_A("NOREG"),
diff --git a/techlibs/machxo2/cells_bb.v b/techlibs/machxo2/cells_bb.v
new file mode 100644
index 000000000..3d047b169
--- /dev/null
+++ b/techlibs/machxo2/cells_bb.v
@@ -0,0 +1,227 @@
+(* blackbox *)
+module EHXPLLJ (
+ input CLKI, CLKFB,
+ input PHASESEL1, PHASESEL0, PHASEDIR, PHASESTEP,
+ input LOADREG, STDBY, PLLWAKESYNC, RST, RESETM, RESETC, RESETD,
+ input ENCLKOP, ENCLKOS, ENCLKOS2, ENCLKOS3, PLLCLK, PLLRST, PLLSTB, PLLWE,
+ input PLLDATI7, PLLDATI6, PLLDATI5, PLLDATI4, PLLDATI3, PLLDATI2, PLLDATI1, PLLDATI0,
+ input PLLADDR4, PLLADDR3, PLLADDR2, PLLADDR1, PLLADDR0,
+ output CLKOP, CLKOS, CLKOS2, CLKOS3, LOCK, INTLOCK, REFCLK,
+ output PLLDATO7, PLLDATO6, PLLDATO5, PLLDATO4, PLLDATO3, PLLDATO2, PLLDATO1, PLLDATO0, PLLACK,
+ output DPHSRC, CLKINTFB
+);
+ parameter CLKI_DIV = 1;
+ parameter CLKFB_DIV = 1;
+ parameter CLKOP_DIV = 8;
+ parameter CLKOS_DIV = 8;
+ parameter CLKOS2_DIV = 8;
+ parameter CLKOS3_DIV = 8;
+ parameter CLKOP_ENABLE = "ENABLED";
+ parameter CLKOS_ENABLE = "ENABLED";
+ parameter CLKOS2_ENABLE = "ENABLED";
+ parameter CLKOS3_ENABLE = "ENABLED";
+ parameter VCO_BYPASS_A0 = "DISABLED";
+ parameter VCO_BYPASS_B0 = "DISABLED";
+ parameter VCO_BYPASS_C0 = "DISABLED";
+ parameter VCO_BYPASS_D0 = "DISABLED";
+ parameter CLKOP_CPHASE = 0;
+ parameter CLKOS_CPHASE = 0;
+ parameter CLKOS2_CPHASE = 0;
+ parameter CLKOS3_CPHASE = 0;
+ parameter CLKOP_FPHASE = 0;
+ parameter CLKOS_FPHASE = 0;
+ parameter CLKOS2_FPHASE = 0;
+ parameter CLKOS3_FPHASE = 0;
+ parameter FEEDBK_PATH = "CLKOP";
+ parameter FRACN_ENABLE = "DISABLED";
+ parameter FRACN_DIV = 0;
+ parameter CLKOP_TRIM_POL = "RISING";
+ parameter CLKOP_TRIM_DELAY = 0;
+ parameter CLKOS_TRIM_POL = "RISING";
+ parameter CLKOS_TRIM_DELAY = 0;
+ parameter PLL_USE_WB = "DISABLED";
+ parameter PREDIVIDER_MUXA1 = 0;
+ parameter PREDIVIDER_MUXB1 = 0;
+ parameter PREDIVIDER_MUXC1 = 0;
+ parameter PREDIVIDER_MUXD1 = 0;
+ parameter OUTDIVIDER_MUXA2 = "DIVA";
+ parameter OUTDIVIDER_MUXB2 = "DIVB";
+ parameter OUTDIVIDER_MUXC2 = "DIVC";
+ parameter OUTDIVIDER_MUXD2 = "DIVD";
+ parameter PLL_LOCK_MODE = 0;
+ parameter STDBY_ENABLE = "DISABLED";
+ parameter DPHASE_SOURCE = "DISABLED";
+ parameter PLLRST_ENA = "DISABLED";
+ parameter MRST_ENA = "DISABLED";
+ parameter DCRST_ENA = "DISABLED";
+ parameter DDRST_ENA = "DISABLED";
+ parameter INTFB_WAKE = "DISABLED";
+endmodule
+
+(* blackbox *)
+module OSCH #(
+ parameter NOM_FREQ = "2.08"
+) (
+ input STDBY,
+ output OSC,
+ output SEDSTDBY
+);
+endmodule
+
+(* blackbox *)
+module DCCA (
+ input CLKI,
+ input CE,
+ output CLKO
+);
+endmodule
+
+(* blackbox *)
+module DCMA (
+ input CLK0,
+ input CLK1,
+ input SEL,
+ output DCMOUT
+);
+endmodule
+
+(* blackbox *)
+module PDPW8KC (
+ input DI17, DI16, DI15, DI14, DI13, DI12, DI11, DI10, DI9, DI8, DI7, DI6, DI5, DI4, DI3, DI2, DI1, DI0,
+ input ADW8, ADW7, ADW6, ADW5, ADW4, ADW3, ADW2, ADW1, ADW0,
+ input BE1, BE0,
+ input CEW, CLKW, CSW2, CSW1, CSW0,
+ input ADR12, ADR11, ADR10, ADR9, ADR8, ADR7, ADR6, ADR5, ADR4, ADR3, ADR2, ADR1, ADR0,
+ input CER, OCER, CLKR, CSR2, CSR1, CSR0, RST,
+ output DO17, DO16, DO15, DO14, DO13, DO12, DO11, DO10, DO9, DO8, DO7, DO6, DO5, DO4, DO3, DO2, DO1, DO0
+);
+ parameter DATA_WIDTH_W = 18;
+ parameter DATA_WIDTH_R = 9;
+
+ parameter GSR = "ENABLED";
+
+ parameter REGMODE = "NOREG";
+
+ parameter RESETMODE = "SYNC";
+ parameter ASYNC_RESET_RELEASE = "SYNC";
+
+ parameter CSDECODE_W = "0b000";
+ parameter CSDECODE_R = "0b000";
+
+ parameter INITVAL_00 = 320'h00000000000000000000000000000000000000000000000000000000000000000000000000000000;
+ parameter INITVAL_01 = 320'h00000000000000000000000000000000000000000000000000000000000000000000000000000000;
+ parameter INITVAL_02 = 320'h00000000000000000000000000000000000000000000000000000000000000000000000000000000;
+ parameter INITVAL_03 = 320'h00000000000000000000000000000000000000000000000000000000000000000000000000000000;
+ parameter INITVAL_04 = 320'h00000000000000000000000000000000000000000000000000000000000000000000000000000000;
+ parameter INITVAL_05 = 320'h00000000000000000000000000000000000000000000000000000000000000000000000000000000;
+ parameter INITVAL_06 = 320'h00000000000000000000000000000000000000000000000000000000000000000000000000000000;
+ parameter INITVAL_07 = 320'h00000000000000000000000000000000000000000000000000000000000000000000000000000000;
+ parameter INITVAL_08 = 320'h00000000000000000000000000000000000000000000000000000000000000000000000000000000;
+ parameter INITVAL_09 = 320'h00000000000000000000000000000000000000000000000000000000000000000000000000000000;
+ parameter INITVAL_0A = 320'h00000000000000000000000000000000000000000000000000000000000000000000000000000000;
+ parameter INITVAL_0B = 320'h00000000000000000000000000000000000000000000000000000000000000000000000000000000;
+ parameter INITVAL_0C = 320'h00000000000000000000000000000000000000000000000000000000000000000000000000000000;
+ parameter INITVAL_0D = 320'h00000000000000000000000000000000000000000000000000000000000000000000000000000000;
+ parameter INITVAL_0E = 320'h00000000000000000000000000000000000000000000000000000000000000000000000000000000;
+ parameter INITVAL_0F = 320'h00000000000000000000000000000000000000000000000000000000000000000000000000000000;
+ parameter INITVAL_10 = 320'h00000000000000000000000000000000000000000000000000000000000000000000000000000000;
+ parameter INITVAL_11 = 320'h00000000000000000000000000000000000000000000000000000000000000000000000000000000;
+ parameter INITVAL_12 = 320'h00000000000000000000000000000000000000000000000000000000000000000000000000000000;
+ parameter INITVAL_13 = 320'h00000000000000000000000000000000000000000000000000000000000000000000000000000000;
+ parameter INITVAL_14 = 320'h00000000000000000000000000000000000000000000000000000000000000000000000000000000;
+ parameter INITVAL_15 = 320'h00000000000000000000000000000000000000000000000000000000000000000000000000000000;
+ parameter INITVAL_16 = 320'h00000000000000000000000000000000000000000000000000000000000000000000000000000000;
+ parameter INITVAL_17 = 320'h00000000000000000000000000000000000000000000000000000000000000000000000000000000;
+ parameter INITVAL_18 = 320'h00000000000000000000000000000000000000000000000000000000000000000000000000000000;
+ parameter INITVAL_19 = 320'h00000000000000000000000000000000000000000000000000000000000000000000000000000000;
+ parameter INITVAL_1A = 320'h00000000000000000000000000000000000000000000000000000000000000000000000000000000;
+ parameter INITVAL_1B = 320'h00000000000000000000000000000000000000000000000000000000000000000000000000000000;
+ parameter INITVAL_1C = 320'h00000000000000000000000000000000000000000000000000000000000000000000000000000000;
+ parameter INITVAL_1D = 320'h00000000000000000000000000000000000000000000000000000000000000000000000000000000;
+ parameter INITVAL_1E = 320'h00000000000000000000000000000000000000000000000000000000000000000000000000000000;
+ parameter INITVAL_1F = 320'h00000000000000000000000000000000000000000000000000000000000000000000000000000000;
+ parameter INIT_DATA = "STATIC";
+
+endmodule
+
+(* blackbox *)
+module SP8KC (
+ input DI8, DI7, DI6, DI5, DI4, DI3, DI2, DI1, DI0,
+ input AD12, AD11, AD10, AD9, AD8, AD7, AD6, AD5, AD4, AD3, AD2, AD1, AD0,
+ input CE, OCE, CLK, WE, CS2, CS1, CS0, RST,
+ output DO8, DO7, DO6, DO5, DO4, DO3, DO2, DO1, DO0
+);
+ parameter DATA_WIDTH = 9;
+ parameter GSR = "ENABLED";
+
+ parameter REGMODE = "NOREG";
+
+ parameter RESETMODE = "SYNC";
+ parameter ASYNC_RESET_RELEASE = "SYNC";
+
+ parameter CSDECODE = "0b000";
+
+ parameter WRITEMODE = "NORMAL";
+
+ parameter INITVAL_00 = 320'h00000000000000000000000000000000000000000000000000000000000000000000000000000000;
+ parameter INITVAL_01 = 320'h00000000000000000000000000000000000000000000000000000000000000000000000000000000;
+ parameter INITVAL_02 = 320'h00000000000000000000000000000000000000000000000000000000000000000000000000000000;
+ parameter INITVAL_03 = 320'h00000000000000000000000000000000000000000000000000000000000000000000000000000000;
+ parameter INITVAL_04 = 320'h00000000000000000000000000000000000000000000000000000000000000000000000000000000;
+ parameter INITVAL_05 = 320'h00000000000000000000000000000000000000000000000000000000000000000000000000000000;
+ parameter INITVAL_06 = 320'h00000000000000000000000000000000000000000000000000000000000000000000000000000000;
+ parameter INITVAL_07 = 320'h00000000000000000000000000000000000000000000000000000000000000000000000000000000;
+ parameter INITVAL_08 = 320'h00000000000000000000000000000000000000000000000000000000000000000000000000000000;
+ parameter INITVAL_09 = 320'h00000000000000000000000000000000000000000000000000000000000000000000000000000000;
+ parameter INITVAL_0A = 320'h00000000000000000000000000000000000000000000000000000000000000000000000000000000;
+ parameter INITVAL_0B = 320'h00000000000000000000000000000000000000000000000000000000000000000000000000000000;
+ parameter INITVAL_0C = 320'h00000000000000000000000000000000000000000000000000000000000000000000000000000000;
+ parameter INITVAL_0D = 320'h00000000000000000000000000000000000000000000000000000000000000000000000000000000;
+ parameter INITVAL_0E = 320'h00000000000000000000000000000000000000000000000000000000000000000000000000000000;
+ parameter INITVAL_0F = 320'h00000000000000000000000000000000000000000000000000000000000000000000000000000000;
+ parameter INITVAL_10 = 320'h00000000000000000000000000000000000000000000000000000000000000000000000000000000;
+ parameter INITVAL_11 = 320'h00000000000000000000000000000000000000000000000000000000000000000000000000000000;
+ parameter INITVAL_12 = 320'h00000000000000000000000000000000000000000000000000000000000000000000000000000000;
+ parameter INITVAL_13 = 320'h00000000000000000000000000000000000000000000000000000000000000000000000000000000;
+ parameter INITVAL_14 = 320'h00000000000000000000000000000000000000000000000000000000000000000000000000000000;
+ parameter INITVAL_15 = 320'h00000000000000000000000000000000000000000000000000000000000000000000000000000000;
+ parameter INITVAL_16 = 320'h00000000000000000000000000000000000000000000000000000000000000000000000000000000;
+ parameter INITVAL_17 = 320'h00000000000000000000000000000000000000000000000000000000000000000000000000000000;
+ parameter INITVAL_18 = 320'h00000000000000000000000000000000000000000000000000000000000000000000000000000000;
+ parameter INITVAL_19 = 320'h00000000000000000000000000000000000000000000000000000000000000000000000000000000;
+ parameter INITVAL_1A = 320'h00000000000000000000000000000000000000000000000000000000000000000000000000000000;
+ parameter INITVAL_1B = 320'h00000000000000000000000000000000000000000000000000000000000000000000000000000000;
+ parameter INITVAL_1C = 320'h00000000000000000000000000000000000000000000000000000000000000000000000000000000;
+ parameter INITVAL_1D = 320'h00000000000000000000000000000000000000000000000000000000000000000000000000000000;
+ parameter INITVAL_1E = 320'h00000000000000000000000000000000000000000000000000000000000000000000000000000000;
+ parameter INITVAL_1F = 320'h00000000000000000000000000000000000000000000000000000000000000000000000000000000;
+ parameter INIT_DATA = "STATIC";
+endmodule
+
+(* blackbox *)
+module FIFO8KB (
+ input DI0, DI1, DI2, DI3, DI4, DI5, DI6, DI7, DI8, DI9, DI10, DI11, DI12, DI13, DI14, DI15, DI16, DI17,
+ input CSW0, CSW1, CSR0, CSR1, WE, RE, ORE, CLKW, CLKR, RST, RPRST, FULLI, EMPTYI,
+ output DO0, DO1, DO2, DO3, DO4, DO5, DO6, DO7, DO8, DO9, DO10, DO11, DO12, DO13, DO14, DO15, DO16, DO17,
+ input EF, AEF, AFF, FF
+);
+ parameter DATA_WIDTH_W = 18;
+ parameter DATA_WIDTH_R = 18;
+
+ parameter GSR = "DISABLED";
+
+ parameter REGMODE = "NOREG";
+
+ parameter RESETMODE = "ASYNC";
+ parameter ASYNC_RESET_RELEASE = "SYNC";
+
+ parameter CSDECODE_W = "0b00";
+ parameter CSDECODE_R = "0b00";
+
+ parameter AEPOINTER = "0b00000000000000";
+ parameter AEPOINTER1 = "0b00000000000000";
+ parameter AFPOINTER = "0b00000000000000";
+ parameter AFPOINTER1 = "0b00000000000000";
+ parameter FULLPOINTER = "0b00000000000000";
+ parameter FULLPOINTER1 = "0b00000000000000";
+endmodule
diff --git a/techlibs/machxo2/cells_sim.v b/techlibs/machxo2/cells_sim.v
index 2075c0519..8e0e41179 100644
--- a/techlibs/machxo2/cells_sim.v
+++ b/techlibs/machxo2/cells_sim.v
@@ -179,33 +179,6 @@ module TRELLIS_IO #(
endgenerate
endmodule
-(* blackbox *)
-module OSCH #(
- parameter NOM_FREQ = "2.08"
-) (
- input STDBY,
- output OSC,
- output SEDSTDBY
-);
-endmodule
-
-(* blackbox *)
-module DCCA (
- input CLKI,
- input CE,
- output CLKO
-);
-endmodule
-
-(* blackbox *)
-module DCMA (
- input CLK0,
- input CLK1,
- input SEL,
- output DCMOUT
-);
-endmodule
-
(* abc9_box, lib_whitebox *)
module TRELLIS_DPR16X4 (
input [3:0] DI,
@@ -371,38 +344,38 @@ module DP8KC(
parameter GSR = "ENABLED";
parameter INIT_DATA = "STATIC";
- parameter INITVAL_00 = "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000";
- parameter INITVAL_01 = "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000";
- parameter INITVAL_02 = "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000";
- parameter INITVAL_03 = "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000";
- parameter INITVAL_04 = "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000";
- parameter INITVAL_05 = "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000";
- parameter INITVAL_06 = "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000";
- parameter INITVAL_07 = "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000";
- parameter INITVAL_08 = "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000";
- parameter INITVAL_09 = "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000";
- parameter INITVAL_0A = "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000";
- parameter INITVAL_0B = "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000";
- parameter INITVAL_0C = "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000";
- parameter INITVAL_0D = "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000";
- parameter INITVAL_0E = "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000";
- parameter INITVAL_0F = "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000";
- parameter INITVAL_10 = "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000";
- parameter INITVAL_11 = "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000";
- parameter INITVAL_12 = "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000";
- parameter INITVAL_13 = "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000";
- parameter INITVAL_14 = "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000";
- parameter INITVAL_15 = "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000";
- parameter INITVAL_16 = "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000";
- parameter INITVAL_17 = "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000";
- parameter INITVAL_18 = "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000";
- parameter INITVAL_19 = "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000";
- parameter INITVAL_1A = "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000";
- parameter INITVAL_1B = "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000";
- parameter INITVAL_1C = "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000";
- parameter INITVAL_1D = "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000";
- parameter INITVAL_1E = "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000";
- parameter INITVAL_1F = "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000";
+ parameter INITVAL_00 = 320'h00000000000000000000000000000000000000000000000000000000000000000000000000000000;
+ parameter INITVAL_01 = 320'h00000000000000000000000000000000000000000000000000000000000000000000000000000000;
+ parameter INITVAL_02 = 320'h00000000000000000000000000000000000000000000000000000000000000000000000000000000;
+ parameter INITVAL_03 = 320'h00000000000000000000000000000000000000000000000000000000000000000000000000000000;
+ parameter INITVAL_04 = 320'h00000000000000000000000000000000000000000000000000000000000000000000000000000000;
+ parameter INITVAL_05 = 320'h00000000000000000000000000000000000000000000000000000000000000000000000000000000;
+ parameter INITVAL_06 = 320'h00000000000000000000000000000000000000000000000000000000000000000000000000000000;
+ parameter INITVAL_07 = 320'h00000000000000000000000000000000000000000000000000000000000000000000000000000000;
+ parameter INITVAL_08 = 320'h00000000000000000000000000000000000000000000000000000000000000000000000000000000;
+ parameter INITVAL_09 = 320'h00000000000000000000000000000000000000000000000000000000000000000000000000000000;
+ parameter INITVAL_0A = 320'h00000000000000000000000000000000000000000000000000000000000000000000000000000000;
+ parameter INITVAL_0B = 320'h00000000000000000000000000000000000000000000000000000000000000000000000000000000;
+ parameter INITVAL_0C = 320'h00000000000000000000000000000000000000000000000000000000000000000000000000000000;
+ parameter INITVAL_0D = 320'h00000000000000000000000000000000000000000000000000000000000000000000000000000000;
+ parameter INITVAL_0E = 320'h00000000000000000000000000000000000000000000000000000000000000000000000000000000;
+ parameter INITVAL_0F = 320'h00000000000000000000000000000000000000000000000000000000000000000000000000000000;
+ parameter INITVAL_10 = 320'h00000000000000000000000000000000000000000000000000000000000000000000000000000000;
+ parameter INITVAL_11 = 320'h00000000000000000000000000000000000000000000000000000000000000000000000000000000;
+ parameter INITVAL_12 = 320'h00000000000000000000000000000000000000000000000000000000000000000000000000000000;
+ parameter INITVAL_13 = 320'h00000000000000000000000000000000000000000000000000000000000000000000000000000000;
+ parameter INITVAL_14 = 320'h00000000000000000000000000000000000000000000000000000000000000000000000000000000;
+ parameter INITVAL_15 = 320'h00000000000000000000000000000000000000000000000000000000000000000000000000000000;
+ parameter INITVAL_16 = 320'h00000000000000000000000000000000000000000000000000000000000000000000000000000000;
+ parameter INITVAL_17 = 320'h00000000000000000000000000000000000000000000000000000000000000000000000000000000;
+ parameter INITVAL_18 = 320'h00000000000000000000000000000000000000000000000000000000000000000000000000000000;
+ parameter INITVAL_19 = 320'h00000000000000000000000000000000000000000000000000000000000000000000000000000000;
+ parameter INITVAL_1A = 320'h00000000000000000000000000000000000000000000000000000000000000000000000000000000;
+ parameter INITVAL_1B = 320'h00000000000000000000000000000000000000000000000000000000000000000000000000000000;
+ parameter INITVAL_1C = 320'h00000000000000000000000000000000000000000000000000000000000000000000000000000000;
+ parameter INITVAL_1D = 320'h00000000000000000000000000000000000000000000000000000000000000000000000000000000;
+ parameter INITVAL_1E = 320'h00000000000000000000000000000000000000000000000000000000000000000000000000000000;
+ parameter INITVAL_1F = 320'h00000000000000000000000000000000000000000000000000000000000000000000000000000000;
endmodule
`ifndef NO_INCLUDES
diff --git a/techlibs/machxo2/synth_machxo2.cc b/techlibs/machxo2/synth_machxo2.cc
index fb4d7b9d0..2b684a7d8 100644
--- a/techlibs/machxo2/synth_machxo2.cc
+++ b/techlibs/machxo2/synth_machxo2.cc
@@ -178,7 +178,7 @@ struct SynthMachXO2Pass : public ScriptPass
{
if (check_label("begin"))
{
- run("read_verilog -lib -icells +/machxo2/cells_sim.v");
+ run("read_verilog -lib -icells +/machxo2/cells_sim.v +/machxo2/cells_bb.v");
run(stringf("hierarchy -check %s", help_mode ? "-top <top>" : top_opt.c_str()));
}