aboutsummaryrefslogtreecommitdiffstats
path: root/ice40/main.cc
diff options
context:
space:
mode:
authorMiodrag Milanovic <mmicko@gmail.com>2018-06-12 20:39:20 +0200
committerMiodrag Milanovic <mmicko@gmail.com>2018-06-12 20:39:20 +0200
commitb7c747f15bcad48f4e1b82704bc9d00c28b9d62d (patch)
treec8113d93b00d5661b76096e7a2859f5af8605ebc /ice40/main.cc
parent9953012154f18ea51ff9216529089715ba79fb41 (diff)
downloadnextpnr-b7c747f15bcad48f4e1b82704bc9d00c28b9d62d.tar.gz
nextpnr-b7c747f15bcad48f4e1b82704bc9d00c28b9d62d.tar.bz2
nextpnr-b7c747f15bcad48f4e1b82704bc9d00c28b9d62d.zip
Write tests to replace -test option from main
Diffstat (limited to 'ice40/main.cc')
-rw-r--r--ice40/main.cc61
1 files changed, 0 insertions, 61 deletions
diff --git a/ice40/main.cc b/ice40/main.cc
index c89079cf..6bda4d78 100644
--- a/ice40/main.cc
+++ b/ice40/main.cc
@@ -65,7 +65,6 @@ int main(int argc, char *argv[])
po::options_description options("Allowed options");
options.add_options()("help,h", "show help");
- options.add_options()("test", "just a check");
options.add_options()("gui", "start gui");
options.add_options()("svg", "dump SVG file");
options.add_options()("pack", "pack design prior to place and route");
@@ -177,66 +176,6 @@ int main(int argc, char *argv[])
python_export_global("design", design);
python_export_global("chip", design.chip);
- if (vm.count("test")) {
- int bel_count = 0, wire_count = 0, pip_count = 0;
-
- std::cout << "Checking bel names.\n";
- for (auto bel : design.chip.getBels()) {
- auto name = design.chip.getBelName(bel);
- assert(bel == design.chip.getBelByName(name));
- bel_count++;
- }
- std::cout << " checked " << bel_count << " bels.\n";
-
- std::cout << "Checking wire names.\n";
- for (auto wire : design.chip.getWires()) {
- auto name = design.chip.getWireName(wire);
- assert(wire == design.chip.getWireByName(name));
- wire_count++;
- }
- std::cout << " checked " << wire_count << " wires.\n";
-
- std::cout << "Checking pip names.\n";
- for (auto pip : design.chip.getPips()) {
- auto name = design.chip.getPipName(pip);
- assert(pip == design.chip.getPipByName(name));
- pip_count++;
- }
- std::cout << " checked " << pip_count << " pips.\n";
-
- std::cout << "Checking uphill -> downhill consistency.\n";
- for (auto dst : design.chip.getWires()) {
- for (auto uphill_pip : design.chip.getPipsUphill(dst)) {
- bool found_downhill = false;
- for (auto downhill_pip : design.chip.getPipsDownhill(
- design.chip.getPipSrcWire(uphill_pip))) {
- if (uphill_pip == downhill_pip) {
- assert(!found_downhill);
- found_downhill = true;
- }
- }
- assert(found_downhill);
- }
- }
-
- std::cout << "Checking downhill -> uphill consistency.\n";
- for (auto dst : design.chip.getWires()) {
- for (auto downhill_pip : design.chip.getPipsDownhill(dst)) {
- bool found_uphill = false;
- for (auto uphill_pip : design.chip.getPipsUphill(
- design.chip.getPipDstWire(downhill_pip))) {
- if (uphill_pip == downhill_pip) {
- assert(!found_uphill);
- found_uphill = true;
- }
- }
- assert(found_uphill);
- }
- }
-
- return 0;
- }
-
if (vm.count("svg")) {
std::cout << "<svg xmlns=\"http://www.w3.org/2000/svg\" "
"xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n";