Skip to content

Commit

Permalink
Removed debug-prints from memory bank test
Browse files Browse the repository at this point in the history
  • Loading branch information
tilk committed Oct 5, 2023
1 parent a5c9200 commit 232ffc0
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions test/transactions/test_transaction_lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,25 +157,21 @@ def random_wait(rand: int):
yield from self.tick(random.randrange(rand) + 1)

def writer():
for i in range(test_count):
for cycle in range(test_count):
d = random.randrange(2**data_width)
a = random.randrange(max_addr)
print("write pocz", a, d)
yield from m.write.call(data=d, addr=a)
for i in range(2):
for _ in range(2):
yield Settle()
print("write kon")
data_dict[a] = d
yield from random_wait(writer_rand)

def reader_req():
for cycle in range(test_count):
a = random.randrange(max_addr)
print("read_req pocz", a)
yield from m.read_req.call(addr=a)
for i in range(1):
for _ in range(1):
yield Settle()
print("read_req kon")
if safe_writes:
d = data_dict[a]
read_req_queue.append(d)
Expand All @@ -184,13 +180,11 @@ def reader_req():
yield from random_wait(reader_req_rand)

def reader_resp():
for i in range(test_count):
for cycle in range(test_count):
while not read_req_queue:
yield from random_wait(reader_resp_rand)
d = read_req_queue.popleft()
print("read_resp", d)
yield from m.read_resp.call()
# self.assertEqual((yield from m.read_resp.call()), {"data": d})
self.assertEqual((yield from m.read_resp.call()), {"data": d})
yield from random_wait(reader_resp_rand)

def internal_reader_resp():
Expand Down

0 comments on commit 232ffc0

Please sign in to comment.