Remove methods
This commit is contained in:
parent
a0b6d3b19b
commit
662733c171
13
xc7/arch.cc
13
xc7/arch.cc
@ -37,6 +37,8 @@ TorcInfo::TorcInfo(Arch *ctx, const std::string &inDeviceName, const std::string
|
|||||||
: ddb(new DDB(inDeviceName, inPackageName)), sites(ddb->getSites()), tiles(ddb->getTiles()),
|
: ddb(new DDB(inDeviceName, inPackageName)), sites(ddb->getSites()), tiles(ddb->getTiles()),
|
||||||
segments(ddb->getSegments())
|
segments(ddb->getSegments())
|
||||||
{
|
{
|
||||||
|
static const boost::regex re_loc(".+_X(\\d+)Y(\\d+)");
|
||||||
|
boost::cmatch what;
|
||||||
bel_to_site_index.reserve(sites.getSiteCount() * 4);
|
bel_to_site_index.reserve(sites.getSiteCount() * 4);
|
||||||
bel_to_loc.reserve(sites.getSiteCount() * 4);
|
bel_to_loc.reserve(sites.getSiteCount() * 4);
|
||||||
site_index_to_bel.resize(sites.getSiteCount());
|
site_index_to_bel.resize(sites.getSiteCount());
|
||||||
@ -47,10 +49,12 @@ TorcInfo::TorcInfo(Arch *ctx, const std::string &inDeviceName, const std::string
|
|||||||
const auto &site = sites.getSite(i);
|
const auto &site = sites.getSite(i);
|
||||||
const auto &pd = site.getPrimitiveDefPtr();
|
const auto &pd = site.getPrimitiveDefPtr();
|
||||||
const auto &type = pd->getName();
|
const auto &type = pd->getName();
|
||||||
const auto &tile_info = tiles.getTileInfo(site.getTileIndex());
|
const auto &tileInfo = tiles.getTileInfo(site.getTileIndex());
|
||||||
const auto x = (tile_info.getCol() + 1) /
|
if (!boost::regex_match(tileInfo.getName(), what, re_loc))
|
||||||
2; // Divide by 2 because XDL coordinate space counts the INT tiles between CLBs
|
throw;
|
||||||
const auto y = tile_info.getRow();
|
const auto x = boost::lexical_cast<int>(what.str(1));
|
||||||
|
const auto y = boost::lexical_cast<int>(what.str(2));
|
||||||
|
|
||||||
if (type == "SLICEL" || type == "SLICEM") {
|
if (type == "SLICEL" || type == "SLICEM") {
|
||||||
bel_to_site_index.push_back(i);
|
bel_to_site_index.push_back(i);
|
||||||
bel_to_site_index.push_back(i);
|
bel_to_site_index.push_back(i);
|
||||||
@ -104,7 +108,6 @@ TorcInfo::TorcInfo(Arch *ctx, const std::string &inDeviceName, const std::string
|
|||||||
const boost::regex gclk("GCLK_(L_)?B\\d+(_EAST|_WEST)?");
|
const boost::regex gclk("GCLK_(L_)?B\\d+(_EAST|_WEST)?");
|
||||||
std::unordered_map</*TileTypeIndex*/ unsigned, std::vector<delay_t>> delay_lookup;
|
std::unordered_map</*TileTypeIndex*/ unsigned, std::vector<delay_t>> delay_lookup;
|
||||||
Tilewire currentTilewire;
|
Tilewire currentTilewire;
|
||||||
boost::cmatch what;
|
|
||||||
WireId w;
|
WireId w;
|
||||||
w.index = 0;
|
w.index = 0;
|
||||||
for (TileIndex tileIndex(0); tileIndex < tiles.getTileCount(); tileIndex++) {
|
for (TileIndex tileIndex(0); tileIndex < tiles.getTileCount(); tileIndex++) {
|
||||||
|
18
xc7/arch.h
18
xc7/arch.h
@ -320,24 +320,6 @@ struct TorcInfo
|
|||||||
std::vector<Arc> pip_to_arc;
|
std::vector<Arc> pip_to_arc;
|
||||||
int num_pips;
|
int num_pips;
|
||||||
std::vector<int> pip_to_dst_wire;
|
std::vector<int> pip_to_dst_wire;
|
||||||
|
|
||||||
private:
|
|
||||||
void _construct();
|
|
||||||
static std::vector<SiteIndex> construct_bel_to_site_index(Arch *ctx, const Sites &sites);
|
|
||||||
static std::vector<BelId> construct_site_index_to_bel(Arch *ctx, const Sites &sites,
|
|
||||||
const std::vector<SiteIndex> &bel_to_site_index);
|
|
||||||
static std::vector<IdString> construct_site_index_to_type(Arch *ctx, const Sites &sites);
|
|
||||||
static std::vector<Loc> construct_bel_to_loc(const Sites &sites, const Tiles &tiles, const int num_bels,
|
|
||||||
const std::vector<IdString> &site_index_to_type);
|
|
||||||
static std::vector<Tilewire>
|
|
||||||
construct_wire_to_tilewire(const Segments &segments, const Tiles &tiles,
|
|
||||||
std::unordered_map<Segments::SegmentReference, int> &segment_to_wire,
|
|
||||||
std::unordered_map<Tilewire, int> &trivial_to_wire);
|
|
||||||
static std::vector<DelayInfo>
|
|
||||||
construct_wire_to_delay(const Tiles &tiles, const std::vector<Tilewire> &wire_to_tilewire, const DDB &ddb);
|
|
||||||
static std::vector<Arc> construct_pip_to_arc(const std::vector<Tilewire> &wire_to_tilewire, const DDB &ddb,
|
|
||||||
std::vector<std::vector<int>> &wire_to_pips_uphill,
|
|
||||||
std::vector<std::vector<int>> &wire_to_pips_downhill);
|
|
||||||
};
|
};
|
||||||
extern std::unique_ptr<const TorcInfo> torc_info;
|
extern std::unique_ptr<const TorcInfo> torc_info;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user