etherbone_tb OK (will need cleanup)
authorFlorent Kermarrec <florent@enjoy-digital.fr>
Wed, 11 Feb 2015 23:01:03 +0000 (00:01 +0100)
committerFlorent Kermarrec <florent@enjoy-digital.fr>
Wed, 11 Feb 2015 23:01:03 +0000 (00:01 +0100)
liteeth/core/etherbone/wishbone.py
liteeth/test/etherbone_tb.py

index fd58094db8d7acfcef3e6d1aeb6a47d2bb38a4ba..50cd175dabfe74acd48cdd47c8fc251ad8dd2930 100644 (file)
@@ -58,8 +58,7 @@ class LiteEthEtherboneWishboneMaster(Module):
                        wr_source.addr.eq(rd_sink.addr),
                        wr_source.count.eq(rd_sink.count),
                        wr_source.be.eq(rd_sink.be),
-                       #wr_source.data.eq(data.q),
-                       wr_source.data.eq(0x12345678), # XXX
+                       wr_source.data.eq(data.q),
                        If(wr_source.stb & wr_source.ack,
                                rd_sink.ack.eq(1),
                                If(wr_source.eop,
index 5f32ae2dc69083cd0f3148647da4850a0a5b4b5e..1043753e5a30a0b9b64239faadb888e2e070c37e 100644 (file)
@@ -51,7 +51,7 @@ class TB(Module):
                        yield
 
                test_probe = False
-               test_writes = False
+               test_writes = True
                test_reads = True
 
                # test probe
@@ -77,13 +77,12 @@ class TB(Module):
                        record.cyc = 0
                        record.wca = 0
                        record.wff = 0
-                       record.byte_enable = 0
+                       record.byte_enable = 0xf
                        record.wcount = 16
                        record.rcount = 0
 
                        packet = etherbone.EtherbonePacket()
                        packet.records = [record]
-                       print(packet)
                        self.etherbone_model.send(packet)
 
                        for i in range(1024):
@@ -91,7 +90,7 @@ class TB(Module):
 
                # test reads
                if test_reads:
-                       reads = etherbone.EtherboneReads(base_ret_addr=0x2000)
+                       reads = etherbone.EtherboneReads(base_ret_addr=0x1000)
                        for i in range(16):
                                reads.add(etherbone.EtherboneRead(i))
                        record = etherbone.EtherboneRecord()
@@ -103,13 +102,12 @@ class TB(Module):
                        record.cyc = 0
                        record.wca = 0
                        record.wff = 0
-                       record.byte_enable = 0
+                       record.byte_enable = 0xf
                        record.wcount = 0
                        record.rcount = 16
 
                        packet = etherbone.EtherbonePacket()
                        packet.records = [record]
-                       print(packet)
                        self.etherbone_model.send(packet)
 
                        for i in range(1024):