Universal Hardware Data Model. A complete modeling of the IEEE SystemVerilog Object Model with VPI Interface, Elaborator, Serialization, Visitor and Listener. Used as a compiled interchange format in between SystemVerilog tools. Compiles on Linux gcc, Windows msys2-gcc & msvc, OsX
* git clone https://github.com/alainmarcel/UHDM.git
* cd UHDM
* git submodule update --init --recursive
* make
listener_elab_test.cpp
)full_elab_test.cpp
and uhdm-dump.cpp
module-port_test.cpp
module-port_test.cpp
)tests/listener_elab_test.cpp
)vpi_visitor.cpp
listener_elab_test.cpp
full_elab_test.cpp
and uhdm-dump.cpp
uhdm-dump
executable creates a human readable view of the UHDM serialized data model using the visitor visitor.cpp
.SynthSubset.cpp
UhdmLint.cpp
ExprEval.cpp
make install
), create your own executable (Read Makefile
) , ie:$(CXX) -std=c++17 tests/test1.cpp -I/usr/local/include/uhdm -I/usr/local/include/uhdm/include /usr/local/lib/libuhdm.a /usr/local/lib/libcapnp.a /usr/local/lib/libkj.a -ldl -lutil -lm -lrt -lpthread -o test_inst
-DUHDM_WITH_PYTHON=ON
using cmake
command, or make release-shared UHDM_WITH_PYTHON=ON
, also make sure your python executable is built with shared libraries enabled: env PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install -verbose 3.9.11). The python wrapper implements almost all the VPI getter API from systemVerilog. See chapter 38. VPI routine definitions of Ieee1800-2017 for details.import uhdm
#build uhdm Serializer object
s = uhdm.Serializer()
#Read and uhdm database
data = s.Restore('surelog.uhdm')
#Your specific application
#Here create an iterator on all module in the first design
module_iterator = uhdm.vpi_iterate(uhdm.uhdmallModules,data[0])
#iterate on all module
while(True):
vpiObj_module = uhdm.vpi_scan(module_iterator)
if vpiObj_module is None:
break
#print the string pointed by vpiName attribut of vpiObj_module
print(uhdm.vpi_get_str(uhdm.vpiName,vpiObj_module))