Skip to content

Commit

Permalink
Fix FIFO 3bit counter test.
Browse files Browse the repository at this point in the history
  • Loading branch information
mbtaylor1982 committed Oct 20, 2024
1 parent e46df5f commit 72cd487
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions RTL/cocotb/cocotb_fifo_3bit_cntr.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import cocotb
from cocotb.clock import Clock
from cocotb.triggers import RisingEdge
from cocotb.triggers import RisingEdge, ClockCycles
from cocotb.types import LogicArray

@cocotb.test()
Expand All @@ -21,14 +21,14 @@ async def fifo_3bit_cntr_test(dut):
# Start the clock. Start it low to avoid issues on the first RisingEdge
cocotb.start_soon(clock.start(start_high=False))

await RisingEdge(dut.CLK)
await ClockCycles(dut.CLK, 2, True)
assert dut.COUNT.value == 0, "Count was not reset to zero when RST_ = 0"
dut.RST_.value = 1

await RisingEdge(dut.CLK)
await ClockCycles(dut.CLK, 2, True)
assert dut.COUNT.value == 0, "Count incremented with clk edge when CLKEN = 0"

dut.ClKEN.value = 1
dut.ClKEN.value = 1

for i in range(0,8):
await RisingEdge(dut.CLK)
Expand Down

0 comments on commit 72cd487

Please sign in to comment.