Questions tagged [cocotb]

Cocotb is a COroutine based COsimulation TestBench environment for verifying VHDL/Verilog RTL hardware designs using Python.

Cocotb is a COroutine based COsimulation TestBench environment for verifying / RTL using .

Documentation is at https://cocotb.readthedocs.io

Support via the Gitter channel https://gitter.im/cocotb or the mailing list at https://lists.librecores.org/listinfo/cocotb

44 questions
0
votes
2 answers

How to get the current test name in cocotb

I am using cocotb version 1.5.2, and I would like to write an utility function to create reports/plots per test. MWE: Implementing the get_test_name function so that the following test will print my_wonderful_test. import cocotb @cocotb.test() async…
Bob
  • 13,867
  • 1
  • 5
  • 27
0
votes
1 answer

Cocotb and ghdl version mismatch?

when i run simple_dff cocotb example: make SIM=ghdl TOPLEVEL_LANG=vhdl i got following error: loading VPI module 'C:/users/tomek/miniconda3/lib/site-packages/cocotb/libs/libcocotbvpi_ghdl.dll' %1 is not Valid Win32…
0
votes
1 answer

cocotb simulation with Aldec

I am doing some EDA tools test with cocotb as a testbench. I am running simulations with icarus and verilator without problem, however, with Aldec I have got a problem at "runsim.tcl". The output of the console is Welcome to VSIMSA! This message…
M.X
  • 195
  • 3
  • 12
0
votes
1 answer

cocotb-modelsim error due to Illegal option -o pipefail

I am trying to run cocotb simulations with modelsim, however, I am getting an error and no success, in the last two days, fixing it. I have installed cocotb using "pip3 install cocotb". The python version I am using is 3.7.0. I have installed the…
M.X
  • 195
  • 3
  • 12
0
votes
1 answer

cocotb cannot load VPI module

When trying to make the endian_swapper example code, I get the error message below. I am using Ubuntu 19.10. Any help is appreciated. Thanks. make SIM=ghdl TOPLEVEL_LANG=vhdl make results.xml make[1]: Entering directory…
Marcus
  • 41
  • 1
  • 4
0
votes
1 answer

Problem with cocotb example code getting to work

I got a few of the cocotb examples running, but not the most referenced to (endian_swapper). Any advice is appreciated. Thanks in advance! make SIM=ghdl TOPLEVEL_LANG=vhdl ... 0.00ns CRITICAL cocotb.regression …
Marcus
  • 41
  • 1
  • 4
0
votes
1 answer

Show waves in Modelsim with Cocotb

I'm getting started with cocotb. I can run the example tests. They don't fail and cocotb terminates with success. My usual simulator is modelsim. If I start cocotb with: make GUI=1 WAVES=1 I get the GUI of modelsim and can see the signals in the…
Botnic
  • 163
  • 9
0
votes
1 answer

Data is not storing in array, I want to store data in arrays and feeding to the others

I am writing the code for cocotb testbench for verify the hdl modules, but I have some problems. I want to feed the data, which is reading from the .txt files and storing in an array but when I tried to feed the data, it shows index error because…
Anurag
  • 9
  • 1
0
votes
1 answer

How to generate clock in COCOTB?

I am trying to verify a flash-based design using Cocotb (a Python-based framework) which I am new to it. I have always used verilog, SystemVerilog in the past. I am trying to generate the clock for a testbench. I have tried going through the…
warsal
  • 11
  • 3
0
votes
1 answer

yielding a coroutine in a list with cocotb

I have a coroutine which wait for an event to be set : @cocotb.coroutine def wb_RXDR_read(self): """ waiting util RXDR is read """ if not self._RXDR_read_flag: while True: yield self._RXDR_read_event.wait() …
FabienM
  • 3,421
  • 23
  • 45
0
votes
2 answers

How to print the content of TestError raised in Cocotb

If I raise a TestError under cocotb test coroutine : @cocotb.test() def double_cmd(dut): ... raise TestError("Wrong CRC value found") I know that error raised in test log, but I don't see the message "Wrong CRC value found": 12580176.01ns…
FabienM
  • 3,421
  • 23
  • 45
0
votes
1 answer

What the difference between <= and = in cocotb?

It seem that I can use indifferently <= or = to set an input signal value on my design. Is there a real difference between two ? dut.button_in = 0 or dut.button_in <= 0 I have exactly the same output chronogram.
FabienM
  • 3,421
  • 23
  • 45
0
votes
1 answer

Stopping cocotb forked coroutine

I have a coroutine that waiting for a signal rising : @cocotb.coroutine def wait_for_rise(self): yield RisingEdge(self.dut.mysignal) I'm launching it in my «main» test function like it : mythread = cocotb.fork(wait_for_rise()) I want to stop…
FabienM
  • 3,421
  • 23
  • 45
-1
votes
1 answer

Python bitmask doesn't give expected output

Im puting a bitmask over a register read value and execute a logical and on the value. what i expect is: clear_reg_val: 00000000000000000100100000000000 My actual output is: # reg_value is: 00000000000000000100100000001100 # mask_inverted:…
Mansur D
  • 1
  • 1
  • 4
1 2
3