mirror of https://github.com/YosysHQ/nextpnr.git
gowin: Perfomance improvements round 1 (#1632)
* gowin: Configure HeAP Signed-off-by: gatecat <gatecat@ds0.me> * gowin: Use fast constant value routing Signed-off-by: gatecat <gatecat@ds0.me> --------- Signed-off-by: gatecat <gatecat@ds0.me>
This commit is contained in:
parent
35f14336c0
commit
2a8bab976d
|
|
@ -16,6 +16,8 @@
|
|||
#include "gowin_utils.h"
|
||||
#include "pack.h"
|
||||
|
||||
#include "placer_heap.h"
|
||||
|
||||
NEXTPNR_NAMESPACE_BEGIN
|
||||
|
||||
namespace {
|
||||
|
|
@ -49,6 +51,9 @@ struct GowinImpl : HimbaechelAPI
|
|||
bool getClusterPlacement(ClusterId cluster, BelId root_bel,
|
||||
std::vector<std::pair<CellInfo *, BelId>> &placement) const override;
|
||||
|
||||
|
||||
void configurePlacerHeap(PlacerHeapCfg &cfg) override;
|
||||
|
||||
private:
|
||||
HimbaechelHelpers h;
|
||||
GowinUtils gwu;
|
||||
|
|
@ -1270,6 +1275,27 @@ void GowinImpl::notifyBelChange(BelId bel, CellInfo *cell)
|
|||
}
|
||||
}
|
||||
|
||||
void GowinImpl::configurePlacerHeap(PlacerHeapCfg &cfg)
|
||||
{
|
||||
// SLICE types are closely associated with each other
|
||||
cfg.cellGroups.emplace_back();
|
||||
cfg.cellGroups.back().insert(id_LUT4);
|
||||
cfg.cellGroups.back().insert(id_DFF);
|
||||
cfg.cellGroups.back().insert(id_ALU);
|
||||
cfg.cellGroups.back().insert(id_MUX2_LUT5);
|
||||
cfg.cellGroups.back().insert(id_MUX2_LUT6);
|
||||
cfg.cellGroups.back().insert(id_MUX2_LUT7);
|
||||
cfg.cellGroups.back().insert(id_MUX2_LUT8);
|
||||
cfg.cellGroups.back().insert(id_RAM16SDP4);
|
||||
|
||||
// Treat control and constants like IO buffers, because they have only one possible location
|
||||
cfg.ioBufTypes.insert(id_GOWIN_VCC);
|
||||
cfg.ioBufTypes.insert(id_GOWIN_GND);
|
||||
cfg.ioBufTypes.insert(id_PINCFG);
|
||||
cfg.ioBufTypes.insert(id_GSR);
|
||||
}
|
||||
|
||||
|
||||
} // namespace
|
||||
|
||||
NEXTPNR_NAMESPACE_END
|
||||
|
|
|
|||
|
|
@ -509,10 +509,6 @@ def create_nodes(chip: Chip, db: chipdb):
|
|||
for node in nodes:
|
||||
chip.add_node(node)
|
||||
|
||||
# VCC and VSS sources in the all tiles
|
||||
global_nodes.setdefault('GND', []).append(NodeWire(x, y, 'VSS'))
|
||||
global_nodes.setdefault('VCC', []).append(NodeWire(x, y, 'VCC'))
|
||||
|
||||
# add nodes from the apicula db
|
||||
for node_name, node_hdr in db.nodes.items():
|
||||
wire_type, node = node_hdr
|
||||
|
|
|
|||
|
|
@ -1740,6 +1740,7 @@ struct GowinPacker
|
|||
continue;
|
||||
}
|
||||
NetInfo *constnet = net->second.get();
|
||||
constnet->constant_value = (constnet->name == ctx->id("$PACKER_GND")) ? id_VSS : id_VCC;
|
||||
for (auto user : constnet->users) {
|
||||
CellInfo *uc = user.cell;
|
||||
if (is_lut(uc) && (user.port.str(ctx).at(0) == 'I')) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue