Skip to content

Commit

Permalink
Merge branch 'develop' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
eyck committed Apr 23, 2022
2 parents 5b65d82 + adf90b1 commit 9c4dd4a
Show file tree
Hide file tree
Showing 134 changed files with 23,632 additions and 2,517 deletions.
31 changes: 22 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,23 @@ if(CMAKE_PROJECT_NAME STREQUAL "scc")
message(STATUS "Building SCC in standalone mode")
include(GNUInstallDirs)
include(ConanInline)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
conan_check()
set(CONAN_PACKAGE_LIST fmt/6.1.2 zlib/1.2.11 boost/1.75.0 gsl-lite/0.37.0)
set(CONAN_PACKAGE_OPTIONS fmt:header_only=True boost:without_stacktrace=True boost:fPIC=True boost:shared=False boost:header_only=False)
if(NOT DEFINED ENV{SYSTEMC_HOME})
set(CONAN_PACKAGE_LIST ${CONAN_PACKAGE_LIST} systemc/2.3.3 systemc-cci/1.0.0)
set(CONAN_PACKAGE_OPTIONS ${CONAN_PACKAGE_OPTIONS} systemc-cci:shared=False)
set(CONAN_PACKAGE_LIST fmt/8.0.1 zlib/1.2.11 boost/1.75.0 gsl-lite/0.37.0)
set(CONAN_PACKAGE_OPTIONS fmt:header_only=True boost:without_stacktrace=True boost:shared=False boost:header_only=False)
if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
list(APPEND CONAN_PACKAGE_OPTIONS boost:fPIC=True)
endif()
conan_configure(REQUIRES ${CONAN_PACKAGE_LIST} GENERATORS cmake
OPTIONS ${CONAN_PACKAGE_OPTIONS})
if(NOT USE_CWR_SYSTEMC AND NOT USE_NCSC_SYSTEMC AND NOT DEFINED ENV{SYSTEMC_HOME})
if(${CMAKE_SYSTEM_NAME} STREQUAL "Windows") # for as long as systemc-cci package is not available for windows
set(CONAN_PACKAGE_LIST ${CONAN_PACKAGE_LIST} systemc/2.3.3)
else()
set(CONAN_PACKAGE_LIST ${CONAN_PACKAGE_LIST} systemc/2.3.3 systemc-cci/1.0.0)
set(CONAN_PACKAGE_OPTIONS ${CONAN_PACKAGE_OPTIONS} systemc-cci:shared=False)
endif()
endif()
conan_configure(REQUIRES ${CONAN_PACKAGE_LIST} GENERATORS cmake OPTIONS ${CONAN_PACKAGE_OPTIONS})
if(CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo")
conan_install(BUILD_TYPE Release)
else()
Expand Down Expand Up @@ -61,6 +69,9 @@ find_package(Doxygen)
set(DOXYGEN_GENERATE_MAN NO)
set(DOXYGEN_GENERATE_LATEX NO)
set(DOXYGEN_OUTPUT_DIRECTORY "${scc_BINARY_DIR}/scc")
set(DOXYGEN_GENERATE_TREEVIEW YES)
set(DOXYGEN_HTML_EXTRA_STYLESHEET ${CMAKE_CURRENT_SOURCE_DIR}/doc/doxygen-awesome.css)
#set(DOXYGEN_HTML_EXTRA_STYLESHEET ${CMAKE_CURRENT_SOURCE_DIR}/doc/doxygen-awesome.css ${CMAKE_CURRENT_SOURCE_DIR}/doc/doxygen-awesome-sidebar-only.css)
# this target will only be built if specifically asked to.
# run "make scc-docs" to create the doxygen documentation
doxygen_add_docs(
Expand Down Expand Up @@ -160,7 +171,7 @@ else()
target_link_libraries(scc INTERFACE ${Boost_datetime_LIBRARY})
endif()
target_link_libraries(scc INTERFACE scc-util scc-sysc components busses scv-tr)
target_link_libraries(scc INTERFACE jsoncpp)
#target_link_libraries(scc INTERFACE jsoncpp)
target_link_libraries(scc INTERFACE ${FMT_TARGET} ${SPDLOG_TARGET})

set_target_properties(scc PROPERTIES
Expand All @@ -183,5 +194,7 @@ add_subdirectory(src/components)
add_subdirectory(src/sysc)
add_subdirectory(third_party)
if(NOT SCC_LIB_ONLY)
add_subdirectory(examples)
if (NOT (DEFINED CMAKE_CXX_CLANG_TIDY OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang"))
add_subdirectory(examples)
endif()
endif()
70 changes: 47 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,35 +2,67 @@ SystemC-Components (SCC)
========================

SCC is supposed to be a light weight productivity library for SystemC and TLM 2.0 based modeling tasks using C++11.
* scv4tlm - Tracing TLM2 Sockets

Here is a short list of features.

* Extended logging and log configuration implementation

This is built on top of the SystemC report implementation and allows use of iostream based logging as well as instance based log level connfiguration

* Config file reader and configuration handler

The configurer allows to read a JSON file and apply the values to cci_param as well as to sc_attributes. This can be used for instance-based logging as well as instance-based trace configuration

* Automatic tracer

The tracer(s) allow to automatically discover signals and sc_variables (see below) and register them with the trace file. If the configurer is being used the tracing can be controlled on an per-instance base

* Various optimized trace file implementations
* compressed VCD
* FST (used by [GTKWave](http://gtkwave.sourceforge.net/))

* Tracing TLM2 Sockets

TLM2.0 compliant sockets which can be configured to trace transactions passing thru them using the SCV transaction recording facilities. The project is set-up to be used with Eclipse CDT and its build system

* sysc/scv_tr_db.h extended transaction recording databases
* Stripped down version of SCV

scv_tr_sqlite is a SQLite based database back-end for the SystemC Verification library (SCV) transaction recording infrastructure while scv_tr_compressed is a text base database back-end with compression to reduce the file size
To reduce the dependency SCC comes with a stripped down version of Accelleras SystemC Verification (SCV) library. This library does not support introspection and randomization anymore, its primary purpose is to enable transaction recording. Those traces can be visualized using [SCViewer](https://minres.github.io/SCViewer/).

* Extended and optimized transaction recording database(s)

Aside of the SCV text file format SCC comes with other file format writer. scv_tr_sqlite is a SQLite based database back-end for the SystemC Verification library (SCV) transaction recording infrastructure while scv_tr_compressed is a text base database back-end with compression to reduce the file size. These format are also supporte by the [SCViewer](https://minres.github.io/SCViewer/).

* sysc::sc_variable

A plain C/C++ variable wrapper to access a storage location via the SystemC object tree. It allows also to register value change observers to react on changes.

* sysc::sc_register

a resource wrapper to access a storage location via a TLM 2.0 socket. This is realized using
A resource wrapper to access a storage location via a TLM 2.0 socket. It allows to register read and write callback to implement register functionality upon reading/writing the register.

* sysc::tlm_target

a component distributing TLM2.0 accesses to target resources e.g. sysc::sc_register
A component distributing TLM2.0 accesses to target resources e.g. sysc::sc_register

* sysc::router

a simple component to route TLM2.0 accesses of a set of masters to a set of targets based on generic payload addresses
A simple component to route TLM2.0 accesses of a set of masters to a set of targets based on generic payload addresses

* various TLM2.0 AT and pin-level adapters for common bus protocols like
* APB
* AHB
* AXI/ACE
* OBI

build instructions
==================
The full documentation can be found at the [Github pages](https://minres.github.io/SystemC-Components/)

the repo is cmake based. Make sure that you have at least cmake 3.12 installed.
Build instructions
==================

There is a dependency on SystemC. For some capabilities SCV is required, but this
can be selected during build time.
The repo is cmake based and uses conan. Make sure that you have at least cmake 3.16 and conan installed.

The suggested build flow is:
The suggested build steps are:

- create a build directory and enter into it
- execute cmake with applicable options
Expand All @@ -41,20 +73,12 @@ The suggested build flow is:
For example:

```
setenv WORKAREA `pwd`
setenv LIB_VERSION gcc-6.3.0-SystemC-2.3.3.O2
setenv SYSTEMC_HOME /workarea3/SystemC/systemc-2.3.3-gcc-6.3.0-c++14-install
setenv SCV_HOME ${SYSTEMC_HOME}
setenv TLM_HOME ${SYSTEMC_HOME}/include
setenv GCC_HOME /workarea3/gcc-6.3.0-install
setenv PATH ${GCC_HOME}/bin:${PATH}
setenv CC ${GCC_HOME}/bin/gcc
setenv CXX ${GCC_HOME}/bin/g++
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=$WORKAREA/install/$LIB_VERSION -DENABLE_SCV=ON ..
cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=<some install path> ..
make
make install
make install
make test
./examples/ace-axi/ace_axi_example
./examples/axi-axi/axi_axi_example
Expand Down
2 changes: 1 addition & 1 deletion cmake/CPackConfig.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ else()
endif()

set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "SystemC components and extensions")
set(CPACK_PACKAGE_CONTACT "MINRES Technolgies GmbH <info@minres.com>")
set(CPACK_PACKAGE_CONTACT "MINRES Technologies GmbH <info@minres.com>")
set(CPACK_PACKAGE_VERSION ${VERSION})
set(CPACK_PACKAGE_VERSION_MAJOR ${VERSION_MAJOR})
set(CPACK_PACKAGE_VERSION_MINOR ${VERSION_MINOR})
Expand Down
15 changes: 14 additions & 1 deletion cmake/ConanInline.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,20 @@ macro(conan_check)
message("Downloading conan.cmake to ${CONAN_CMAKE_LIST_DIR}")
#set(URL https://raw.githubusercontent.com/conan-io/cmake-conan/develop/conan.cmake)
set(URL https://raw.githubusercontent.com/conan-io/cmake-conan/43e385830ee35377dbd2dcbe8d5a9e750301ea00/conan.cmake)
file(DOWNLOAD ${URL} ${CONAN_CMAKE_LIST_DIR}/conan.cmake TIMEOUT 60)
file(DOWNLOAD ${URL} ${CONAN_CMAKE_LIST_DIR}/conan.cmake TIMEOUT 60 STATUS DOWNLOAD_STATUS)
list(GET DOWNLOAD_STATUS 0 STATUS_CODE)
list(GET DOWNLOAD_STATUS 1 ERROR_MESSAGE)
if(NOT (${STATUS_CODE} EQUAL 0))
# Exit CMake if the download failed, printing the error message.
message(FATAL_ERROR "Error occurred during download: ${ERROR_MESSAGE}")
endif()
if(NOT EXISTS ${CONAN_CMAKE_LIST_DIR}/conan.cmake)
message(FATAL_ERROR "Could not download conan.cmake. Please check your internet connection or proxy settings")
endif()
file (SIZE ${CONAN_CMAKE_LIST_DIR}/conan.cmake CONAN_CMAKE_SIZE)
if(${CONAN_CMAKE_SIZE} EQUAL 0)
message(FATAL_ERROR "Could not download conan.cmake. Please check your internet connection or proxy settings")
endif()
endif()
if("${CMAKE_BUILD_TYPE}" STREQUAL "")
set(CMAKE_BUILD_TYPE Release)
Expand Down
2 changes: 1 addition & 1 deletion contrib/pysysc/src/pysysc/scc/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2019 -2021 MINRES Technolgies GmbH
# Copyright (c) 2019 -2021 MINRES Technologies GmbH
#
# SPDX-License-Identifier: Apache-2.0
#
Expand Down
108 changes: 108 additions & 0 deletions doc/doxygen-awesome-sidebar-only.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
/**
Doxygen Awesome
https://github.com/jothepro/doxygen-awesome-css
MIT License
Copyright (c) 2021 jothepro
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.
*/

html {
/* side nav width. MUST be = `TREEVIEW_WIDTH`.
* Make sure it is wide enought to contain the page title (logo + title + version)
*/
--side-nav-fixed-width: 340px;
--menu-display: none;

--top-height: 120px;
}


@media screen and (min-width: 768px) {
html {
--searchbar-background: var(--page-background-color);
}

#side-nav {
min-width: var(--side-nav-fixed-width);
max-width: var(--side-nav-fixed-width);
top: var(--top-height);
overflow: visible;
}

#nav-tree, #side-nav {
height: calc(100vh - var(--top-height)) !important;
}

#nav-tree {
padding: 0;
}

#top {
display: block;
border-bottom: none;
height: var(--top-height);
margin-bottom: calc(0px - var(--top-height));
max-width: var(--side-nav-fixed-width);
background: var(--side-nav-background);
}
#main-nav {
float: left;
padding-right: 0;
}

.ui-resizable-handle {
cursor: default;
width: 1px !important;
box-shadow: 0 calc(-2 * var(--top-height)) 0 0 var(--separator-color);
}

#nav-path {
position: fixed;
right: 0;
left: var(--side-nav-fixed-width);
bottom: 0;
width: auto;
}

#doc-content {
height: calc(100vh - 31px) !important;
padding-bottom: calc(3 * var(--spacing-large));
padding-top: calc(var(--top-height) - 80px);
box-sizing: border-box;
margin-left: var(--side-nav-fixed-width) !important;
}

#MSearchBox {
width: calc(var(--side-nav-fixed-width) - calc(2 * var(--spacing-medium)));
}

#MSearchField {
width: calc(var(--side-nav-fixed-width) - calc(2 * var(--spacing-medium)) - 65px);
}

#MSearchResultsWindow {
left: var(--spacing-medium) !important;
right: auto;
}
}

0 comments on commit 9c4dd4a

Please sign in to comment.