Resolve feedback
This commit is contained in:
parent
b8f58d558c
commit
189164e7c8
@ -24,7 +24,7 @@
|
||||
|
||||
NEXTPNR_NAMESPACE_BEGIN
|
||||
|
||||
using mistral::CycloneV;
|
||||
using namespace mistral;
|
||||
|
||||
Arch::Arch(ArchArgs args)
|
||||
{
|
||||
@ -66,7 +66,7 @@ BelId Arch::getBelByName(IdString name) const
|
||||
int x = 0, y = 0, z = 0;
|
||||
BelId bel;
|
||||
|
||||
sscanf(name.c_str(this), "%s.%d.%d.%d", bel_type_str, &x, &y, &z);
|
||||
sscanf(name.c_str(this), "%25s.%d.%d.%d", bel_type_str, &x, &y, &z);
|
||||
|
||||
auto bel_type = cyclonev->block_type_lookup(std::string{bel_type_str});
|
||||
|
||||
@ -82,7 +82,7 @@ IdString Arch::getBelName(BelId bel) const
|
||||
|
||||
int x = CycloneV::pos2x(bel.pos);
|
||||
int y = CycloneV::pos2y(bel.pos);
|
||||
int z = bel.pos & 0xFF;
|
||||
int z = bel.z & 0xFF;
|
||||
int bel_type = bel.z >> 8;
|
||||
|
||||
snprintf(bel_str, 80, "%s.%03d.%03d.%03d", cyclonev->block_type_names[bel_type], x, y, z);
|
||||
|
@ -107,9 +107,9 @@ struct Arch : BaseCtx
|
||||
WireId getPipSrcWire(PipId pip) const;
|
||||
WireId getPipDstWire(PipId pip) const;
|
||||
DelayInfo getPipDelay(PipId pip) const;
|
||||
const std::vector<BelPin> &getPipsDownhill(WireId wire) const;
|
||||
const std::vector<BelPin> &getPipsUphill(WireId wire) const;
|
||||
const std::vector<BelPin> &getWireAliases(WireId wire) const;
|
||||
const std::vector<PipId> &getPipsDownhill(WireId wire) const;
|
||||
const std::vector<PipId> &getPipsUphill(WireId wire) const;
|
||||
const std::vector<PipId> &getWireAliases(WireId wire) const;
|
||||
BelId getPackagePinBel(const std::string &pin) const;
|
||||
std::string getBelPackagePin(BelId bel) const;
|
||||
|
||||
|
@ -119,7 +119,7 @@ NEXTPNR_NAMESPACE_END
|
||||
namespace std {
|
||||
template <> struct hash<NEXTPNR_NAMESPACE_PREFIX BelId>
|
||||
{
|
||||
std::size_t operator()(const NEXTPNR_NAMESPACE_PREFIX BelId &bel) const noexcept { return hash<int>()(bel.index); }
|
||||
std::size_t operator()(const NEXTPNR_NAMESPACE_PREFIX BelId &bel) const noexcept { return hash<uint32_t>()((static_cast<uint32_t>(bel.pos) << 16) | bel.z); }
|
||||
};
|
||||
|
||||
template <> struct hash<NEXTPNR_NAMESPACE_PREFIX WireId>
|
||||
|
Loading…
Reference in New Issue
Block a user