aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormyrtle <gatecat@ds0.me>2023-02-07 09:20:59 +0100
committerGitHub <noreply@github.com>2023-02-07 09:20:59 +0100
commita93f49eb04f4086065fd6fd8e6f777743f2509ff (patch)
treebab9ebd5cca318a545a455bf91528783f8f89dda
parent48b0025732f7b5b1b7b091691bb5a26634ae5069 (diff)
parent69fe654f02fcc18fae0e285f7e87319a2522221f (diff)
downloadnextpnr-a93f49eb04f4086065fd6fd8e6f777743f2509ff.tar.gz
nextpnr-a93f49eb04f4086065fd6fd8e6f777743f2509ff.tar.bz2
nextpnr-a93f49eb04f4086065fd6fd8e6f777743f2509ff.zip
Merge pull request #1094 from uis246/master
gowin: Add bels for new types of oscillators
-rw-r--r--gowin/arch.cc19
-rw-r--r--gowin/constids.inc2
2 files changed, 21 insertions, 0 deletions
diff --git a/gowin/arch.cc b/gowin/arch.cc
index fbe26cdd..1629d653 100644
--- a/gowin/arch.cc
+++ b/gowin/arch.cc
@@ -1430,6 +1430,25 @@ Arch::Arch(ArchArgs args) : args(args)
snprintf(buf, 32, "R%dC%d_%s", row + 1, col + 1, portname.c_str(this));
addBelInput(belname, id_OSCEN, id(buf));
break;
+ case ID_OSCW:
+ snprintf(buf, 32, "R%dC%d_OSCW", row + 1, col + 1);
+ belname = id(buf);
+ addBel(belname, id_OSCW, Loc(col, row, BelZ::osc_z), false);
+ portname = IdString(pairLookup(bel->ports.get(), bel->num_ports, ID_OSCOUT)->src_id);
+ snprintf(buf, 32, "R%dC%d_%s", row + 1, col + 1, portname.c_str(this));
+ addBelOutput(belname, id_OSCOUT, id(buf));
+ break;
+ case ID_OSCO:
+ snprintf(buf, 32, "R%dC%d_OSCO", row + 1, col + 1);
+ belname = id(buf);
+ addBel(belname, id_OSCO, Loc(col, row, BelZ::osc_z), false);
+ portname = IdString(pairLookup(bel->ports.get(), bel->num_ports, ID_OSCOUT)->src_id);
+ snprintf(buf, 32, "R%dC%d_%s", row + 1, col + 1, portname.c_str(this));
+ addBelOutput(belname, id_OSCOUT, id(buf));
+ portname = IdString(pairLookup(bel->ports.get(), bel->num_ports, ID_OSCEN)->src_id);
+ snprintf(buf, 32, "R%dC%d_%s", row + 1, col + 1, portname.c_str(this));
+ addBelInput(belname, id_OSCEN, id(buf));
+ break;
case ID_RAM16:
snprintf(buf, 32, "R%dC%d_RAMW", row + 1, col + 1);
belname = id(buf);
diff --git a/gowin/constids.inc b/gowin/constids.inc
index dac84a1e..b678cc77 100644
--- a/gowin/constids.inc
+++ b/gowin/constids.inc
@@ -851,6 +851,8 @@ X(OSC)
X(OSCZ)
X(OSCH)
X(OSCF)
+X(OSCW)
+X(OSCO)
// PLLs
X(rPLL)