Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixes for apicula support #2043

Merged
merged 2 commits into from
Aug 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 17 additions & 2 deletions litex/build/gowin/apicula.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,31 @@ def build_io_constraints(self):
return (self._build_name + ".cst", "CST")

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}" + \
" --vopt family={devicename} --vopt cst={top}.cst"
self._pnr_opts += pnr_opts.format(
top = self._build_name,
device = self.platform.device,
devicename = self.platform.devicename
devicename = devicename
)

self._packer_opts += "-d {devicename} -o {top}.fs {top}_routed.json".format(
devicename = self.platform.devicename,
devicename = devicename,
top = self._build_name
)

Expand Down
6 changes: 1 addition & 5 deletions litex/soc/cores/clock/gowin_gw1n.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,11 +255,7 @@ def do_finalize(self):
instance_name = 'PLLVR'
self.params.update(i_VREN=1)
else:
instance_name = 'PLL'
self.params.update(
i_RESET_I = 0, # IDIV reset.
i_RESET_S = 0, # SDIV and DIV3 reset.
)
instance_name = 'rPLL'
for clk_name in ["CLKOUT", "CLKOUTP", "CLKOUTD", "CLKOUTD3"]:
self.params[f"o_{clk_name}"] = config.get(clk_name, Open()) # Clock output.
if clk_name in ["CLKOUTD", "CLKOUTD3"]: # Recopy CLKOUTx to CLKOUTDx
Expand Down
Loading