Cocotb Waves
Table of Contents
Introduction
This repository contains wavedrom svg generator for cocotb sims.
Installation
Installation from pip (release version, stable):
$ pip install cocotbext-waves
Usage
Example sampling AHB signals using cocotbext-ahb.
from cocotbext.waves import waveform
...
waves = waveform(
clk=dut.hclk, name="ahb_test", hscale=3, debug=True
)
waves.add_signal(
[
dut.hsel,
dut.haddr,
dut.hburst,
dut.hsize,
dut.htrans,
dut.hwdata,
dut.hwrite,
dut.hready_in,
],
group="MOSI",
)
waves.add_signal(
[
dut.hrdata,
dut.hready,
dut.hresp,
],
group="MISO",
)
waves.start()
...
<Running sim, issuing txns>
...
waves.save_svg()
waves.save_txt()
Output:
Classes & Methods
Class waveform
class waveform:
def __init__(
self,
clk,
name,
hscale: int = 2,
is_posedge: bool = True,
debug: bool = False,
start: bool = True
) -> None:
- clk: Synchronous clock used as the sample the signals
- name: Defines the object / filename, also part of the diagram header
- hscale: Horizontal scale for the SVG
- is_posedge: Defines clock model
- debug: Enable some debug messages
- start: Starts the signal monitoring
.start()/.stop()
Optional start/stop the sampling to create the diagram.y
.add_trigger(handle, val)
Adds a trigger to start sampling the signal, starts when handle.value == val.
.add_signal(color, is_clock, is_posedge_clock, clock_period, group)
Adds a signal to be monitored in the diagram. If it is a clock, other arguments can be populated, please note that signals from the same group have to be declared in a single method call.
.set_head/foot(text, tick, every)
Set header/foot propertries of the diagram, more info on wavedrom website.
.save_svg()
Stops the sampling and convert into SVG the final diagram.
.save_txt()
Stops the sampling and convert into .txt fmt the json.
Metadata
Release files for cocotbext-waves 0.1.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| cocotbext-waves-0.1.9.tar.gz | 6.5 kB | Without provenance | Details for cocotbext-waves-0.1.9.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| cocotbext_waves-0.1.9-py3-none-any.whl | Python 3 | none | any | Details for cocotbext_waves-0.1.9-py3-none-any.whl |
Total release size: 13.1 kB
Release files / cocotbext-waves-0.1.9.tar.gz
| Download URL | cocotbext-waves-0.1.9.tar.gz |
|---|---|
| Size | 6.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
93e19b13072b40d4ec77204f946d5bd34708a19734a485cea4fcd1a6b01db7f5
|
|
BLAKE2b-256 checksum How to use checksums |
e69991240031facf974721bf843426f6c77aebf68d250456bb1c6b24ed17e5c5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.12.7
|
Release files / cocotbext_waves-0.1.9-py3-none-any.whl
| Download URL | cocotbext_waves-0.1.9-py3-none-any.whl |
|---|---|
| Size | 6.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
dac9bfbe9a89529e5261751bf2fc095079ad1d382c480892e94bc95f64ceaceb
|
|
BLAKE2b-256 checksum How to use checksums |
944db6ce89bff53214a2fa7580281e07d397d44db212401b16d5da6f5782381c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.12.7
|
Security for cocotbext-waves 0.1.9
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.