mirror of
https://github.com/enjoy-digital/litedram.git
synced 2025-01-04 09:52:25 -05:00
test: clean test_downconverter/test_upconverter (thanks sb0)
This commit is contained in:
parent
7fbe0b712c
commit
fef530366a
2 changed files with 14 additions and 20 deletions
|
@ -80,14 +80,11 @@ def main_generator(write_port, read_port):
|
|||
class TestDownConverter(unittest.TestCase):
|
||||
def test(self):
|
||||
dut = DUT()
|
||||
generators = {
|
||||
"sys" : [
|
||||
main_generator(dut.write_user_port, dut.read_user_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}
|
||||
run_simulation(dut, generators, clocks, vcd_name="sim.vcd")
|
||||
generators = [
|
||||
main_generator(dut.write_user_port, dut.read_user_port),
|
||||
read_handler(dut.read_user_port),
|
||||
dut.memory.write_handler(dut.write_crossbar_port),
|
||||
dut.memory.read_handler(dut.read_crossbar_port)
|
||||
]
|
||||
run_simulation(dut, generators)
|
||||
self.assertEqual(write_data, read_data)
|
||||
|
|
|
@ -83,14 +83,11 @@ def main_generator(write_port, read_port):
|
|||
class TestUpConverter(unittest.TestCase):
|
||||
def test(self):
|
||||
dut = DUT()
|
||||
generators = {
|
||||
"sys" : [
|
||||
main_generator(dut.write_user_port, dut.read_user_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}
|
||||
run_simulation(dut, generators, clocks, vcd_name="sim.vcd")
|
||||
generators = [
|
||||
main_generator(dut.write_user_port, dut.read_user_port),
|
||||
read_handler(dut.read_user_port),
|
||||
dut.memory.write_handler(dut.write_crossbar_port),
|
||||
dut.memory.read_handler(dut.read_crossbar_port)
|
||||
]
|
||||
run_simulation(dut, generators)
|
||||
self.assertEqual(write_data, read_data)
|
||||
|
|
Loading…
Reference in a new issue