Skip to content
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

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from
Draft

Himbaechel GUI #1295

wants to merge 5 commits into from

Conversation

mmicko
Copy link
Member

@mmicko mmicko commented Feb 29, 2024

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.

@@ -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
Copy link
Member

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

// Graphics
virtual uint32_t gfxAttributes() { return 0; }

virtual void gfxTileBel(std::vector<GraphicElement> &g, int x, int y, int z, int w, int h,
Copy link
Member

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?

Copy link
Member Author

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

@@ -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; }
Copy link
Member

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?

@mmicko
Copy link
Member Author

mmicko commented Mar 19, 2024

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants