Skip to content

Commit 71c1512

Browse files
committed
inverted clock; bugfix; rename
1 parent 7c33990 commit 71c1512

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

include/althas/althas.hpp

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -127,23 +127,23 @@ class TESTBENCH {
127127
virtual void tick() {
128128
d_tickcount++;
129129
#ifdef CLOCK_LINE_ENABLED
130-
DUT->CLOCK_WIRE = 0;
130+
DUT->CLOCK_WIRE = 1;
131131
#endif
132132
eval();
133-
if (d_trace) d_trace->dump(10 * d_tickcount - 2);
133+
if (d_trace) d_trace->dump(10 * d_tickcount - 5);
134134

135135
#ifdef CLOCK_LINE_ENABLED
136-
DUT->CLOCK_WIRE = 1;
136+
DUT->CLOCK_WIRE = 0;
137137
#endif
138138
eval();
139139
if (d_trace) d_trace->dump(10 * d_tickcount);
140140

141141
#ifdef CLOCK_LINE_ENABLED
142-
DUT->CLOCK_WIRE = 0;
142+
DUT->CLOCK_WIRE = 1;
143143
#endif
144144
eval();
145145
if (d_trace) {
146-
d_trace->dump(10 * d_tickcount + 5);
146+
// d_trace->dump(10 * d_tickcount + 5);
147147
d_trace->flush();
148148
}
149149
}
@@ -285,13 +285,13 @@ class TESTER : protected TESTBENCH<DEVICE> {
285285

286286
~TESTER() { delete d_printer; }
287287

288-
virtual void beforeTraceStarts() {};
288+
virtual void beforeStart() {};
289289

290290
virtual void beforeAll() {};
291291

292292
virtual void afterAll() {};
293293

294-
virtual void afterTraceEnds() {};
294+
virtual void afterEnd() {};
295295

296296
virtual void beforeEach(TESTCASE testcase, TPRINTER *t) {};
297297

@@ -301,10 +301,9 @@ class TESTER : protected TESTBENCH<DEVICE> {
301301

302302
void run() {
303303
setColor(ForegroundColor::UNSPECIFIED, BackgroundColor::UNSPECIFIED, Effect::BOLD);
304-
std::cout << "[ now test " << SUPER::name() << " with " << d_testcases.size() << " test case(s) ]"
305-
<< std::endl;
304+
std::cout << "[ now test " << SUPER::name() << " with " << d_testcases.size() << " test case(s) ]" << std::endl;
306305
resetColor();
307-
beforeTraceStarts();
306+
beforeStart();
308307

309308
d_printer->increaseIndent();
310309
this->start_trace(d_vcdname.c_str());
@@ -321,7 +320,7 @@ class TESTER : protected TESTBENCH<DEVICE> {
321320
this->stop_trace();
322321
d_printer->decreaseIndent();
323322

324-
afterTraceEnds();
323+
afterEnd();
325324

326325
setColor(ForegroundColor::UNSPECIFIED, BackgroundColor::UNSPECIFIED, Effect::BOLD);
327326
std::cout << "[ test " << SUPER::name() << " finished ]" << std::endl;

0 commit comments

Comments
 (0)