From ea47037570c8cf4db461d72f7c69353918c91057 Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Thu, 12 Feb 2015 00:01:03 +0100 Subject: [PATCH] etherbone_tb OK (will need cleanup) --- liteeth/core/etherbone/wishbone.py | 3 +-- liteeth/test/etherbone_tb.py | 10 ++++------ 2 files changed, 5 insertions(+), 8 deletions(-) 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): -- 2.30.2