Compare commits
6 Commits
Author | SHA1 | Date | |
---|---|---|---|
626e542627 | |||
de4d740187 | |||
b274b0d80c | |||
1b99544779 | |||
b63030b154 | |||
5855da9131 |
@ -15,7 +15,8 @@
|
|||||||
"CMAKE_POLICY_DEFAULT_CMP0091": "NEW",
|
"CMAKE_POLICY_DEFAULT_CMP0091": "NEW",
|
||||||
"CMAKE_BUILD_TYPE": "Debug",
|
"CMAKE_BUILD_TYPE": "Debug",
|
||||||
"CMAKE_CXX_STANDARD": "17",
|
"CMAKE_CXX_STANDARD": "17",
|
||||||
"CMAKE_PROJECT_TOP_LEVEL_INCLUDES": "cmake-conan/conan_provider.cmake"
|
"CMAKE_PROJECT_TOP_LEVEL_INCLUDES": "cmake-conan/conan_provider.cmake",
|
||||||
|
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -24,7 +25,8 @@
|
|||||||
"CMAKE_POLICY_DEFAULT_CMP0091": "NEW",
|
"CMAKE_POLICY_DEFAULT_CMP0091": "NEW",
|
||||||
"CMAKE_BUILD_TYPE": "RelWithDebInfo",
|
"CMAKE_BUILD_TYPE": "RelWithDebInfo",
|
||||||
"CMAKE_CXX_STANDARD": "17",
|
"CMAKE_CXX_STANDARD": "17",
|
||||||
"CMAKE_PROJECT_TOP_LEVEL_INCLUDES": "cmake-conan/conan_provider.cmake"
|
"CMAKE_PROJECT_TOP_LEVEL_INCLUDES": "cmake-conan/conan_provider.cmake",
|
||||||
|
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -33,7 +35,19 @@
|
|||||||
"CMAKE_POLICY_DEFAULT_CMP0091": "NEW",
|
"CMAKE_POLICY_DEFAULT_CMP0091": "NEW",
|
||||||
"CMAKE_BUILD_TYPE": "Release",
|
"CMAKE_BUILD_TYPE": "Release",
|
||||||
"CMAKE_CXX_STANDARD": "17",
|
"CMAKE_CXX_STANDARD": "17",
|
||||||
"CMAKE_PROJECT_TOP_LEVEL_INCLUDES": "cmake-conan/conan_provider.cmake"
|
"CMAKE_PROJECT_TOP_LEVEL_INCLUDES": "cmake-conan/conan_provider.cmake",
|
||||||
|
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON"
|
||||||
|
}
|
||||||
|
},{
|
||||||
|
"name": "DebugSC30",
|
||||||
|
"cacheVariables": {
|
||||||
|
"CMAKE_POLICY_DEFAULT_CMP0091": "NEW",
|
||||||
|
"CMAKE_BUILD_TYPE": "Debug",
|
||||||
|
"CMAKE_CXX_STANDARD": "17",
|
||||||
|
"CMAKE_PROJECT_TOP_LEVEL_INCLUDES": "cmake-conan/conan_provider.cmake",
|
||||||
|
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON",
|
||||||
|
"CMAKE_PREFIX_PATH": "/opt/shared/systemc/RockyLinux/3.0.1-cxx17"
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
26
Jenkinsfile
vendored
26
Jenkinsfile
vendored
@ -35,6 +35,7 @@ void build_n_test_project() {
|
|||||||
. .venv/bin/activate
|
. .venv/bin/activate
|
||||||
pip3 install -r requirements.txt
|
pip3 install -r requirements.txt
|
||||||
cmake -S . -B build --preset Release
|
cmake -S . -B build --preset Release
|
||||||
|
cmake --build build --target format-check
|
||||||
cmake --build build -j12
|
cmake --build build -j12
|
||||||
cmake --build build --target test
|
cmake --build build --target test
|
||||||
'''
|
'''
|
||||||
@ -52,34 +53,25 @@ pipeline {
|
|||||||
stage('SCC test pipeline') {
|
stage('SCC test pipeline') {
|
||||||
parallel {
|
parallel {
|
||||||
stage('ubuntu-22.04') {
|
stage('ubuntu-22.04') {
|
||||||
agent {docker { image 'ubuntu-22.04' } }
|
agent {docker {
|
||||||
|
image 'ubuntu-22.04'
|
||||||
|
args ' -e CONAN_HOME=/var/jenkins_home/workspace/conan-jammy'
|
||||||
|
} }
|
||||||
stages {
|
stages {
|
||||||
stage('Checkout') { steps { checkout_project() }}
|
stage('Checkout') { steps { checkout_project() }}
|
||||||
stage('Build & test') { steps { build_n_test_project() }}
|
stage('Build & test') { steps { build_n_test_project() }}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('rockylinux8') {
|
stage('rockylinux8') {
|
||||||
agent {docker { image 'rockylinux8' } }
|
agent {docker {
|
||||||
|
image 'rockylinux8'
|
||||||
|
args ' -e CONAN_HOME=/var/jenkins_home/workspace/conan-rocky8'
|
||||||
|
} }
|
||||||
stages {
|
stages {
|
||||||
stage('Checkout') { steps { checkout_project() }}
|
stage('Checkout') { steps { checkout_project() }}
|
||||||
stage('Build & test') { steps { build_n_test_project() }}
|
stage('Build & test') { steps { build_n_test_project() }}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('Format check') {
|
|
||||||
agent {docker { image 'ubuntu-22.04' } }
|
|
||||||
stages {
|
|
||||||
stage('Checkout') { steps { checkout_project() }}
|
|
||||||
stage('Build & check format') { steps {
|
|
||||||
sh'''
|
|
||||||
python3 -mvenv .venv
|
|
||||||
. .venv/bin/activate
|
|
||||||
pip3 install -r requirements.txt
|
|
||||||
cmake -S . -B build --preset Release
|
|
||||||
cmake --build build --target format-check
|
|
||||||
'''
|
|
||||||
}}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
2
scc
2
scc
@ -1 +1 @@
|
|||||||
Subproject commit bccc9269ff84181d1287dd6021ab5eb52f8909d0
|
Subproject commit ca01246f5c1610e8caac0b3a5d0f2e0f36c4761c
|
@ -9,6 +9,7 @@ add_subdirectory(configuration)
|
|||||||
add_subdirectory(configurer)
|
add_subdirectory(configurer)
|
||||||
add_subdirectory(sc_fixed_tracing)
|
add_subdirectory(sc_fixed_tracing)
|
||||||
add_subdirectory(cxs_tlm)
|
add_subdirectory(cxs_tlm)
|
||||||
|
add_subdirectory(sim_speed)
|
||||||
if(FULL_TEST_SUITE)
|
if(FULL_TEST_SUITE)
|
||||||
add_subdirectory(sim_performance)
|
add_subdirectory(sim_performance)
|
||||||
endif()
|
endif()
|
||||||
|
3
tests/sim_speed/CMakeLists.txt
Normal file
3
tests/sim_speed/CMakeLists.txt
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
project (sim_speed)
|
||||||
|
add_executable(${PROJECT_NAME} sc_main.cpp)
|
||||||
|
target_link_libraries (${PROJECT_NAME} LINK_PUBLIC scc-sysc)
|
24
tests/sim_speed/sc_main.cpp
Normal file
24
tests/sim_speed/sc_main.cpp
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
#include <chrono>
|
||||||
|
#include <stdint.h>
|
||||||
|
#include <systemc>
|
||||||
|
|
||||||
|
using namespace sc_core;
|
||||||
|
|
||||||
|
int sc_main(int argc, char* argv[]) {
|
||||||
|
const uint64_t NS_VAL = 100000000;
|
||||||
|
|
||||||
|
sc_clock clk("clk", 1, SC_NS);
|
||||||
|
sc_time run_time(NS_VAL, SC_NS);
|
||||||
|
|
||||||
|
auto start = std::chrono::high_resolution_clock::now();
|
||||||
|
sc_start(run_time);
|
||||||
|
auto end = std::chrono::high_resolution_clock::now();
|
||||||
|
auto duration = std::chrono::duration_cast<std::chrono::microseconds>(end - start);
|
||||||
|
|
||||||
|
double simulated_cycles = (double)NS_VAL;
|
||||||
|
double real_us = duration.count();
|
||||||
|
double speed_Mhz = simulated_cycles / real_us;
|
||||||
|
std::cout << "Simulation speed: " << speed_Mhz << " MHz\n";
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user