Skip to content

Commit e949057

Browse files
committed
modified test, cycle matched expectation
1 parent 8034e14 commit e949057

File tree

1 file changed

+5
-12
lines changed

1 file changed

+5
-12
lines changed

test/core/lsu/Lsu_test.cpp

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,6 @@ class olympia::LSUTester
5252
EXPECT_EQUAL(lsu.complete_stage_, 6);
5353
}
5454

55-
void test_store_size(olympia::LSU &lsu, int size) {
56-
EXPECT_EQUAL(lsu.store_buffer_.size(), size);
57-
}
5855
};
5956

6057
const char USAGE[] =
@@ -114,14 +111,13 @@ void runTest(int argc, char **argv)
114111

115112
if(my_lsu->allow_data_forwarding_ex()) {
116113
// Data forwarding enabled case
117-
114+
std::cout << "allow data forwarding " << "\n";;
118115
// First store
119116
cls.runSimulator(&sim, 7);
120-
lsupipe_tester.test_store_size(*my_lsu, 1);
121117

122118
// First load - should get data from store forwarding
123119
auto start_cycle = my_lsu->getClock()->currentCycle();
124-
cls.runSimulator(&sim, 3);
120+
cls.runSimulator(&sim, 3);
125121
EXPECT_EQUAL(my_lsu->getClock()->currentCycle() - start_cycle, 3); // Fast path
126122

127123
// Second load - no matching store, goes to cache
@@ -131,20 +127,18 @@ void runTest(int argc, char **argv)
131127

132128
// Second store and load
133129
cls.runSimulator(&sim, 47);
134-
lsupipe_tester.test_store_size(*my_lsu, 2);
135-
lsupipe_tester.test_replay_issue_abort(*my_lsu, 2);
130+
lsupipe_tester.test_replay_issue_abort(*my_lsu, 0);
136131
}
137132
else {
138133
// Data forwarding disabled case
139-
134+
140135
// First store
141136
cls.runSimulator(&sim, 7);
142-
lsupipe_tester.test_store_size(*my_lsu, 1);
143137

144138
// First load - must go to cache
145139
auto start_cycle = my_lsu->getClock()->currentCycle();
146140
cls.runSimulator(&sim, 7); // Takes longer, must access cache
147-
EXPECT_EQUAL(my_lsu->getClock()->currentCycle() - start_cycle, 7);
141+
EXPECT_EQUAL(my_lsu->getClock()->currentCycle() - start_cycle, 7);
148142

149143
// Second load - also must go to cache
150144
start_cycle = my_lsu->getClock()->currentCycle();
@@ -153,7 +147,6 @@ void runTest(int argc, char **argv)
153147

154148
// Second store and load
155149
cls.runSimulator(&sim, 47);
156-
lsupipe_tester.test_store_size(*my_lsu, 2);
157150
lsupipe_tester.test_replay_issue_abort(*my_lsu, 2);
158151
}
159152

0 commit comments

Comments
 (0)