NOTE This tool was useful and served its purpose, but has now been dormant for quite some time. The repo will be archived as of May 2023 for future reference.
This is (hopefully) going to be a neat little package to read uncompressed VCD files into R for toggle counting, power estimation and simple side-channel analysis (on a teaching level).
install.packages(c("devtools")) # if you haven't done that before
devtools::install_github("wamserma/VCD2R",dependencies=TRUE,upgrade_dependencies=TRUE)
clone the git repository
git clone https://github.com/wamserma/VCD2R.git
install the build dependencies
install.packages(c("devtools", "roxygen2", "testthat", "knitr", "covr"))
open project in RStudio and hit Ctrl + Shift + L
If you have a .vpd
file e.g. from Synopsys VCS, you can convert it to an (uncompressed) VCD file by calling
vcs -vpd2vcd inter.vpd inter.vcd
if you want to capture version information, you might want to use
echo '$version' > inter.vcd
vcs -vpd2vcd | head -5 >> inter.vcd
echo '$end' >> inter.vcd
echo '$date' $'\n''dumped:' $(date -r inter.vpd -R) $'\n''converted:' $(date -R) $'\n''$end' >> inter.vcd
vcs -vpd2vcd inter.vpd -q >> inter.vcd
I made this because I wanted a stream oriented parser to make toggle count statistics in R. As far as I know, there is no other [R] VCD parser. Below is a list with parsers in other languages, without making any assurance on functionality or performance (some are just for parsing, some can also do toggle counts).
VCDFileParser (download needs registering)