Comments (9)
Something like this: https://docs.pytest.org/en/latest/example/special.html ?
If use pytest can use all stand procedures
from cocotb-test.
BTW: What is the use case for this?
from cocotb-test.
We are working in a cocotb-test front-end for TerosHDL:
https://github.com/TerosTechnology/triel
We would like to get two things that we already have implemented with VUnit:
- Test selection: the user has the possibility to list the tests and choose which test to run.
- Independent output by simulator (.vcd): the user can open the waveform of each test. Un ejemplo sería este:
def test_adder_vhdl():
tests = list("test_adder")
for x in tests:
run(vhdl_sources=["../../../hdl/adder.vhd"],
simulation_args=["--vcd=func"+x[name]+".vcd"],
toplevel="adder",
module="test_adder",
test=x["name"]
toplevel_lang="vhdl"
)
from cocotb-test.
There is no explicit list of test it is handled by pytest and there are ways to get it (see: pytest-dev/pytest#1613) some IDE are doing this.
Verilog simulator typically does not take VCD output as a parameter it can be defined in Verilog file itself. As far as I can see one would need to do this via define or similar.
from cocotb-test.
I think that I can't list the cocotb tests with pytest. In this example:
https://github.com/qarlosalberto/cocotbExamples/blob/master/tools/cocotb/simple/cocotest_test_adder.py
https://github.com/qarlosalberto/cocotbExamples/blob/master/tools/cocotb/simple/test_adder.py
I can discover: def test_adder_vhdl()
But I cant discover: def adder_basic_test(dut), def adder_basic2_test(dut), def adder_random_test(dut
I would like to be able to define with cocotb-test a different output folder (SIM_BUILD) for each cocotb test (adder_basic_test,adder_basic2_test,adder_random_test).
It would also be nice if I could select the tests (TESTCASE)
from cocotb-test.
You can set testcase
and sim_build
now.
For the list of tests you can try to do something like below and parse std
(looks bit ugly):
import py
import pytest
capture = py.io.StdCapture()
pytest.main(['--collect-only', '-q'])
std, err = capture.reset()
print(std.split("\n"))
from cocotb-test.
Ok! I will try, thank you!
from cocotb-test.
Did this work?
from cocotb-test.
I will close. Feel free to re-open if needed.
from cocotb-test.
Related Issues (20)
- Riviera VHDL simulation not working
- Support three step simulation with VCS HOT 1
- cocotb-test not working when using Altera libraries HOT 2
- Compile args provided to both `ghdl import` and `ghdl make` HOT 1
- The `work_dir` in `simulator.py` is not optional HOT 1
- non-cocotb testbenches HOT 3
- Vivado simulator support HOT 1
- Questa does not generate vsim.wlf when waves=True HOT 6
- Unconditional add vhpi options to Xcelium simulator HOT 1
- Incorrect cmd_build creation for VCS HOT 4
- for Questa/Modelsim is mixedsvvh flag necessary for verilog compilation? HOT 1
- Case sensitive architecture name fail with ghdl HOT 1
- Verilator errors (ex: lint errors when verilating) are suppressed when they should be displayed
- Timescale should also support fs HOT 1
- libcocotbfli_modelsim.so: wrong ELF class HOT 2
- Discussion: cucumber test framework with cocotb-test
- Verilator wave simulation requires c++20 HOT 2
- `TypeError` exception when running simulation
- Discussion: plus_args as a dict rather than a list HOT 3
- ValueError: '/usr/local/bin/cocotb-clean' does not start with '/usr/local/lib/python3.7/site-packages' HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cocotb-test.