Use site x location to determine if it is one block or other

This commit is contained in:
Miodrag Milanovic 2018-11-29 21:12:56 +01:00 committed by Eddie Hung
parent 9f03d9eed3
commit 535fc953d4

View File

@ -80,9 +80,10 @@ TorcInfo::TorcInfo(BaseCtx *ctx, const std::string &inDeviceName, const std::str
bel_to_site_index.push_back(i);
site_index_to_type[i] = id_SLICE_LUT6;
const auto site_name = site.getName();
const auto site_name_back = site_name.back();
if (site_name_back == '0' || site_name_back == '2' || site_name_back == '4' || site_name_back == '6' ||
site_name_back == '8') {
if (!boost::regex_match(site_name.c_str(), what, re_loc))
throw;
const auto sx = boost::lexical_cast<int>(what.str(1));
if ((sx & 1) == 0) {
bel_to_loc.emplace_back(x, y, 0);
bel_to_loc.emplace_back(x, y, 1);
bel_to_loc.emplace_back(x, y, 2);