From 82ec1be31f2a13bca04cf1a6b69789c9cee0e535 Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Sat, 23 Jun 2018 14:32:18 +0200 Subject: Added BUILD_GUI, BUILD_PYTHON and BUILD_TESTS cmake options, --- tests/ice40/lp384.cc | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) (limited to 'tests/ice40/lp384.cc') diff --git a/tests/ice40/lp384.cc b/tests/ice40/lp384.cc index 77b82951..f54683f6 100644 --- a/tests/ice40/lp384.cc +++ b/tests/ice40/lp384.cc @@ -9,23 +9,23 @@ class LP384Test : public ::testing::Test protected: virtual void SetUp() { - chipArgs.type = ChipArgs::LP384; + chipArgs.type = ArchArgs::LP384; chipArgs.package = "qn32"; - design = new Design(chipArgs); + ctx = new Context(chipArgs); } - virtual void TearDown() { delete design; } + virtual void TearDown() { delete ctx; } - ChipArgs chipArgs; - Design *design; + ArchArgs chipArgs; + Context *ctx; }; TEST_F(LP384Test, bel_names) { int bel_count = 0; - for (auto bel : design->chip.getBels()) { - auto name = design->chip.getBelName(bel); - ASSERT_EQ(bel, design->chip.getBelByName(name)); + for (auto bel : ctx->getBels()) { + auto name = ctx->getBelName(bel); + ASSERT_EQ(bel, ctx->getBelByName(name)); bel_count++; } ASSERT_EQ(bel_count, 440); @@ -34,9 +34,9 @@ TEST_F(LP384Test, bel_names) TEST_F(LP384Test, wire_names) { int wire_count = 0; - for (auto wire : design->chip.getWires()) { - auto name = design->chip.getWireName(wire); - assert(wire == design->chip.getWireByName(name)); + for (auto wire : ctx->getWires()) { + auto name = ctx->getWireName(wire); + assert(wire == ctx->getWireByName(name)); wire_count++; } ASSERT_EQ(wire_count, 8294); @@ -45,9 +45,9 @@ TEST_F(LP384Test, wire_names) TEST_F(LP384Test, pip_names) { int pip_count = 0; - for (auto pip : design->chip.getPips()) { - auto name = design->chip.getPipName(pip); - assert(pip == design->chip.getPipByName(name)); + for (auto pip : ctx->getPips()) { + auto name = ctx->getPipName(pip); + assert(pip == ctx->getPipByName(name)); pip_count++; } ASSERT_EQ(pip_count, 86864); @@ -55,11 +55,11 @@ TEST_F(LP384Test, pip_names) TEST_F(LP384Test, uphill_to_downhill) { - for (auto dst : design->chip.getWires()) { - for (auto uphill_pip : design->chip.getPipsUphill(dst)) { + for (auto dst : ctx->getWires()) { + for (auto uphill_pip : ctx->getPipsUphill(dst)) { bool found_downhill = false; - for (auto downhill_pip : design->chip.getPipsDownhill( - design->chip.getPipSrcWire(uphill_pip))) { + for (auto downhill_pip : ctx->getPipsDownhill( + ctx->getPipSrcWire(uphill_pip))) { if (uphill_pip == downhill_pip) { ASSERT_FALSE(found_downhill); found_downhill = true; @@ -72,11 +72,11 @@ TEST_F(LP384Test, uphill_to_downhill) TEST_F(LP384Test, downhill_to_uphill) { - for (auto dst : design->chip.getWires()) { - for (auto downhill_pip : design->chip.getPipsDownhill(dst)) { + for (auto dst : ctx->getWires()) { + for (auto downhill_pip : ctx->getPipsDownhill(dst)) { bool found_uphill = false; - for (auto uphill_pip : design->chip.getPipsUphill( - design->chip.getPipDstWire(downhill_pip))) { + for (auto uphill_pip : ctx->getPipsUphill( + ctx->getPipDstWire(downhill_pip))) { if (uphill_pip == downhill_pip) { ASSERT_FALSE(found_uphill); found_uphill = true; -- cgit v1.2.3