aboutsummaryrefslogtreecommitdiffstats
path: root/gowin/cells.cc
diff options
context:
space:
mode:
authorYRabbit <rabbit@yrabbit.cyou>2022-03-12 23:05:42 +1000
committerYRabbit <rabbit@yrabbit.cyou>2022-03-12 23:05:42 +1000
commit4a2aa6deb49b70ed69f386898bcde7a6b2572618 (patch)
treec81c3aa7ff1ad04ab1e731ebfe01a727fd099b2b /gowin/cells.cc
parent20e595e2113bb5d2de479e70f64ebd980e756716 (diff)
downloadnextpnr-4a2aa6deb49b70ed69f386898bcde7a6b2572618.tar.gz
nextpnr-4a2aa6deb49b70ed69f386898bcde7a6b2572618.tar.bz2
nextpnr-4a2aa6deb49b70ed69f386898bcde7a6b2572618.zip
gowin: Add the Global Set/Reset primitive
GSR is added automatically if it was not instantiated by the user explicitly. Compatible with old apicula bases, the functionality does not work, but the crash does not happen --- just a warning. Signed-off-by: YRabbit <rabbit@yrabbit.cyou>
Diffstat (limited to 'gowin/cells.cc')
-rw-r--r--gowin/cells.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/gowin/cells.cc b/gowin/cells.cc
index d862458c..8e450b51 100644
--- a/gowin/cells.cc
+++ b/gowin/cells.cc
@@ -63,6 +63,8 @@ std::unique_ptr<CellInfo> create_generic_cell(Context *ctx, IdString type, std::
new_cell->addInput(id_I);
new_cell->addInput(id_OEN);
new_cell->addOutput(id_O);
+ } else if (type == id_GSR) {
+ new_cell->addInput(id_GSRI);
} else {
log_error("unable to create generic cell of type %s\n", type.c_str(ctx));
}