From 4328f255d67d40ce7caef6b42799bcab2ec5a733 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Wed, 1 Dec 2021 13:43:51 +0000 Subject: [PATCH] add a proper twin addi regression which tests ReservationStations increase number of operations in hazard random test to 20 --- src/openpower/test/general/overlap_hazards.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/openpower/test/general/overlap_hazards.py b/src/openpower/test/general/overlap_hazards.py index 24cd6903..50f54fe6 100644 --- a/src/openpower/test/general/overlap_hazards.py +++ b/src/openpower/test/general/overlap_hazards.py @@ -187,7 +187,7 @@ class RandomHazardTestCase(TestAccumulatorBase): selection_1 = ['mulli', 'addi'] selection_2 = ['mullw', 'add'] rrange = 8 - n_ops = 10 + n_ops = 20 lst = [] for i in range(n_ops): if random.randint(0, 1) == 0: @@ -208,8 +208,16 @@ class RandomHazardTestCase(TestAccumulatorBase): initial_regs[i] = random.randint(-20, +20) self.add_case(Program(lst, bigendian), initial_regs) - def case_regression(self): + def case_twin_addi_regression(self): + """twin addi instruction with double-dependencies. + useful for testing ReservationStations + """ lst = ['addi 1,8,14', 'addi 3,0,5', 'mulli 1,3,-11' ] + initial_regs = [0] * 32 + for i in range(10): + initial_regs[i] = i + self.add_case(Program(lst, bigendian), initial_regs) + -- 2.30.2