Merge branch 'master' of gitlab.com:SymbioticEDA/nextpnr into q3k/clickity
This commit is contained in:
commit
d2c3807598
@ -752,7 +752,7 @@ struct Arch : BaseCtx
|
|||||||
return chip_info->tiletype_names[locInfo(pip)->pip_data[pip.index].tile_type].get();
|
return chip_info->tiletype_names[locInfo(pip)->pip_data[pip.index].tile_type].get();
|
||||||
}
|
}
|
||||||
|
|
||||||
int8_t getPipType(PipId pip) const { return locInfo(pip)->pip_data[pip.index].pip_type; }
|
int8_t getPipClass(PipId pip) const { return locInfo(pip)->pip_data[pip.index].pip_type; }
|
||||||
|
|
||||||
BelId getPackagePinBel(const std::string &pin) const;
|
BelId getPackagePinBel(const std::string &pin) const;
|
||||||
std::string getBelPackagePin(BelId bel) const;
|
std::string getBelPackagePin(BelId bel) const;
|
||||||
|
@ -174,7 +174,7 @@ void write_bitstream(Context *ctx, std::string base_config_file, std::string tex
|
|||||||
// Add all set, configurable pips to the config
|
// Add all set, configurable pips to the config
|
||||||
for (auto pip : ctx->getPips()) {
|
for (auto pip : ctx->getPips()) {
|
||||||
if (ctx->getBoundPipNet(pip) != IdString()) {
|
if (ctx->getBoundPipNet(pip) != IdString()) {
|
||||||
if (ctx->getPipType(pip) == 0) { // ignore fixed pips
|
if (ctx->getPipClass(pip) == 0) { // ignore fixed pips
|
||||||
std::string tile = empty_chip.get_tile_by_position_and_type(pip.location.y, pip.location.x,
|
std::string tile = empty_chip.get_tile_by_position_and_type(pip.location.y, pip.location.x,
|
||||||
ctx->getPipTiletype(pip));
|
ctx->getPipTiletype(pip));
|
||||||
std::string source = get_trellis_wirename(ctx, pip.location, ctx->getPipSrcWire(pip));
|
std::string source = get_trellis_wirename(ctx, pip.location, ctx->getPipSrcWire(pip));
|
||||||
|
@ -838,6 +838,19 @@ void DesignWidget::prepareMenuProperty(const QPoint &pos)
|
|||||||
}
|
}
|
||||||
|
|
||||||
QMenu menu(this);
|
QMenu menu(this);
|
||||||
|
QAction *selectAction = new QAction("&Select", this);
|
||||||
|
connect(selectAction, &QAction::triggered, this, [this, items] {
|
||||||
|
std::vector<DecalXY> decals;
|
||||||
|
for (auto clickItem : items) {
|
||||||
|
IdString value = static_cast<IdStringTreeItem *>(clickItem)->getData();
|
||||||
|
ElementType type = static_cast<ElementTreeItem *>(clickItem)->getType();
|
||||||
|
std::vector<DecalXY> d = getDecals(type, value);
|
||||||
|
std::move(d.begin(), d.end(), std::back_inserter(decals));
|
||||||
|
}
|
||||||
|
Q_EMIT selected(decals);
|
||||||
|
});
|
||||||
|
menu.addAction(selectAction);
|
||||||
|
|
||||||
QMenu *subMenu = menu.addMenu("Highlight");
|
QMenu *subMenu = menu.addMenu("Highlight");
|
||||||
QActionGroup *group = new QActionGroup(this);
|
QActionGroup *group = new QActionGroup(this);
|
||||||
group->setExclusive(true);
|
group->setExclusive(true);
|
||||||
@ -890,14 +903,8 @@ void DesignWidget::onItemDoubleClicked(QTreeWidgetItem *item, int column)
|
|||||||
ElementType type = getElementTypeByName(selectedProperty->propertyId());
|
ElementType type = getElementTypeByName(selectedProperty->propertyId());
|
||||||
QString value = selectedProperty->valueText();
|
QString value = selectedProperty->valueText();
|
||||||
int index = getElementIndex(type);
|
int index = getElementIndex(type);
|
||||||
switch (type) {
|
if (type != ElementType::NONE && nameToItem[index].contains(value))
|
||||||
case ElementType::NONE:
|
treeWidget->setCurrentItem(nameToItem[index].value(value));
|
||||||
return;
|
|
||||||
default: {
|
|
||||||
if (nameToItem[index].contains(value))
|
|
||||||
treeWidget->setCurrentItem(nameToItem[index].value(value));
|
|
||||||
} break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
NEXTPNR_NAMESPACE_END
|
NEXTPNR_NAMESPACE_END
|
||||||
|
Loading…
Reference in New Issue
Block a user