Skip to content

Commit

Permalink
Merge pull request #75 from VOGL-electronic/ci_fix
Browse files Browse the repository at this point in the history
tests: fixup and update
  • Loading branch information
enjoy-digital authored Sep 16, 2024
2 parents 2eb6f38 + 1be6e1d commit ea7feab
Showing 1 changed file with 3 additions and 20 deletions.
23 changes: 3 additions & 20 deletions test/test_spi_mmap.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,7 @@ def wb_gen(dut, addr, data, offset):
dut.done = 0

yield dut.offset.eq(offset)
yield dut.bus.adr.eq(addr + offset)
print((yield dut.bus.adr))
yield dut.bus.we.eq(1)
yield dut.bus.cyc.eq(1)
yield dut.bus.stb.eq(1)
yield dut.bus.dat_w.eq(data)

while (yield dut.bus.ack) == 0:
yield
yield from dut.bus.write(addr + offset, data)

dut.done = 1

Expand Down Expand Up @@ -95,9 +87,6 @@ def phy_gen(dut, addr, data):

yield
yield dut.sink.valid.eq(1)
while (yield dut.source.valid) == 0:
yield
yield dut.sink.valid.eq(0)
yield
addr = 0xcafe
data = 0xdeadbeef
Expand All @@ -116,15 +105,9 @@ def test_spi_mmap_read_test(self):
def wb_gen(dut, addr, data):
dut.data_ok = 0

yield dut.bus.adr.eq(addr)
yield dut.bus.we.eq(0)
yield dut.bus.cyc.eq(1)
yield dut.bus.stb.eq(1)
dat = yield from dut.bus.read(addr)

while (yield dut.bus.ack) == 0:
yield
print((yield dut.bus.dat_r))
if (yield dut.bus.dat_r) == data:
if dat == data:
dut.data_ok = 1

def phy_gen(dut, addr, data):
Expand Down

0 comments on commit ea7feab

Please sign in to comment.