From: Luke Kenneth Casson Leighton Date: Wed, 1 Dec 2021 13:43:51 +0000 (+0000) Subject: add a proper twin addi regression which tests ReservationStations X-Git-Tag: sv_maxu_works-initial~681 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4328f255d67d40ce7caef6b42799bcab2ec5a733;p=openpower-isa.git add a proper twin addi regression which tests ReservationStations increase number of operations in hazard random test to 20 --- 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) +