diff options
author | Dan Ravensloft <dan.ravensloft@gmail.com> | 2021-01-06 18:07:59 +0000 |
---|---|---|
committer | gatecat <gatecat@ds0.me> | 2021-05-15 14:54:33 +0100 |
commit | 189164e7c8a862aad7b7a2b57e1ad3b729f47775 (patch) | |
tree | a00e867827dbc394e6482697ffe8075488f18e60 /cyclonev/arch.cc | |
parent | b8f58d558c3472280cb618343ddd8857c4073d20 (diff) | |
download | nextpnr-189164e7c8a862aad7b7a2b57e1ad3b729f47775.tar.gz nextpnr-189164e7c8a862aad7b7a2b57e1ad3b729f47775.tar.bz2 nextpnr-189164e7c8a862aad7b7a2b57e1ad3b729f47775.zip |
Resolve feedback
Diffstat (limited to 'cyclonev/arch.cc')
-rw-r--r-- | cyclonev/arch.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cyclonev/arch.cc b/cyclonev/arch.cc index 41c39876..f5dd35eb 100644 --- a/cyclonev/arch.cc +++ b/cyclonev/arch.cc @@ -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); |