ecp5: Architecture testing and fixing
Signed-off-by: David Shah <davey1576@gmail.com>
This commit is contained in:
parent
974ca143e8
commit
3931c84fed
@ -202,6 +202,9 @@ BelRange Arch::getBelsByTile(int x, int y) const
|
||||
br.e.cursor_index = chip_info->locations[chip_info->location_type[br.b.cursor_tile]].num_bels - 1;
|
||||
br.b.chip = chip_info;
|
||||
br.e.chip = chip_info;
|
||||
if (br.e.cursor_index == -1)
|
||||
++br.e.cursor_index;
|
||||
else
|
||||
++br.e;
|
||||
return br;
|
||||
}
|
||||
@ -278,6 +281,7 @@ PipId Arch::getPipByName(IdString name) const
|
||||
Location loc;
|
||||
std::string basename;
|
||||
std::tie(loc.x, loc.y, basename) = split_identifier_name(name.str(this));
|
||||
ret.location = loc;
|
||||
const LocationTypePOD *loci = locInfo(ret);
|
||||
for (int i = 0; i < loci->num_pips; i++) {
|
||||
PipId curr;
|
||||
@ -285,6 +289,8 @@ PipId Arch::getPipByName(IdString name) const
|
||||
curr.index = i;
|
||||
pip_by_name[getPipName(curr)] = curr;
|
||||
}
|
||||
if (pip_by_name.find(name) == pip_by_name.end())
|
||||
NPNR_ASSERT_FALSE_STR("no pip named " + name.str(this));
|
||||
return pip_by_name[name];
|
||||
}
|
||||
|
||||
|
@ -63,6 +63,7 @@ int main(int argc, char *argv[])
|
||||
#ifndef NO_GUI
|
||||
options.add_options()("gui", "start gui");
|
||||
#endif
|
||||
options.add_options()("test", "check architecture database integrity");
|
||||
|
||||
options.add_options()("25k", "set device type to LFE5U-25F");
|
||||
options.add_options()("45k", "set device type to LFE5U-45F");
|
||||
@ -148,6 +149,9 @@ int main(int argc, char *argv[])
|
||||
if (vm.count("no-tmdriv"))
|
||||
ctx->timing_driven = false;
|
||||
|
||||
if (vm.count("test"))
|
||||
ctx->archcheck();
|
||||
|
||||
#ifndef NO_GUI
|
||||
if (vm.count("gui")) {
|
||||
Application a(argc, argv);
|
||||
|
Loading…
Reference in New Issue
Block a user