Skip to content

Commit

Permalink
MVB Hash Table Simple - cocotb [STYLE] use the walrus operator to avo…
Browse files Browse the repository at this point in the history
…id doing the same calculation twice (also, it's cool)
  • Loading branch information
danielkondys committed Oct 31, 2024
1 parent 24df3e6 commit d45c4f2
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -253,8 +253,8 @@ async def run_test(dut, config_file: str = "test_configs/test_config_1B.yaml", c
last_num = 0

while (tb.stream_out.item_cnt < pkt_count):
if (tb.stream_out.item_cnt // 1000) > last_num:
last_num = tb.stream_out.item_cnt // 1000
if (num := tb.stream_out.item_cnt // 1000) > last_num:
last_num = num
cocotb.log.info(f"Number of random transactions processed: {tb.stream_out.item_cnt}/{pkt_count}")
await ClockCycles(dut.CLK, 100)

Expand Down

0 comments on commit d45c4f2

Please sign in to comment.