mirror of
https://github.com/enjoy-digital/litex.git
synced 2025-01-04 09:52:26 -05:00
test/test_timer: Update.
This commit is contained in:
parent
d11dc0b503
commit
f6b2135cc9
1 changed files with 3 additions and 3 deletions
|
@ -50,14 +50,14 @@ class TestTimer(unittest.TestCase):
|
|||
yield from timer._reload.write(0)
|
||||
yield from timer.ev.enable.write(1)
|
||||
|
||||
self.assertEqual(1, (yield timer.ev.zero.trigger))
|
||||
self.assertEqual(0, (yield timer.ev.zero.trigger))
|
||||
|
||||
yield from timer._en.write(1)
|
||||
|
||||
while (yield timer.ev.zero.trigger != 0) and clock_cycles >= -5:
|
||||
while (yield timer.ev.zero.trigger != 1) and clock_cycles >= -5:
|
||||
yield
|
||||
clock_cycles -= 1
|
||||
self.assertEqual(0, (yield timer.ev.zero.trigger))
|
||||
self.assertEqual(1, (yield timer.ev.zero.trigger))
|
||||
|
||||
timer = Timer()
|
||||
run_simulation(timer, generator(timer))
|
||||
|
|
Loading…
Reference in a new issue