From 95cb7cdba57f5f33aa3a82c445cc9d5511496a96 Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Tue, 28 Aug 2018 13:40:50 +0200 Subject: [PATCH] test: rename read/write generators to handlers --- test/common.py | 4 ++-- test/test_axi.py | 4 ++-- test/test_bist.py | 4 ++-- test/test_downconverter.py | 8 ++++---- test/test_upconverter.py | 8 ++++---- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/test/common.py b/test/common.py index 788e45a..e3386f3 100644 --- a/test/common.py +++ b/test/common.py @@ -31,7 +31,7 @@ class DRAMMemory: print("0x{:08x}: 0x{:08x}".format(addr, self.mem[addr])) @passive - def read_generator(self, dram_port): + def read_handler(self, dram_port): address = 0 pending = 0 yield dram_port.cmd.ready.eq(0) @@ -54,7 +54,7 @@ class DRAMMemory: yield @passive - def write_generator(self, dram_port): + def write_handler(self, dram_port): address = 0 pending = 0 yield dram_port.cmd.ready.eq(0) diff --git a/test/test_axi.py b/test/test_axi.py index 8de4781..f729a64 100755 --- a/test/test_axi.py +++ b/test/test_axi.py @@ -96,8 +96,8 @@ class TestAXI(unittest.TestCase): generators = [ writes_generator(axi_port, writes), reads_generator(axi_port, reads), - mem.read_generator(dram_port), - mem.write_generator(dram_port) + mem.read_handler(dram_port), + mem.write_handler(dram_port) ] run_simulation(dut, generators, vcd_name="axi2native.vcd") diff --git a/test/test_bist.py b/test/test_bist.py index 2e1dfca..fba04a9 100755 --- a/test/test_bist.py +++ b/test/test_bist.py @@ -116,7 +116,7 @@ class TestBIST(unittest.TestCase): # simulation generators = [ main_generator(dut, mem), - mem.write_generator(dut.write_port), - mem.read_generator(dut.read_port) + mem.write_handler(dut.write_port), + mem.read_handler(dut.read_port) ] run_simulation(dut, generators, vcd_name="bist.vcd") diff --git a/test/test_downconverter.py b/test/test_downconverter.py index ad6dd18..1542621 100755 --- a/test/test_downconverter.py +++ b/test/test_downconverter.py @@ -37,7 +37,7 @@ read_data = [] @passive -def read_generator(read_port): +def read_handler(read_port): yield read_port.rdata.ready.eq(1) while True: if (yield read_port.rdata.valid): @@ -83,9 +83,9 @@ class TestDownConverter(unittest.TestCase): generators = { "sys" : [ main_generator(dut.write_user_port, dut.read_user_port), - read_generator(dut.read_user_port), - dut.memory.write_generator(dut.write_crossbar_port), - dut.memory.read_generator(dut.read_crossbar_port) + read_handler(dut.read_user_port), + dut.memory.write_handler(dut.write_crossbar_port), + dut.memory.read_handler(dut.read_crossbar_port) ] } clocks = {"sys": 10} diff --git a/test/test_upconverter.py b/test/test_upconverter.py index 22f25ad..e11a403 100755 --- a/test/test_upconverter.py +++ b/test/test_upconverter.py @@ -37,7 +37,7 @@ read_data = [] @passive -def read_generator(read_port): +def read_handler(read_port): yield read_port.rdata.ready.eq(1) while True: if (yield read_port.rdata.valid): @@ -86,9 +86,9 @@ class TestUpConverter(unittest.TestCase): generators = { "sys" : [ main_generator(dut.write_user_port, dut.read_user_port), - read_generator(dut.read_user_port), - dut.memory.write_generator(dut.write_crossbar_port), - dut.memory.read_generator(dut.read_crossbar_port) + read_handler(dut.read_user_port), + dut.memory.write_handler(dut.write_crossbar_port), + dut.memory.read_handler(dut.read_crossbar_port) ] } clocks = {"sys": 10}