From 3138481df4ce3a969a31d993e572c60fb17e3947 Mon Sep 17 00:00:00 2001 From: Victor Date: Tue, 27 Feb 2024 10:21:16 +0800 Subject: [PATCH 1/6] Support checking illegal pin constraint --- libs/libpcf/src/base/pcf2place.cpp | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/libs/libpcf/src/base/pcf2place.cpp b/libs/libpcf/src/base/pcf2place.cpp index 7895667e7..7b8e7cbd5 100644 --- a/libs/libpcf/src/base/pcf2place.cpp +++ b/libs/libpcf/src/base/pcf2place.cpp @@ -41,6 +41,7 @@ int pcf2place(const PcfData& pcf_data, VTR_LOG("PCF basic check passed\n"); } + std::map> int2extpin; /* Build the I/O place */ for (const PcfIoConstraintId& io_id : pcf_data.io_constraints()) { /* Find the net name */ @@ -102,6 +103,30 @@ int pcf2place(const PcfData& pcf_data, continue; } + size_t lsb = int_pin.get_lsb(); + auto itr = int2extpin.find(lsb); + if (itr == int2extpin.end()) { + int2extpin.insert( + {lsb, std::make_pair(ext_pin.get_name(), ext_pin.get_lsb())}); + } else { + std::string combined_pin_str = ext_pin.get_name(); + size_t pos = combined_pin_str.find_last_of("IN"); + if (std::string::npos != pos) { + combined_pin_str.replace(pos - 1, strlen("IN"), "IN/OUT"); + } else { + pos = combined_pin_str.find_last_of("OUT"); + if (std::string::npos != pos) { + combined_pin_str.replace(pos - 1, strlen("OUT"), "IN/OUT"); + } + } + + VTR_LOG_ERROR( + "Illegal pin constraint: direction conflicted at location (%ld, %ld, " + "%ld) of pin %s.\n", + x, y, z, combined_pin_str.c_str()); + num_err++; + } + /* Add a fixed prefix to net namei, this is hard coded by VPR */ if (IoPinTable::OUTPUT == pin_direction) { net = "out:" + net; From f4658ee67d7440f71e12dfba5fda05a0c6c0c5ce Mon Sep 17 00:00:00 2001 From: Victor Date: Tue, 27 Feb 2024 16:50:00 +0800 Subject: [PATCH 2/6] Support checking illegal pin constraint (Show design pins) --- libs/libpcf/src/base/pcf2place.cpp | 26 +++++++------------------- 1 file changed, 7 insertions(+), 19 deletions(-) diff --git a/libs/libpcf/src/base/pcf2place.cpp b/libs/libpcf/src/base/pcf2place.cpp index 7b8e7cbd5..1c29bbeed 100644 --- a/libs/libpcf/src/base/pcf2place.cpp +++ b/libs/libpcf/src/base/pcf2place.cpp @@ -41,7 +41,7 @@ int pcf2place(const PcfData& pcf_data, VTR_LOG("PCF basic check passed\n"); } - std::map> int2extpin; + std::map int2net; /* Build the I/O place */ for (const PcfIoConstraintId& io_id : pcf_data.io_constraints()) { /* Find the net name */ @@ -104,26 +104,14 @@ int pcf2place(const PcfData& pcf_data, } size_t lsb = int_pin.get_lsb(); - auto itr = int2extpin.find(lsb); - if (itr == int2extpin.end()) { - int2extpin.insert( - {lsb, std::make_pair(ext_pin.get_name(), ext_pin.get_lsb())}); + auto itr = int2net.find(lsb); + if (itr == int2net.end()) { + int2net.insert({lsb, net}); } else { - std::string combined_pin_str = ext_pin.get_name(); - size_t pos = combined_pin_str.find_last_of("IN"); - if (std::string::npos != pos) { - combined_pin_str.replace(pos - 1, strlen("IN"), "IN/OUT"); - } else { - pos = combined_pin_str.find_last_of("OUT"); - if (std::string::npos != pos) { - combined_pin_str.replace(pos - 1, strlen("OUT"), "IN/OUT"); - } - } - VTR_LOG_ERROR( - "Illegal pin constraint: direction conflicted at location (%ld, %ld, " - "%ld) of pin %s.\n", - x, y, z, combined_pin_str.c_str()); + "Illegal pin constraint: FPGA IO pin is assigned to two design pins: " + "%s and %s.\n", + itr->second.c_str(), net.c_str()); num_err++; } From d2a8213566cbd57b815e3f05a6a0068f7358706d Mon Sep 17 00:00:00 2001 From: Victor Date: Wed, 28 Feb 2024 11:23:03 +0800 Subject: [PATCH 3/6] Support checking illegal pin constraint (optimize and add comments) --- libs/libpcf/src/base/pcf2place.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/libs/libpcf/src/base/pcf2place.cpp b/libs/libpcf/src/base/pcf2place.cpp index 1c29bbeed..3f5507736 100644 --- a/libs/libpcf/src/base/pcf2place.cpp +++ b/libs/libpcf/src/base/pcf2place.cpp @@ -41,7 +41,8 @@ int pcf2place(const PcfData& pcf_data, VTR_LOG("PCF basic check passed\n"); } - std::map int2net; + /* Map from internal pin lsb to net */ + std::map net_map; /* Build the I/O place */ for (const PcfIoConstraintId& io_id : pcf_data.io_constraints()) { /* Find the net name */ @@ -104,15 +105,16 @@ int pcf2place(const PcfData& pcf_data, } size_t lsb = int_pin.get_lsb(); - auto itr = int2net.find(lsb); - if (itr == int2net.end()) { - int2net.insert({lsb, net}); + auto itr = net_map.find(lsb); + if (itr == net_map.end()) { + net_map.insert({lsb, net}); } else { VTR_LOG_ERROR( "Illegal pin constraint: FPGA IO pin is assigned to two design pins: " "%s and %s.\n", itr->second.c_str(), net.c_str()); num_err++; + continue; } /* Add a fixed prefix to net namei, this is hard coded by VPR */ From 39a012b939aaf2c89ab0b85d18ec90fb07f2c445 Mon Sep 17 00:00:00 2001 From: Victor Date: Mon, 4 Mar 2024 12:41:19 +0800 Subject: [PATCH 4/6] Support checking illegal pin constraint (use loc as key and update message format) --- libs/libpcf/src/base/pcf2place.cpp | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/libs/libpcf/src/base/pcf2place.cpp b/libs/libpcf/src/base/pcf2place.cpp index 3f5507736..539aa0a37 100644 --- a/libs/libpcf/src/base/pcf2place.cpp +++ b/libs/libpcf/src/base/pcf2place.cpp @@ -41,8 +41,8 @@ int pcf2place(const PcfData& pcf_data, VTR_LOG("PCF basic check passed\n"); } - /* Map from internal pin lsb to net */ - std::map net_map; + /* Map from location to net */ + std::map, std::string> net_map; /* Build the I/O place */ for (const PcfIoConstraintId& io_id : pcf_data.io_constraints()) { /* Find the net name */ @@ -104,15 +104,16 @@ int pcf2place(const PcfData& pcf_data, continue; } - size_t lsb = int_pin.get_lsb(); - auto itr = net_map.find(lsb); + std::array loc = {x, y, z}; + auto itr = net_map.find(loc); if (itr == net_map.end()) { - net_map.insert({lsb, net}); + net_map.insert({loc, net}); } else { VTR_LOG_ERROR( - "Illegal pin constraint: FPGA IO pin is assigned to two design pins: " - "%s and %s.\n", - itr->second.c_str(), net.c_str()); + "Illegal pin constraint: Two nets '%s' and '%s' are mapped to the I/O " + "pin '%s[%lu]' which belongs to the same coordinate (%ld, %ld, %ld)!\n", + itr->second.c_str(), net.c_str(), int_pin.get_name().c_str(), + int_pin.get_lsb(), x, y, z); num_err++; continue; } From ec12f5ad4612a2970faa4cc26ea3af8d59391701 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 5 Mar 2024 07:56:36 +0000 Subject: [PATCH 5/6] Bump yosys from `91fbd58` to `1e42b4f` Bumps [yosys](https://github.com/YosysHQ/yosys) from `91fbd58` to `1e42b4f`. - [Release notes](https://github.com/YosysHQ/yosys/releases) - [Commits](https://github.com/YosysHQ/yosys/compare/91fbd58980e87ad5dc0a5d37c049ffaf5ab243dd...1e42b4f0f9cc1d2f4097ea632a93be3473b0c2f7) --- updated-dependencies: - dependency-name: yosys dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- yosys | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yosys b/yosys index 91fbd5898..1e42b4f0f 160000 --- a/yosys +++ b/yosys @@ -1 +1 @@ -Subproject commit 91fbd58980e87ad5dc0a5d37c049ffaf5ab243dd +Subproject commit 1e42b4f0f9cc1d2f4097ea632a93be3473b0c2f7 From 08213ff70937dac9b7f60e2fd24c2ca008104f00 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 6 Mar 2024 00:02:18 +0000 Subject: [PATCH 6/6] Updated Patch Count --- VERSION.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION.md b/VERSION.md index 2b32c3b22..fa03a9bc0 100644 --- a/VERSION.md +++ b/VERSION.md @@ -1 +1 @@ -1.2.1947 +1.2.1957