Programmatic Interpretations of Cadence Virtuoso Waveform VCSV files
Project description
VCSV Genie
This repo details methods for parsing transient simulation VCSV files from Cadence Virtuoso.
Installation
Install via pip:
pip install vcsvgenie
Installation from source (using Poetry)
- Clone this repo
git clone https://github.com/FSharp4/vcsvgenie.git
cd vcsvgenie
- Install to an environment
# If you haven't installed poetry:
pip install poetry
# Install project + dependencies to virtual environment
poetry install
- Copy over a vcsv file of your choice, and use
vcsvgenieto process the file, extracting propagation delays, printing traces, etc.
Installation from source
- Clone this repo
git clone https://github.com/FSharp4/vcsvgenie.git
cd vcsvgenie
- Build this repo
pip install build
python -m build
- Install the repo
pip install -e .
- Copy over a vcsv file of your choice, and use
vcsvgenieto process the file, extracting propagation delays, printing traces, etc.
Example files can be seen in vcsvgenie/_dev.
Remark: In order for VCSV genie to automatically parse your file for propagations, you need to specify which signals are 'outputs' and which signals are inputs.
- Signals must be 'outputs' for propagation delay calculations to be performed on them with respect to inputs.
- Within Virtuoso Schematics/Layouts, these signals may be inputOutput or intermediate.
To specify which signals are inputs/outputs, supply lists of signal names to the input and output constructor arguments for TransientResultSpecification. (See Usage for an example).)
Functionality
Transient Analysis
Users can:
- Create pandas dataframes or numpy arrays from VCSV files
- Create $(x, y)$ dataseries of individual waveforms (note that all timestamp $x$ vectors are the same in a VCSV file, and are not uniformly spaced)
- Create collections of waveforms from specifications (
vcsvgenie.transient_waveform.TransientResult) - Recognize signal buses using caret notation (i.e., A<3:0>) by specifying the individual signals in the
TransientResultSpecification - Digitize and tabulate signal bus data
- Identify and measure critical path(s) propagation delay(s) via
vcsvgenie.transient_waveform.critical_propagation_delaysandquasicritical_propagation_delays - Estimate global worst-case delays via
vcsvgenie.transient_waveform.estimate_global_critical_delay
DC Analysis
Users can:
- Load waveforms from a DC analysis into a rudimentary DC Results object (no functionality yet)
- Measure Read SRAM Noise Margin
- Measure Write SRAM Noise Margin
Usage
General Example:
from pathlib import Path
from pprint import pprint
from vcsvgenie.read import read_vcsv
from vcsvgenie.transient_waveform import TransientResultSpecification, average_propagation_delays_by_category,
maximum_propagation_delays_by_category
from vcsvgenie.waveform import construct_waveforms
path = Path("example.vcsv")
dataframe, titles = read_vcsv(path)
waveforms = construct_waveforms(dataframe, titles)
specification = TransientResultSpecification(
inputs=[
'/A<3>', '/A<2>', '/A<1>', '/A<0', '/B<3>', '/B<2>', '/B<1>', '/B<0>', 'Clk'
],
outputs=['/z<7>', '/z<6>', '/z<5>', '/z<4>', '/z<3>', '/z<2>', '/z<1>', '/z<0>'],
clock_period=1e-9,
logic_threshold=0.5 # volts
)
results = specification.interpret(waveforms)
results.find_transitions()
results.find_propagations()
averages = average_propagation_delays_by_category(results.propagations)
# pprint(results.propagations)
# pprint(averages)
maxima = maximum_propagation_delays_by_category(results.propagations)
# pprint(maxima)
results.digitize()
results.resolve_buses()
bus_data = results.tabulate_bus_data()
bus_data.to_csv("bus_data.csv")
results.plot(separate=True)
Retrieving observed worst-case delays:
from pprint import pprint
n = 10 # number of delays to retrieve
quasicritical_delays = transient_waveform.quasicritical_propagation_delays(results.propagations, n)
pprint([str(quasicritical) for quasicritical in quasicritical_delays])
Estimating global worst-case delays (in simulations on random inputs):
maxtpd_idx, maxtpd = transient_waveform.find_max_delay_trend(results.delays)
transient_waveform.plot_max_delay_trend(maxtpd_idx, maxtpd, show=True)
global_estimation = transient_waveform.estimate_global_critical_delay(maxtpd_idx, maxtpd, thres_samp=thres_samp)
Dependencies
- numpy
- matplotlib
- pandas
- sortedcontainers
- (optional): jupyter
Contribution
This code targets python 3.11 syntax.
This codebase follows semver guidelines:
- Patch versions indicate bug fixes or documentation adjustments with no intentional functionality changes
- Minor versions indicate functionality changes or additions with no breaking changes
- Major versions indicate breaking functionality changes
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file vcsvgenie-2.2.1.tar.gz.
File metadata
- Download URL: vcsvgenie-2.2.1.tar.gz
- Upload date:
- Size: 32.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fab81fd3c8b6b068f39e0eb3f0ec6823d5780eac2f5e6c6f96aa92a315b1e08a
|
|
| MD5 |
ffd737b29a6fa2c958ceba1e904c12e0
|
|
| BLAKE2b-256 |
6c2f8e935fdb6386a30a9e2fd88c1aa3c33107bd83eee81d032d2bcbe7dd9c8a
|
File details
Details for the file vcsvgenie-2.2.1-py3-none-any.whl.
File metadata
- Download URL: vcsvgenie-2.2.1-py3-none-any.whl
- Upload date:
- Size: 31.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ca0cac943149afd0f5580835fb5946326df2ec083eec0914db6eb71aeb9de1a7
|
|
| MD5 |
6a6f206ad71ee0ddbda7611cf905f37b
|
|
| BLAKE2b-256 |
f22b834e79ce665ae407c325856408aad8739ee8dac537f840a81e534531e39b
|