-
Notifications
You must be signed in to change notification settings - Fork 243
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Himbaechel GUI #1295
base: master
Are you sure you want to change the base?
Himbaechel GUI #1295
Conversation
6d7e0cb
to
e3b9859
Compare
@@ -1,5 +1,5 @@ | |||
#!/usr/bin/env bash | |||
set -ex | |||
yosys -p "synth_xilinx -flatten -abc9 -nobram -arch xc7 -top top; write_json blinky.json" blinky.v | |||
nextpnr-himbaechel --device xc7a35tcsg324-1 -o xdc=arty.xdc --json blinky.json -o fasm=blinky.fasm --router router2 | |||
../../../../../nextpnr-himbaechel --device xc7a35tcsg324-1 -o xdc=arty.xdc --json blinky.json -o fasm=blinky.fasm --router router2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this breaks if someone does an out of tree build
himbaechel/himbaechel_api.h
Outdated
// Graphics | ||
virtual uint32_t gfxAttributes() { return 0; } | ||
|
||
virtual void gfxTileBel(std::vector<GraphicElement> &g, int x, int y, int z, int w, int h, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you perhaps think of some slightly more descriptive names for these API functions, and also add some documentation about them, so I can review them better?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure, will update these, but probably not today
himbaechel/himbaechel_api.h
Outdated
@@ -102,6 +109,20 @@ struct HimbaechelAPI | |||
virtual bool isClusterStrict(const CellInfo *cell) const; | |||
virtual bool getClusterPlacement(ClusterId cluster, BelId root_bel, | |||
std::vector<std::pair<CellInfo *, BelId>> &placement) const; | |||
|
|||
// Graphics | |||
virtual uint32_t gfxAttributes() { return 0; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really don't like this function, can you think of a better way here, like perhaps a struct that the architecture configures?
e3b9859
to
ddf3cbe
Compare
@gatecat Documentation is not added yet, but main question I have is if using tilewire as additional data is fine (need to bump db version in that case as well) ? not sure if there is other way we can actually use to determine which wire to draw. |
5d504c6
to
2f03e88
Compare
2f03e88
to
4749794
Compare
|
||
NEXTPNR_NAMESPACE_BEGIN | ||
|
||
enum GfxTileWireId |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this will need to be in a uarch-specific namespace, otherwise there will be conflicts
@@ -857,3 +865,18 @@ def write_bba(self, filename): | |||
bba.ref('chip_info') | |||
self.serialise(bba) | |||
bba.pop() | |||
|
|||
def read_gfx_h(self, filename): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is kind of horrid
@@ -144,6 +144,7 @@ class TileWireData: | |||
index: int | |||
name: IdString | |||
wire_type: IdString | |||
tile_wire: int |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be given a name that makes it's very clear that it's gui-specific, otherwise it will be very unclear to anyone looking at the structures
BelId bel(decal.tile, decal.index); | ||
GraphicElement::style_t style = decal.active ? GraphicElement::STYLE_ACTIVE : GraphicElement::STYLE_INACTIVE; | ||
uarch->drawBel(ret, style, getBelType(bel), getBelLocation(bel)); | ||
} else if (decal.type == DecalId::TYPE_WIRE) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if a wire spans multiple tiles, as it can in the himbaechel deduplication scheme, this would need to deal with all the constituent tile wires not just the index one
Is this close to merging? I am pretty desperate to see things, and |
This extends Himbaechel API with additional methods for drawing bels, wires and pips. There is also configuration attribute to control if some of these are used and also do change in coordinate system (y axis).
Was mostly mimic what we do on ECP5 and XO2/3, and was not sure about equivalent for tile_wire (mapped to GfxTileWireId) so used flags for now, since it anyway keeps some additional custom info.
First few commits are mostly cleanup and fixes of some old standing GUI issues.
Would add at least basic things in Xilinx and Gowin when we agree on API level. Please do comment and suggest changes.