updates scc and applies needed changes

This commit is contained in:
Eyck Jentzsch 2022-09-30 15:21:01 +02:00
parent d63abbd94f
commit 219c2e60cd
6 changed files with 24 additions and 45 deletions

View File

@ -23,7 +23,7 @@
<folderInfo id="cdt.managedbuild.toolchain.gnu.base.2088633632.654284138" name="/" resourcePath="">
<toolChain id="cdt.managedbuild.toolchain.gnu.base.812439786" name="Linux GCC" nonInternalBuilderId="de.marw.cdt.cmake.core.genscriptbuilder" superClass="cdt.managedbuild.toolchain.gnu.base">
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.GNU_ELF;org.eclipse.cdt.core.ELF" id="cdt.managedbuild.target.gnu.platform.base.958806066" name="Debug Platform" osList="linux,hpux,aix,qnx" superClass="cdt.managedbuild.target.gnu.platform.base"/>
<builder buildPath="/SystemC-Components-Test/build/Debug" id="de.marw.cdt.cmake.core.genscriptbuilder.1812274003" keepEnvironmentInBuildfile="false" name="CMake Builder" parallelBuildOn="true" parallelizationNumber="12" superClass="de.marw.cdt.cmake.core.genscriptbuilder"/>
<builder buildPath="/SystemC-Components-Test/build/Debug" id="cmake4eclipse.mbs.builder.1637823455" keepEnvironmentInBuildfile="false" name="CMake Builder" parallelBuildOn="true" parallelizationNumber="optimal" superClass="cmake4eclipse.mbs.builder"/>
<tool id="cdt.managedbuild.tool.gnu.archiver.base.1152431980" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.base"/>
<tool id="cdt.managedbuild.tool.gnu.cpp.compiler.base.2062399929" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.base">
<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.770113519" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
@ -59,6 +59,12 @@
<def name="CMAKE_BUILD_TYPE" type="STRING" val="${ConfigName}"/>
</defs>
</storageModule>
<storageModule buildDir="build/${ConfigName}" dirtyTs="1664541263624" moduleId="de.marw.cmake4eclipse.mbs.settings">
<options/>
<defs>
<def name="CMAKE_BUILD_TYPE" type="STRING" val="Debug"/>
</defs>
</storageModule>
</cconfiguration>
<cconfiguration id="cdt.managedbuild.toolchain.gnu.base.2088633632.342506890">
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.toolchain.gnu.base.2088633632.342506890" moduleId="org.eclipse.cdt.core.settings" name="Release">
@ -239,6 +245,7 @@
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
<storageModule moduleId="refreshScope" versionNumber="2">
<configuration configurationName="Debug+Tidy"/>
<configuration configurationName="RelWithDebInfo"/>
<configuration configurationName="Default">
<resource resourceType="PROJECT" workspacePath="/SystemC-Components-Test"/>
</configuration>
@ -275,4 +282,4 @@
</target>
</buildTargets>
</storageModule>
</cproject>
</cproject>

1
.gitignore vendored
View File

@ -35,3 +35,4 @@
/simple_system.txlog
/my_db*
/.settings/
/Debug/

View File

