Get it to ACTUALLY compile :)
This commit is contained in:
34
sim/application_wrapper/cache/application_wrapper_cache_top_test.py
vendored
Normal file
34
sim/application_wrapper/cache/application_wrapper_cache_top_test.py
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
import cocotb
|
||||
from cocotb.handle import Immediate
|
||||
|
||||
|
||||
from cocotb.clock import Clock
|
||||
from cocotb.triggers import Timer, RisingEdge
|
||||
|
||||
|
||||
import logging
|
||||
|
||||
import random
|
||||
|
||||
|
||||
logger = logging.getLogger()
|
||||
|
||||
logger.setLevel(logging.INFO)
|
||||
|
||||
CLK_PERIOD = 5
|
||||
|
||||
@cocotb.test
|
||||
async def test_sanity(dut):
|
||||
# Request a read from the cache, then request a write to the cache
|
||||
cocotb.start_soon(Clock(dut.i_clk, CLK_PERIOD, unit="ns").start())
|
||||
|
||||
dut.i_cpu_we.value = 0
|
||||
|
||||
dut.i_rst.value = Immediate(1)
|
||||
for _ in range(10):
|
||||
await RisingEdge(dut.i_clk)
|
||||
dut.i_rst.value = 0
|
||||
|
||||
await RisingEdge(dut.o_cpu_rdy)
|
||||
|
||||
await Timer(10, "us")
|
||||
Reference in New Issue
Block a user