Merge pull request #1685 from hansfbaier/avalon-burst-test
Assert readdatavalid on bursts in Avalon2WishboneMM test (fixes #1686)
This commit is contained in:
commit
7d58f5d640
|
@ -55,7 +55,6 @@ class AvalonMM2Wishbone(Module):
|
|||
self.comb += [
|
||||
avl.waitrequest.eq(~(wb.ack | wb.err) | burst_read),
|
||||
avl.readdata.eq(readdata),
|
||||
avl.readdatavalid.eq(readdatavalid),
|
||||
]
|
||||
|
||||
# Avalon -> Wishbone
|
||||
|
@ -75,6 +74,7 @@ class AvalonMM2Wishbone(Module):
|
|||
self.submodules.fsm = fsm = FSM(reset_state="SINGLE")
|
||||
fsm.act("SINGLE",
|
||||
burst_cycle.eq(0),
|
||||
avl.readdatavalid.eq(readdatavalid),
|
||||
wb.sel.eq(avl.byteenable),
|
||||
wb.cti.eq(wishbone.CTI_BURST_NONE),
|
||||
If(avl.burstcount > 1,
|
||||
|
@ -93,6 +93,7 @@ class AvalonMM2Wishbone(Module):
|
|||
)
|
||||
)
|
||||
fsm.act("BURST-WRITE",
|
||||
avl.readdatavalid.eq(0),
|
||||
burst_cycle.eq(1),
|
||||
wb.sel.eq(avl.byteenable),
|
||||
wb.cti.eq(wishbone.CTI_BURST_INCREMENTING),
|
||||
|
@ -109,6 +110,7 @@ class AvalonMM2Wishbone(Module):
|
|||
)
|
||||
)
|
||||
fsm.act("BURST-READ",
|
||||
avl.readdatavalid.eq(0),
|
||||
burst_cycle.eq(1),
|
||||
burst_read.eq(1),
|
||||
wb.stb.eq(1),
|
||||
|
|
|
@ -44,9 +44,13 @@ class TestAvalon2Wishbone(unittest.TestCase):
|
|||
yield from dut.avl.bus_write(0x0, [0x01234567, 0x89abcdef, 0xdeadbeef, 0xc0ffee00, 0x76543210])
|
||||
yield
|
||||
self.assertEqual((yield from dut.avl.bus_read(0x0000, burstcount=5)), 0x01234567)
|
||||
self.assertEqual((yield dut.avl.readdatavalid), 1)
|
||||
self.assertEqual((yield from dut.avl.continue_read_burst()), 0x89abcdef)
|
||||
self.assertEqual((yield dut.avl.readdatavalid), 1)
|
||||
self.assertEqual((yield from dut.avl.continue_read_burst()), 0xdeadbeef)
|
||||
self.assertEqual((yield dut.avl.readdatavalid), 1)
|
||||
self.assertEqual((yield from dut.avl.continue_read_burst()), 0xc0ffee00)
|
||||
self.assertEqual((yield dut.avl.readdatavalid), 1)
|
||||
self.assertEqual((yield from dut.avl.continue_read_burst()), 0x76543210)
|
||||
yield
|
||||
yield
|
||||
|
|
Loading…
Reference in New Issue