From 19bbdd8800c45dd06b1572c5dbf9663607335bb1 Mon Sep 17 00:00:00 2001 From: YRabbit Date: Thu, 11 Jul 2024 21:39:44 +1000 Subject: [PATCH] Gowin. Add the DCS primitive Not so much adding the primitive itself, but only its DCS_MODE parameter, without which an error occurs. Signed-off-by: YRabbit --- techlibs/gowin/cells_sim.v | 11 +++++++++++ techlibs/gowin/cells_xtra.v | 6 ------ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/techlibs/gowin/cells_sim.v b/techlibs/gowin/cells_sim.v index b26869080..d4e035051 100644 --- a/techlibs/gowin/cells_sim.v +++ b/techlibs/gowin/cells_sim.v @@ -1901,3 +1901,14 @@ output OSCOUT; parameter FREQ_DIV = 100; parameter REGULATOR_EN = 1'b0; endmodule + +(* blackbox *) +module DCS (CLK0, CLK1, CLK2, CLK3, CLKSEL, SELFORCE, CLKOUT); +input CLK0, CLK1, CLK2, CLK3, SELFORCE; +input [3:0] CLKSEL; +output CLKOUT; +parameter DCS_MODE = "RISING"; +endmodule + + + diff --git a/techlibs/gowin/cells_xtra.v b/techlibs/gowin/cells_xtra.v index 4b89b8098..cf914f38e 100644 --- a/techlibs/gowin/cells_xtra.v +++ b/techlibs/gowin/cells_xtra.v @@ -1564,12 +1564,6 @@ parameter IDLE = 4'd0, RD_S2 = 4'd12; endmodule -module DCS (...); -input CLK0, CLK1, CLK2, CLK3, SELFORCE; -input [3:0] CLKSEL; -output CLKOUT; -endmodule - module DQCE (...); input CLKIN; input CE;