Merge pull request #2043 from pepijndevos/moreapicula
fixes for apicula support
This commit is contained in:
commit
ef775e0b8e
|
@ -25,16 +25,31 @@ class GowinApiculaToolchain(YosysNextPNRToolchain):
|
||||||
return (self._build_name + ".cst", "CST")
|
return (self._build_name + ".cst", "CST")
|
||||||
|
|
||||||
def finalize(self):
|
def finalize(self):
|
||||||
|
devicename = self.platform.devicename
|
||||||
|
# Non-exhaustive list of family aliases that Gowin IDE supports but don't have a unique database
|
||||||
|
if devicename == "GW1NR-9C":
|
||||||
|
devicename = "GW1N-9C"
|
||||||
|
elif devicename == "GW1NR-9":
|
||||||
|
devicename = "GW1N-9"
|
||||||
|
elif devicename == "GW1NSR-4C" or devicename == "GW1NSR-4":
|
||||||
|
devicename = "GW1NS-4"
|
||||||
|
elif devicename == "GW1NR-4C" or devicename == "GW1NR-4":
|
||||||
|
devicename = "GW1N-4"
|
||||||
|
elif devicename == "GW2AR-18C":
|
||||||
|
devicename = "GW2A-18C"
|
||||||
|
elif devicename == "GW2AR-18":
|
||||||
|
devicename = "GW2A-18"
|
||||||
|
|
||||||
pnr_opts = "--write {top}_routed.json --top {top} --device {device}" + \
|
pnr_opts = "--write {top}_routed.json --top {top} --device {device}" + \
|
||||||
" --vopt family={devicename} --vopt cst={top}.cst"
|
" --vopt family={devicename} --vopt cst={top}.cst"
|
||||||
self._pnr_opts += pnr_opts.format(
|
self._pnr_opts += pnr_opts.format(
|
||||||
top = self._build_name,
|
top = self._build_name,
|
||||||
device = self.platform.device,
|
device = self.platform.device,
|
||||||
devicename = self.platform.devicename
|
devicename = devicename
|
||||||
)
|
)
|
||||||
|
|
||||||
self._packer_opts += "-d {devicename} -o {top}.fs {top}_routed.json".format(
|
self._packer_opts += "-d {devicename} -o {top}.fs {top}_routed.json".format(
|
||||||
devicename = self.platform.devicename,
|
devicename = devicename,
|
||||||
top = self._build_name
|
top = self._build_name
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -255,11 +255,7 @@ class GW1NPLL(LiteXModule):
|
||||||
instance_name = 'PLLVR'
|
instance_name = 'PLLVR'
|
||||||
self.params.update(i_VREN=1)
|
self.params.update(i_VREN=1)
|
||||||
else:
|
else:
|
||||||
instance_name = 'PLL'
|
instance_name = 'rPLL'
|
||||||
self.params.update(
|
|
||||||
i_RESET_I = 0, # IDIV reset.
|
|
||||||
i_RESET_S = 0, # SDIV and DIV3 reset.
|
|
||||||
)
|
|
||||||
for clk_name in ["CLKOUT", "CLKOUTP", "CLKOUTD", "CLKOUTD3"]:
|
for clk_name in ["CLKOUT", "CLKOUTP", "CLKOUTD", "CLKOUTD3"]:
|
||||||
self.params[f"o_{clk_name}"] = config.get(clk_name, Open()) # Clock output.
|
self.params[f"o_{clk_name}"] = config.get(clk_name, Open()) # Clock output.
|
||||||
if clk_name in ["CLKOUTD", "CLKOUTD3"]: # Recopy CLKOUTx to CLKOUTDx
|
if clk_name in ["CLKOUTD", "CLKOUTD3"]: # Recopy CLKOUTx to CLKOUTDx
|
||||||
|
|
Loading…
Reference in New Issue