An external program that checks for timing violations outside of the simulator, by looking at the VCD output.
- Building requires conan (optional, but recommended)
- Building requirse cmake
- Building requires an up to date c++ compiler (one of the below):
These steps are also what is followed to setup the CentOS system in Travis for automated testing
Installing repositories
sudo yum -y update
sudo yum -y epel-release centos-release-scl
If you are using conan for managing library dependencies (recommended):
sudo yum -y python-pip
pip install conan --user
Install compiler and build tools:
sudo yum -y install devtoolset-7 git wget
Install an updated version of cmake:
wget "https://cmake.org/files/v3.12/cmake-3.12.0-rc3-Linux-x86_64.sh"
sudo bash cmake-3.12.0-rc3-Linux-x86_64.sh --prefix=/usr/local --skip-license
Use compiler:
scl enable devtoolset-7
This opens up a new bash console with the devtoolset compiler set as default. You need to continue in this shell for all the following build steps.
VCD Assert depends on the following libraries.
- PEGTL (2.7.0 or newer) - Parse Expression Grammar Template Library
- Range-V3 (0.3.6) - Experimental range library for C++11/14/17
- fmt (5.0 or newer) - A modern formatting library
- Catch2 (2.3.0 or newer) - A modern, C++-native, header-only, test framework for unit-tests
- CLI11 (1.6.0 or newer)- Command line parser for C++11
The recommended way of handling library dependencies is through conan, but the correct versions can also be installed manually in a place where cmake can find it.
Fetch source
git clone https://github.com/pleroux0/vcd_assert.git
cd vcd_assert
Make and change to build directory
mkdir build
cd build
Use conan to fetch and setup dependencies (recommended)
conan remote add pleroux0 "https://api.bintray.com/conan/pleroux0/pleroux0"
conan install .. -s build_type=Release --build=missing
You might have to specify the compiler and version in the install step if conan's defaults are not correct
conan install .. -s build_type=Release -s compiler.version=7 -s compiler=gcc --build=missing
Or manually install them where cmake can find them
With conan (recommended):
conan build ..
With conan dependencies only:
cmake .. -DCMAKE_TOOLCHAIN_FILE=conan_paths.cmake -DBUILD_TESTS=ON -DBUILD_TYPE=Release
cmake --build .
Without conan:
cmake .. -DBUILD_TESTS=ON -DBUILD_TYPE=Release
cmake --build .
The resulting vcd_assert binary will be in bin/vcd_assert in the build directory
Still inside the build directory
ctest
ctest -R memcheck
- To compile with clang you need to using libc++ version 6 or newer
- Compiling with clang and trying to use libstdc++ triggers a bug in clang