@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.12)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake ${CMAKE_CURRENT_SOURCE_DIR}/scc/cmake)
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/scc/cmake)
project(SCC_Test)
@ -8,19 +8,9 @@ set(ENABLE_SCV TRUE CACHE BOOL "Enable use of SCV")
set(ENABLE_SHARED TRUE CACHE BOOL "Build shared libraries")
set(ENABLE_CLANG_TIDY FALSE CACHE BOOL "Enable clang-tidy checks")
include(GitFunctions)
get_info_from_git()
### set the directory names of the submodules
set(GIT_SUBMODULES scc)
set(GIT_SUBMODULE_DIR_sc-components .)
### set each submodules's commit or tag that is to be checked out
### (leave empty if you want master)
#set(GIT_SUBMODULE_VERSION_sc-components 3af6b9836589b082c19d9131c5d0b7afa8ddd7cd)
set(GIT_SUBMODULE_BRANCH_sc-components ${GIT_BRANCH})
include(GNUInstallDirs)
include(ConanInline)
include(GNUInstallDirs)
include(BuildType)
#enable_testing()
@ -70,7 +60,7 @@ else()
endif()
endif()
setup_conan(TARGETS)
conan_check()
conan_configure(REQUIRES fmt/6.1.2 boost/1.75.0 gsl-lite/0.37.0 systemc/2.3.3 systemc-cci/1.0.0
GENERATORS cmake_find_package
OPTIONS fmt:header_only=True
@ -81,30 +71,11 @@ find_package(ZLIB)
# This line finds the boost lib and headers.
set(Boost_NO_BOOST_CMAKE ON) # Don't do a find_package in config mode before searching for a regular boost install.
find_package(Boost COMPONENTS program_options filesystem system thread REQUIRED)
# set-up SystemC and SCV
include(FindSystemCPackage)
if(NOT SystemC_FOUND)
message( FATAL_ERROR "SystemC library not found." )
endif()
find_package(fmt)
include(SystemCPackage)
enable_testing()
add_subdirectory(scc)
add_subdirectory(examples)
add_subdirectory(tests)
#
# SYSTEM PACKAGING (RPM, TGZ, ...)
# _____________________________________________________________________________
#include(CPackConfig)
#
# CMAKE PACKAGING (for other CMake projects to use this one easily)
# _____________________________________________________________________________
#include(PackageConfigurator)
#include(FeatureSummary)
#feature_summary(WHAT ENABLED_FEATURES DISABLED_FEATURES PACKAGES_FOUND)

View File

@ -1,5 +1,5 @@
#include <ahb/bfm/initiator.h>
#include <ahb/bfm/target.h>
#include <ahb/pin/initiator.h>
#include <ahb/pin/target.h>
#include <tlm/scc/initiator_mixin.h>
#include <tlm/scc/target_mixin.h>
#include <scc/configurable_tracer.h>
@ -17,7 +17,7 @@ class testbench: public sc_module, public scc::traceable {
public:
enum { WIDTH=64};
tlm::scc::initiator_mixin<tlm::tlm_initiator_socket<WIDTH>> isck{"isck"};
ahb::bfm::initiator<WIDTH> intor{"intor"};
ahb::pin::initiator<WIDTH> intor{"intor"};
sc_core::sc_clock HCLK{"HCLK", 10_ns};
sc_core::sc_signal<bool> HRESETn{"HRESETn"};
sc_core::sc_signal<sc_dt::sc_uint<32>> HADDR{"HADDR"};
@ -33,7 +33,7 @@ public:
sc_core::sc_signal<bool> HRESP{"HRESP"};
sc_core::sc_signal<bool> HSEL{"HSEL"};
ahb::bfm::target<WIDTH> target{"target"};
ahb::pin::target<WIDTH> target{"target"};
tlm::scc::target_mixin<tlm::tlm_target_socket<WIDTH>> tsck{"tsck"};
testbench(sc_module_name nm):sc_module(nm){

2
scc

@ -1 +1 @@
Subproject commit 64bb5dd1e6c81d38ade0d53fd8c7b93d3110a5d8
Subproject commit ebc5c4f9097e50f109549ffb6b6bd6693985f307

View File

@ -11,12 +11,12 @@
#include <cassert>
int main(int arcg, char* argv[]){
IoRedirector::get().start();
auto result1 = IoRedirector::get().get_output();
util::IoRedirector::get().start();
auto result1 = util::IoRedirector::get().get_output();
assert(result1=="");
printf("Some output");
std::cout<<"Some other output"<<std::endl;
auto result2 = IoRedirector::get().get_output();
auto result2 = util::IoRedirector::get().get_output();
assert(result2=="Some outputSome other output\n");
IoRedirector::get().stop();
util::IoRedirector::get().stop();
}