Skip to content

Commit

Permalink
Remove cocotb.wavedrom example
Browse files Browse the repository at this point in the history
cocotb.wavedrom has been removed in upcoming cocotb 2.0 release.
  • Loading branch information
p12tic committed Sep 6, 2024
1 parent c3042a8 commit b2381e7
Showing 1 changed file with 0 additions and 21 deletions.
21 changes: 0 additions & 21 deletions examples/endian_swapper/tests/test_endian_swapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,24 +251,3 @@ async def randomly_switch_config(csr):
factory.add_option("backpressure_inserter",
[None, wave, intermittent_single_cycles, random_50_percent])
factory.generate_tests()

import cocotb.wavedrom


@cocotb.test()
async def wavedrom_test(dut):
"""
Generate a JSON wavedrom diagram of a trace and save it to wavedrom.json
"""
cocotb.start_soon(Clock(dut.clk, 10, units='ns').start())
await RisingEdge(dut.clk)
tb = EndianSwapperTB(dut)
await tb.reset()

with cocotb.wavedrom.trace(dut.reset_n, tb.csr.bus, clk=dut.clk) as waves:
await RisingEdge(dut.clk)
await tb.csr.read(0)
await RisingEdge(dut.clk)
await RisingEdge(dut.clk)
dut._log.info(waves.dumpj(header={'text':'WaveDrom example', 'tick':0}))
waves.write('wavedrom.json', header={'tick':0}, config={'hscale':3})

0 comments on commit b2381e7

Please sign in to comment.