From 230de1e68afb0f7c57f64bd1b35850e529395d92 Mon Sep 17 00:00:00 2001 From: Icenowy Zheng Date: Mon, 24 Jan 2022 23:54:09 +0800 Subject: gowin: add an option to manually specify family In the vendor IDE, there's a device family named GW1N-9C (which seems to mean C revision of GW1N-9), in which the model numbers are all the same with GW1N-9. Add an option to nextpnr-gowin to allow manually specified family for this situation. Signed-off-by: Icenowy Zheng --- gowin/main.cc | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'gowin') diff --git a/gowin/main.cc b/gowin/main.cc index fb9df48d..343d922b 100644 --- a/gowin/main.cc +++ b/gowin/main.cc @@ -48,6 +48,7 @@ po::options_description GowinCommandHandler::getArchOptions() { po::options_description specific("Architecture specific options"); specific.add_options()("device", po::value(), "device name"); + specific.add_options()("family", po::value(), "family name"); specific.add_options()("cst", po::value(), "physical constraints file"); return specific; } @@ -62,12 +63,16 @@ std::unique_ptr GowinCommandHandler::createContext(dict(); + } else { + char buf[36]; + // GW1N and GW1NR variants share the same database. + // Most Gowin devices are a System in Package with some SDRAM wirebonded to a GPIO bank. + // However, it appears that the S series with embedded ARM core are unique silicon. + snprintf(buf, 36, "GW1N%s-%s", match[1].str().c_str(), match[3].str().c_str()); + chipArgs.family = buf; + } chipArgs.partnumber = match[0]; return std::unique_ptr(new Context(chipArgs)); } -- cgit v1.2.3 From cd97ef6536eccc73554b5f418945c4e001db9606 Mon Sep 17 00:00:00 2001 From: Pepijn de Vos Date: Sun, 6 Feb 2022 11:56:09 +0100 Subject: add GW1N-9C db --- gowin/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gowin') diff --git a/gowin/CMakeLists.txt b/gowin/CMakeLists.txt index 5ec32128..34af9dc6 100644 --- a/gowin/CMakeLists.txt +++ b/gowin/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 3.5) project(chipdb-gowin NONE) -set(ALL_GOWIN_DEVICES GW1N-1 GW1N-4 GW1N-9 GW1NS-2 GW1NS-4) +set(ALL_GOWIN_DEVICES GW1N-1 GW1N-4 GW1N-9 GW1N-9C GW1NS-2 GW1NS-4) set(GOWIN_DEVICES ${ALL_GOWIN_DEVICES} CACHE STRING "Include support for these Gowin devices (available: ${ALL_GOWIN_DEVICES})") message(STATUS "Enabled Gowin devices: ${GOWIN_DEVICES}") -- cgit v1.2.3