-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
initial import of Accellera contribution branch from Crave
- Loading branch information
Showing
501 changed files
with
58,186 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
BasedOnStyle: Google | ||
ColumnLimit: 120 | ||
# Prevent breaking doxygen | ||
CommentPragmas: '^\*|^/|^!' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
build*/ | ||
deps*/ | ||
*~ | ||
*.swp | ||
*.cfg | ||
lcov_output/ | ||
logs/ | ||
doc/crave-doxygen/ | ||
crave_package_deps.tar.gz | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,210 @@ | ||
before_script: | ||
- scripts/show_linux_distribution_and_install_packages.sh | ||
- NUM_JOBS=$[`nproc`-1] | ||
- if [ "$NUM_JOBS" -lt 1 ]; then NUM_JOBS=1; fi | ||
- GIT_SSL_NO_VERIFY=true git submodule sync | ||
- GIT_SSL_NO_VERIFY=true git submodule update --init | ||
|
||
### templates for docker images | ||
.ubuntu16: &ubuntu16 | ||
image: ubuntu:xenial | ||
variables: | ||
JDK_PACKAGE_NAME: openjdk-8-jdk | ||
tags: | ||
- docker | ||
|
||
.ubuntu16_x86: &ubuntu16_x86 | ||
image: m0elnx/ubuntu-32bit:latest | ||
variables: | ||
JDK_PACKAGE_NAME: openjdk-8-jdk | ||
tags: | ||
- docker | ||
|
||
.ubuntu14: &ubuntu14 | ||
image: ubuntu:trusty | ||
variables: | ||
JDK_PACKAGE_NAME: openjdk-7-jdk | ||
tags: | ||
- docker | ||
|
||
.centos7: ¢os7 | ||
image: centos:centos7 | ||
variables: | ||
JDK_PACKAGE_NAME: java-1.8.0-openjdk | ||
tags: | ||
- docker | ||
|
||
.debian8: &debian8 | ||
image: debian:jessie | ||
variables: | ||
JDK_PACKAGE_NAME: openjdk-8-jdk | ||
tags: | ||
- docker | ||
|
||
.fedora25: &fedora25 | ||
image: fedora:25 | ||
variables: | ||
JDK_PACKAGE_NAME: java-1.8.0-openjdk | ||
tags: | ||
- docker | ||
|
||
### template and jobs for the default build (currently with Boolector and CUDD) that should be testes on all images | ||
.build_default: | ||
script: &build_default | ||
- make -j $NUM_JOBS | ||
- make test | ||
|
||
build_default_ubuntu16: | ||
<<: *ubuntu16 | ||
except: | ||
- /.*_fastci$/ | ||
script: *build_default | ||
|
||
build_default_ubuntu14: | ||
<<: *ubuntu14 | ||
only: | ||
- development | ||
- /.*_ci$/ | ||
script: *build_default | ||
|
||
build_default_centos7: | ||
<<: *centos7 | ||
only: | ||
- development | ||
- /.*_ci$/ | ||
script: *build_default | ||
|
||
build_default_debian8: | ||
<<: *debian8 | ||
only: | ||
- development | ||
- /.*_ci$/ | ||
script: *build_default | ||
|
||
build_default_fedora25: | ||
<<: *fedora25 | ||
only: | ||
- development | ||
- /.*_ci$/ | ||
script: *build_default | ||
|
||
### template and jobs for a fast build | ||
.fast_build: | ||
script: &fast_build | ||
- ./bootstrap.sh -d deps -b cudd -b sword build -DCRAVE_TIMEOUT=60 -DCRAVE_BUILD_EXAMPLES=off | ||
- cd build | ||
- make -j $NUM_JOBS | ||
- ctest --schedule-random | ||
|
||
fast_build_ubuntu14: | ||
<<: *ubuntu14 | ||
script: *fast_build | ||
|
||
### template and jobs for a build in RELEASE mode | ||
.build_release: | ||
script: &build_release | ||
- ./bootstrap.sh -d deps -m RELEASE --systemc -b cudd -b sword build -DCRAVE_TIMEOUT=60 -DCRAVE_EXAMPLES_TIMEOUT=180 | ||
- make -j $NUM_JOBS | ||
- make test | ||
|
||
build_release_centos7: | ||
<<: *centos7 | ||
only: | ||
- development | ||
script: *build_release | ||
|
||
### template and jobs for a very fast build with installation | ||
.build_install: | ||
script: &build_install | ||
- ./bootstrap.sh -d deps --systemc -b cudd -b sword build -DCRAVE_BUILD_EXAMPLES=off -DCRAVE_ENABLE_TESTS=off | ||
- cd build | ||
- make -j $NUM_JOBS install | ||
- CRAVE_INSTALL_DIR=`pwd`/root/share/crave | ||
- git clone --depth 1 https://github.com/hoangmle/test-crave-install.git | ||
- cd test-crave-install | ||
- cmake . -Dcrave_DIR=$CRAVE_INSTALL_DIR | ||
- make -j $NUM_JOBS | ||
- ./main 2>result || true | ||
- cat result | ||
- TMP=`grep 'German' result` | ||
- if [ "$TMP" == "" ]; then exit 1; fi | ||
|
||
build_install_centos7: | ||
<<: *centos7 | ||
only: | ||
- development | ||
script: *build_install | ||
|
||
### optional builds in the following | ||
|
||
build_default_stp: | ||
<<: *ubuntu16 | ||
only: | ||
- development | ||
script: | ||
- CRAVE_SOLVERS='cudd stp' make -j $NUM_JOBS | ||
- make test | ||
allow_failure: true | ||
|
||
build_cvc4: | ||
<<: *ubuntu16 | ||
only: | ||
- development | ||
script: | ||
- ./bootstrap.sh -d deps --systemc -b cudd -b cvc4 build -DCRAVE_TIMEOUT=60 -DCRAVE_EXAMPLES_TIMEOUT=180 | ||
- cd build | ||
- make -j $NUM_JOBS | ||
- ctest --schedule-random | ||
allow_failure: true | ||
|
||
build_yices2: | ||
<<: *ubuntu16 | ||
only: | ||
- development | ||
script: | ||
- ./bootstrap.sh -d deps --systemc -b cudd -b yices2 build -DCRAVE_TIMEOUT=60 -DCRAVE_EXAMPLES_TIMEOUT=180 | ||
- cd build | ||
- make -j $NUM_JOBS | ||
- ctest --schedule-random | ||
allow_failure: true | ||
|
||
build_z3: | ||
<<: *ubuntu16 | ||
only: | ||
- development | ||
script: | ||
- ./bootstrap.sh -d deps --systemc -b cudd -b z3 build -DCRAVE_TIMEOUT=60 -DCRAVE_EXAMPLES_TIMEOUT=180 | ||
- cd build | ||
- make -j $NUM_JOBS | ||
- ctest --schedule-random | ||
allow_failure: true | ||
|
||
build_ubuntu16_x86: | ||
<<: *ubuntu16_x86 | ||
only: | ||
- development | ||
script: | ||
- ./bootstrap.sh -d deps -b cudd -b boolector build -DCRAVE_TIMEOUT=60 -DCRAVE_EXAMPLES_TIMEOUT=180 | ||
- cd build | ||
- make -j $NUM_JOBS | ||
- ctest --schedule-random | ||
allow_failure: true | ||
|
||
### Windows build with Visual Studio | ||
build_windows: | ||
except: | ||
- /.*_fastci$/ | ||
before_script: | ||
- git submodule sync | ||
- git submodule update --init | ||
script: | ||
- call "%VS140COMNTOOLS%VsDevCmd.bat" | ||
- rmdir build /s /q | ||
- mkdir build | ||
- cd build | ||
- cmake .. -DBOOST_ROOT="C:\deps\boost_1_60_0" -DmetaSMT_ENABLE_TESTS=off -DZ3_DIR="C:\deps\z3-4.5.0-x86-win" -DCRAVE_TIMEOUT=60 -DCRAVE_EXAMPLES_TIMEOUT=180 | ||
- cmake --build . --config Debug | ||
- ctest | ||
tags: | ||
- windows | ||
|
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
language: cpp | ||
dist: trusty | ||
sudo: false | ||
|
||
compiler: | ||
- gcc | ||
- clang | ||
|
||
cache: | ||
apt: true | ||
|
||
script: make && make test | ||
|
||
os: | ||
- linux |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
######################################################################################## | ||
## MIT License | ||
######################################################################################## | ||
## Copyright (c) 2012-2020 University of Bremen, Germany. | ||
## Copyright (c) 2015-2020 DFKI GmbH Bremen, Germany. | ||
## Copyright (c) 2020 Johannes Kepler University Linz, Austria. | ||
## | ||
## Permission is hereby granted, free of charge, to any person obtaining a copy | ||
## of this software and associated documentation files (the "Software"), to deal | ||
## in the Software without restriction, including without limitation the rights | ||
## to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
## copies of the Software, and to permit persons to whom the Software is | ||
## furnished to do so, subject to the following conditions: | ||
## | ||
## The above copyright notice and this permission notice shall be included in all | ||
## copies or substantial portions of the Software. | ||
## | ||
## THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
## IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
## FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
## AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
## LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
## OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
## SOFTWARE. | ||
########################################################################################## | ||
|
||
|
||
|
||
project ( crave2uvm ) | ||
cmake_minimum_required(VERSION 2.8) | ||
|
||
set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/build/bin) | ||
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/build/lib) | ||
set (CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake) | ||
|
||
#SystemC | ||
find_package(SystemC REQUIRED) | ||
|
||
#CRAVE | ||
find_package(CRAVE REQUIRED) | ||
|
||
#UVM-SystemC | ||
find_package(UVM-SystemC REQUIRED) | ||
|
||
#Includes setzen | ||
include_directories (${SystemC_INCLUDE_DIRS} ${CRAVE_INCLUDE_DIRS} ${UVM_SystemC_INCLUDE_DIRS} ${PROJECT_SOURCE_DIR}/src/include) | ||
|
||
#Compiler flags | ||
SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread -g -ggdb") | ||
|
||
add_subdirectory (examples) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
MIT License | ||
|
||
Copyright (c) 2012-2020 University of Bremen, Germany. | ||
Copyright (c) 2015-2020 DFKI GmbH Bremen, Germany. | ||
Copyright (c) 2020 Johannes Kepler University Linz, Austria. | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,43 @@ | ||
# crave | ||
# CRAVE2UVM prototype | ||
|
||
This projects contains a prototypical integration of CRAVE with UVM-SystemC to provide access to constrained randomization and coverage. | ||
For demonstration, we ported the SystemVerilog example UBUS to UVM-SystemC and included it in this distribution. | ||
|
||
## Requirements | ||
|
||
Make sure all pre install requirements of CRAVE and UVM-SystemC are met: | ||
|
||
* CMake (at least v2.8.9) | ||
* GNU Make | ||
* g++ (at least v4.7.2) | ||
* SystemC (the environment variable SYSTEMC_HOME must be set accordingly) | ||
* Boost (at least v1.50.0 and the environment variable BOOST_ROOT must be set accordingly) | ||
* zlib development libraries (e.g. zlib1g-dev). | ||
|
||
The version of CRAVE included in this distribution by default will build a minimal configuration (Glog and 2 solver backends: CUDD and Z3). | ||
Other configurations with additional backends (e.g. Boolector, SWORD, CVC4, etc.) are also possible. | ||
If download is permitted, CRAVE can automatically download and build these backends. | ||
Otherwise, the user needs to provide appropriate source or binary archive in deps/cache. | ||
For more detailed instructions , please refer to the CRAVE README or contact us. | ||
|
||
## Installation | ||
|
||
To install and run the example, use the buildscript on the toplevel of this repository. It currently executes three common tasks: | ||
|
||
1. ./buildscript install: this will install CRAVE (shipped with this distribution) into ./crave, locally compiles UVM-SystemC into ../.. and setup the Makefile for the example "Ubus". | ||
|
||
2. ./buildscript compile: this will compile the example and put the executables into build/bin. | ||
|
||
3. ./buildscript run: this will run the Ubus example. | ||
|
||
## Tested OS | ||
|
||
This distribution has been tested on the following 64-bit Linux (x86_64) systems: | ||
|
||
* Fedora 22 with g++-5.3.1 | ||
* Ubuntu 14.04.4 LTS with g++-4.8.4 | ||
* Debian 7.0 with g++-4.7.2 | ||
|
||
## Contact | ||
For bugreport and feedback: crave@systemc-verification.org | ||
|
Oops, something went wrong.