aboutsummaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorYRabbit <rabbit@yrabbit.cyou>2022-01-29 14:45:17 +1000
committerYRabbit <rabbit@yrabbit.cyou>2022-01-29 14:45:17 +1000
commit22e4081c73ab7eec3c9f0841fcb1f247a85b5265 (patch)
treea6356121c9ea35e6221a42ed5e67c260f280f4ad /common
parente069b3bc6ab4d504e84ef62086d2bb9e5144717b (diff)
downloadnextpnr-22e4081c73ab7eec3c9f0841fcb1f247a85b5265.tar.gz
nextpnr-22e4081c73ab7eec3c9f0841fcb1f247a85b5265.tar.bz2
nextpnr-22e4081c73ab7eec3c9f0841fcb1f247a85b5265.zip
gowin: Add GUI.
* Items such as LUT, DFF, MUX, ALU, IOB are displayed; * Local wires, 1-2-4-8 wires are displayed; * The clock spines, taps and branches are displayed with some caveats. For now, you can not create a project in the GUI because of possible conflict with another PR (about GW1NR-9C support), but you can specify the board in the command line and load .JSON and .CST in the GUI. Although ALUs are displayed, but the CIN and COUT wires are not. This is still an unsolved problem. Signed-off-by: YRabbit <rabbit@yrabbit.cyou>
Diffstat (limited to 'common')
-rw-r--r--common/nextpnr_base_types.h2
-rw-r--r--common/svg.cc2
2 files changed, 4 insertions, 0 deletions
diff --git a/common/nextpnr_base_types.h b/common/nextpnr_base_types.h
index 2f114bf8..944bf0b8 100644
--- a/common/nextpnr_base_types.h
+++ b/common/nextpnr_base_types.h
@@ -46,6 +46,8 @@ struct GraphicElement
TYPE_BOX,
TYPE_CIRCLE,
TYPE_LABEL,
+ TYPE_LOCAL_ARROW, // Located entirely within the cell boundaries, coordinates in the range [0., 1.]
+ TYPE_LOCAL_LINE,
TYPE_MAX
} type = TYPE_NONE;
diff --git a/common/svg.cc b/common/svg.cc
index d2050843..c5e2ea36 100644
--- a/common/svg.cc
+++ b/common/svg.cc
@@ -57,6 +57,8 @@ struct SVGWriter
switch (el.type) {
case GraphicElement::TYPE_LINE:
case GraphicElement::TYPE_ARROW:
+ case GraphicElement::TYPE_LOCAL_LINE:
+ case GraphicElement::TYPE_LOCAL_ARROW:
out << stringf("<line x1=\"%f\" y1=\"%f\" x2=\"%f\" y2=\"%f\" stroke=\"%s\"/>", (el.x1 + dxy.x) * scale,
(el.y1 + dxy.y) * scale, (el.x2 + dxy.x) * scale, (el.y2 + dxy.y) * scale,
get_stroke_colour(el.style))