Gowin. Add an energy saving primitive

We add a BANDGAP primitive used to turn off power to OSC, PLL and other
things on some GOWIN chips.

We also mark this primitive and GSR as keep.

Signed-off-by: YRabbit <rabbit@yrabbit.cyou>
This commit is contained in:
YRabbit 2024-07-06 18:58:21 +10:00
parent a739e21a5f
commit 9d0bca9775
3 changed files with 6 additions and 6 deletions

View File

@ -867,8 +867,12 @@ module ODDRC(D0, D1, CLEAR, TX, CLK, Q0, Q1);
parameter INIT = 0;
endmodule
(* blackbox, keep *)
module GSR (input GSRI);
wire GSRO = GSRI;
endmodule
(* blackbox, keep *)
module BANDGAP (input BGEN);
endmodule
(* abc9_box, lib_whitebox *)

View File

@ -13,7 +13,7 @@ class State(Enum):
IN_MODULE = auto()
IN_PARAMETER = auto()
_skip = { 'ALU', 'DFF', 'DFFC', 'DFFCE', 'DFFE', 'DFFN', 'DFFNC', 'DFFNCE',
_skip = { 'ALU', 'BANDGAP', 'DFF', 'DFFC', 'DFFCE', 'DFFE', 'DFFN', 'DFFNC', 'DFFNCE',
'DFFNE', 'DFFNP', 'DFFNPE', 'DFFNR', 'DFFNRE', 'DFFNS', 'DFFNSE',
'DFFP', 'DFFPE', 'DFFR', 'DFFRE', 'DFFS', 'DFFSE', 'DP', 'DPX9',
'ELVDS_OBUF', 'GND', 'GSR', 'IBUF', 'IDDR', 'IDDRC', 'IDES10',

View File

@ -1687,10 +1687,6 @@ endmodule
module ADC (...);
endmodule
module BANDGAP (...);
input BGEN;
endmodule
module CLKDIV2 (...);
parameter GSREN = "false";
input HCLKIN, RESETN;