Skip to content

Commit 041eee3

Browse files
committed
Merge branch 'schwarz-fix-jenkins_long_logs' into 'devel'
Remove excesive logging in some cocotb verifications See merge request ndk/ndk-fpga!439
2 parents 00fe3f5 + 2c46ef1 commit 041eee3

4 files changed

Lines changed: 14 additions & 9 deletions

File tree

comp/base/hash/ver/cocotb/cocotb_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ def hash_func(key: bytes, seed: bytes):
151151
transaction["SEED"] = randint(0, 2**seed_width-1)
152152
transaction["META"] = randint(0, 2**meta_width-1)
153153

154-
cocotb.log.info(f"{i=}, {transaction=}")
154+
#cocotb.log.info(f"{i=}, {transaction=}")
155155

156156
hash = hash_func(transaction["KEY"].to_bytes(key_width_bytes, "little"), transaction["SEED"].to_bytes(seed_width_bytes, "little"))
157157

comp/base/mem/mp_bram/cocotb/cocotb_test.py

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,8 @@ async def write_read_test(dut, pkt_count=1000, item_width_min=1, item_width_max=
4141

4242
addr_width = len(tb.stream_in.bus.WR_ADDR[0])
4343

44-
cocotb.log.info("-------------------------------------Write and immediate read---------------------------------")
45-
46-
for transaction in random_packets(item_width_min, item_width_max, pkt_count):
47-
cocotb.log.info(f"generated transaction: {transaction.hex()}")
44+
for i, transaction in enumerate(random_packets(item_width_min, item_width_max, pkt_count)):
45+
#cocotb.log.info(f"generated transaction: {transaction.hex()}")
4846

4947
address = randint(0, (2**addr_width-1)-(len(transaction)*8))
5048

@@ -53,11 +51,14 @@ async def write_read_test(dut, pkt_count=1000, item_width_min=1, item_width_max=
5351
tb.ref_ram.write(address, transaction) # writting transaction to reference RAM
5452

5553
output = await tb.stream_in.read(address, len(transaction), parallel=parallel_read)
56-
cocotb.log.info(f"received transaction: {output.hex()}")
54+
#cocotb.log.info(f"received transaction: {output.hex()}")
5755

5856
if output != transaction:
5957
raise TestFailure(f"Expected {transaction.hex()}, got {output.hex()}")
6058

59+
if i % 100 == 0:
60+
cocotb.log.info(f"Processed requests {i}/{pkt_count}.")
61+
6162
cocotb.log.info("--------------------Comparing end state of reference RAM and simulated RAM--------------------")
6263

6364
for i in range(2**addr_width):
@@ -72,19 +73,23 @@ async def write_read_test(dut, pkt_count=1000, item_width_min=1, item_width_max=
7273

7374
@cocotb.test()
7475
async def test_simple(dut):
76+
"Serial write and read"
7577
await write_read_test(dut)
7678

7779

7880
@cocotb.test()
7981
async def test_parallel_write(dut):
82+
"Parallel write, serial read"
8083
await write_read_test(dut, parallel_write=True)
8184

8285

8386
@cocotb.test()
8487
async def test_parallel_read(dut):
88+
"Serial write, parallel read"
8589
await write_read_test(dut, parallel_read=True)
8690

8791

8892
@cocotb.test()
8993
async def test_parallel_write_read(dut):
94+
"Parallel write and read"
9095
await write_read_test(dut, parallel_write=True, parallel_read=True)

comp/mvb_tools/storage/mvb_hash_table_simple/cocotb/cocotb_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ async def run_test(dut, config_file: str = "test_configs/test_config_1B.yaml", c
147147
# pkt_count: how many random packets are to be generated.
148148

149149
cocotb.start_soon(Clock(dut.CLK, 5, units='ns').start())
150-
tb = testbench(dut, debug=True)
150+
tb = testbench(dut, debug=False)
151151
await tb.reset()
152152

153153
tb.backpressure.start(BackpressureGenerator(BackpressureConfig(1, 5, 0.5)))
@@ -247,7 +247,7 @@ async def run_test(dut, config_file: str = "test_configs/test_config_1B.yaml", c
247247
mvb_req_tr = MvbReqTrHashTableSimple()
248248
mvb_req_tr.key = int_transaction
249249

250-
cocotb.log.info(f"generated transaction: {hex(mvb_req_tr.key)}")
250+
#cocotb.log.info(f"generated transaction: {hex(mvb_req_tr.key)}")
251251
tb.stream_in.append(mvb_req_tr)
252252

253253
last_num = 0

comp/nic/mac_lite/rx_mac_lite/comp/adapters/mac_seg/cocotb/cocotb_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ async def run_test(dut, pkt_count=10000, frame_size_min=60, frame_size_max=2048)
5454

5555
for transaction in random_packets(frame_size_min, frame_size_max, pkt_count):
5656
tb.model(transaction)
57-
cocotb.log.info("generated transaction: " + transaction.hex())
57+
#cocotb.log.info("generated transaction: " + transaction.hex())
5858
tb.stream_in.append(transaction)
5959

6060
last_num = 0

0 commit comments

Comments
 (0)