diff --git a/src/test/cpp/regression/main.cpp b/src/test/cpp/regression/main.cpp index 1714946..421a433 100644 --- a/src/test/cpp/regression/main.cpp +++ b/src/test/cpp/regression/main.cpp @@ -3443,7 +3443,7 @@ string freeRtosTests[] = { // "test1","test1","test1","test1","test1","test1","test1","test1" "AltQTest", "AltBlock", "AltPollQ", "blocktim", "countsem", "dead", "EventGroupsDemo", "flop", "integer", "QPeek", - "QueueSet", "recmutex", "semtest", "TaskNotify", "BlockQ", "crhook", "dynamic", + "QueueSet", "recmutex", "semtest", "TaskNotify", "crhook", "dynamic", "GenQTest", "PollQ", "QueueOverwrite", "QueueSetPolling", "sp_flop", "test1" //"BlockQ","BlockQ","BlockQ","BlockQ","BlockQ","BlockQ","BlockQ","BlockQ" // "flop" @@ -3625,14 +3625,18 @@ static void multiThreading(queue> *lambdas, std::mutex *mu static void multiThreadedExecute(queue> &lambdas){ - std::mutex mutex; - std::thread * t[THREAD_COUNT]; - for(int id = 0;id < THREAD_COUNT;id++){ - t[id] = new thread(multiThreading,&lambdas,&mutex); - } - for(int id = 0;id < THREAD_COUNT;id++){ - t[id]->join(); - delete t[id]; + std::mutex mutex; + if(THREAD_COUNT == 1){ + multiThreading(&lambdas, &mutex); + } else { + std::thread * t[THREAD_COUNT]; + for(int id = 0;id < THREAD_COUNT;id++){ + t[id] = new thread(multiThreading,&lambdas,&mutex); + } + for(int id = 0;id < THREAD_COUNT;id++){ + t[id]->join(); + delete t[id]; + } } } diff --git a/src/test/scala/vexriscv/TestIndividualFeatures.scala b/src/test/scala/vexriscv/TestIndividualFeatures.scala index 93353f0..e397a67 100644 --- a/src/test/scala/vexriscv/TestIndividualFeatures.scala +++ b/src/test/scala/vexriscv/TestIndividualFeatures.scala @@ -561,17 +561,7 @@ class TestIndividualFeatures extends FunSuite { new MmuDimension ) - -// def genDefaultsPositions(dims : Seq[VexRiscvDimension], stack : List[VexRiscvPosition] = Nil) : Seq[List[VexRiscvPosition]] = dims match { -// case head :: tail => head.default.flatMap(p => genDefaultsPositions(tail, p :: stack)) -// case Nil => List(stack) -// } - -// val usedPositions = mutable.HashSet[VexRiscvPosition](); -// val positionsCount = dimensions.map(d => d.positions.length).sum - def doTest(positionsToApply : List[VexRiscvPosition], prefix : String = "", testSeed : Int, universes : mutable.HashSet[VexRiscvUniverse]): Unit ={ -// usedPositions ++= positionsToApply val noMemory = universes.contains(VexRiscvUniverse.NO_MEMORY) val noWriteback = universes.contains(VexRiscvUniverse.NO_WRITEBACK) def gen = { @@ -606,8 +596,6 @@ class TestIndividualFeatures extends FunSuite { } } -// dimensions.foreach(d => d.positions.foreach(p => p.dimension = d)) - val testId : Option[mutable.HashSet[Int]] = None val seed = sys.env.getOrElse("VEXRISCV_REGRESSION_SEED", Random.nextLong().toString).toLong @@ -655,31 +643,4 @@ class TestIndividualFeatures extends FunSuite { doTest(positions," random_" + i + "_", testSeed, universe) Hack.dCounter += 1 } - -// println(s"${usedPositions.size}/$positionsCount positions") - -// for (dimension <- dimensions) { -// for (position <- dimension.positions/* if position.name.contains("Cached")*/) { -// for(defaults <- genDefaultsPositions(dimensions.filter(_ != dimension))){ -// doTest(position :: defaults) -// } -// } -// } -} - - - -/* -val seed = -2412372746600605141l - -129 -FAIL AltQTest_rv32i_O3 -FAIL AltQTest_rv32ic_O3 -FAIL GenQTest_rv32i_O0 - -134 -FAIL AltQTest_rv32i_O3 - - val seed = 4331444545509090137l -1 => flops i O0 - */ \ No newline at end of file +} \ No newline at end of file