From: Florent Kermarrec Date: Wed, 11 Feb 2015 23:01:03 +0000 (+0100) Subject: etherbone_tb OK (will need cleanup) X-Git-Tag: 24jan2021_ls180~2604^2~29 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ea47037570c8cf4db461d72f7c69353918c91057;p=litex.git etherbone_tb OK (will need cleanup) --- diff --git a/liteeth/core/etherbone/wishbone.py b/liteeth/core/etherbone/wishbone.py index fd58094d..50cd175d 100644 --- a/liteeth/core/etherbone/wishbone.py +++ b/liteeth/core/etherbone/wishbone.py @@ -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, diff --git a/liteeth/test/etherbone_tb.py b/liteeth/test/etherbone_tb.py index 5f32ae2d..1043753e 100644 --- a/liteeth/test/etherbone_tb.py +++ b/liteeth/test/etherbone_tb.py @@ -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):