From 62b6d3a966441c8f0af5ceeb4f60682a623193f6 Mon Sep 17 00:00:00 2001 From: mateo Date: Mon, 5 Jul 2021 12:37:19 +0200 Subject: [PATCH 1/2] Correction of readme.md --- README.md | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/README.md b/README.md index 0198472..b13e549 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,50 @@ # SystemC-Components-Test Examples and tests for the SystemC-Components + +#Prerequisites: + +In Console: + + -Check for needed modules in ~/.bashrc + they should be available directly in the linux installation or in the Modulefile top level file in the Project. If not, install it and add it to $PATH with: + + export PATH="needed-path:$PATH" + + -Edit bashrc and add: + + ./opt/shared/modules/4.4.1/init/bash + module use /opt/shared/modules/modulefiles + + at end of file. + + -Load the Modules from the top level file in the Project: + + module load ./Modulefile + + -Install conan with: + + pip install conan + + -and run this comands to run conan with the C++11 library: + + conan profile new default --detect --force + conan profile update settings.compiler.libcxx=libstdc++11 default + + -Add conan to $PATH + +#Build: + -Create folder "build" in SystemC-Components-Test project folder. + -Build the project with: + + cmake .. + + -compile + + make -j4 #4 means number of cores where it is compiled. + + +#Run: + -from build folder run: + + ./bin/"binary-name" #binary name: zb. "sim_performance" + \ No newline at end of file From e8ffc83a80e446f39a7fdc622bc41f46f57c3d73 Mon Sep 17 00:00:00 2001 From: Mateo Argudo Date: Fri, 23 Jul 2021 13:39:27 +0200 Subject: [PATCH 2/2] test added for sim_performance, uint8 changed to unsigned in scman dim definition and input --- tests/sim_performance/CMakeLists.txt | 7 +++++++ tests/sim_performance/sc_main.cpp | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/tests/sim_performance/CMakeLists.txt b/tests/sim_performance/CMakeLists.txt index b907dc9..950dd9d 100644 --- a/tests/sim_performance/CMakeLists.txt +++ b/tests/sim_performance/CMakeLists.txt @@ -7,3 +7,10 @@ add_executable (sim_performance ) target_link_libraries (sim_performance LINK_PUBLIC scc) target_link_libraries (sim_performance LINK_PUBLIC ${Boost_LIBRARIES} ) + +#Mateo Done erst count 16384 +foreach(x RANGE 1 10) + add_test(NAME sim_performance_16x16_${x} COMMAND sim_performance) + add_test(NAME sim_performance_16x16_${x} COMMAND sim_performance --dim 32 --count 50000) + add_test(NAME sim_performance_16x16_${x} COMMAND sim_performance --dim 64 --count 100000) +endforeach() \ No newline at end of file diff --git a/tests/sim_performance/sc_main.cpp b/tests/sim_performance/sc_main.cpp index 4b8c287..88356ab 100644 --- a/tests/sim_performance/sc_main.cpp +++ b/tests/sim_performance/sc_main.cpp @@ -47,7 +47,7 @@ int sc_main(int argc, char *argv[]) { ("help,h", "Print help message") ("debug,d", "set debug level") ("trace,t", "trace SystemC signals") - ("dim", po::value()->default_value(16)) + ("dim", po::value()->default_value(16)) ("count", po::value()->default_value(16384)); // clang-format on po::variables_map vm; @@ -80,7 +80,7 @@ int sc_main(int argc, char *argv[]) { /////////////////////////////////////////////////////////////////////////// perf_estimator estimator; auto const count=vm["count"].as(); - auto const dim = vm["dim"].as(); + auto const dim = vm["dim"].as(); SCCINFO()<<"Instantiating "<<(unsigned)dim<<"x"<<(unsigned)dim<<" matrix and executing "<