Skip to content

Commit

Permalink
Update drawGroup to propagate only GroupId
Browse files Browse the repository at this point in the history
  • Loading branch information
mmicko committed Dec 4, 2024
1 parent fb9ffd9 commit 397406b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion himbaechel/arch.cc
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,7 @@ std::vector<GraphicElement> Arch::getDecalGraphics(DecalId decal) const
GroupId group(decal.tile, decal.index);
Loc loc;
tile_xy(chip_info, decal.tile, loc.x, loc.y);
uarch->drawGroup(ret, getGroupType(group), loc);
uarch->drawGroup(ret, group, loc);
} else if (decal.type == DecalId::TYPE_BEL) {
BelId bel(decal.tile, decal.index);
GraphicElement::style_t style = decal.active ? GraphicElement::STYLE_ACTIVE : GraphicElement::STYLE_INACTIVE;
Expand Down
2 changes: 1 addition & 1 deletion himbaechel/himbaechel_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ struct HimbaechelAPI
virtual void drawPip(std::vector<GraphicElement> &g, GraphicElement::style_t style, Loc loc, WireId src,
IdString src_type, int32_t src_id, WireId dst, IdString dst_type, int32_t dst_id) {};

virtual void drawGroup(std::vector<GraphicElement> &g, IdString group_type, Loc loc) {};
virtual void drawGroup(std::vector<GraphicElement> &g, GroupId group, Loc loc) {};

// Routing methods
virtual void expandBoundingBox(BoundingBox &bb) const;
Expand Down
3 changes: 2 additions & 1 deletion himbaechel/uarch/example/example.cc
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,9 @@ struct ExampleImpl : HimbaechelAPI
return true;
}

void drawGroup(std::vector<GraphicElement> &g, IdString group_type, Loc loc) override
void drawGroup(std::vector<GraphicElement> &g, GroupId group, Loc loc) override
{
IdString group_type = ctx->getGroupType(group);
if (group_type == id_SWITCHBOX) {
GraphicElement el;
el.type = GraphicElement::TYPE_BOX;
Expand Down

0 comments on commit 397406b

Please sign in to comment.