From 69fe654f02fcc18fae0e285f7e87319a2522221f Mon Sep 17 00:00:00 2001 From: uis Date: Mon, 6 Feb 2023 21:32:04 +0000 Subject: gowin: Add bels for new types of oscillator --- gowin/arch.cc | 19 +++++++++++++++++++ gowin/constids.inc | 2 ++ 2 files changed, 21 insertions(+) (limited to 'gowin') 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) -- cgit v1.2.3