diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 66000685..3bd8001a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,12 +1,16 @@ # vim: set ts=4 sw=4 expandtab: image: gcc -variables: - GIT_STRATEGY: fetch +before_script: + - apt-get update --yes + - apt-get install --yes cmake python3 python3-dev qtbase5-dev libqwt-qt5-dev sqlite3 lcov stages: - build - - tests + - test_DDR3 + - test_DDR4 + - test_HBM2 + - test_LPDDR4 - coverage build: @@ -14,24 +18,18 @@ build: script: - git submodule sync - git submodule update --init --recursive - - rm -rf build + - ls + - mkdir -p coverage - mkdir -p build - cd build - cmake -DDRAMSYS_COVERAGE_CHECK=ON ../DRAMSys - - make -j 16 + - make -j 10 - find . -name "*.o" -type f -delete - - rm -rf ${CI_PROJECT_DIR}/coverage - - mkdir -p ${CI_PROJECT_DIR}/coverage - - - cache: - key: build - paths: - - build/ - policy: push artifacts: paths: + - build/ + - DRAMSys/tests/ - coverage/ coverage: @@ -44,15 +42,10 @@ coverage: - lcov `find coverage -type f -exec echo "-a {}" \;` -o coverage/final.out - lcov --remove coverage/final.out '*/systemc*/include/*' '*/traceAnalyzer/*' '*/gcc*/include/*' '/usr/include/*' '*/third_party/*' -o coverage/final_dramsys.out - lcov --list coverage/final_dramsys.out - - artifacts: - paths: - - coverage/final.out - - coverage/final_dramsys.out include: - - '/DRAMSys/tests/lpddr4/ci.yml' - - '/DRAMSys/tests/ddr3_multirank/ci.yml' + - '/DRAMSys/tests/DDR3/ci.yml' - '/DRAMSys/tests/DDR4/ci.yml' - '/DRAMSys/tests/HBM2/ci.yml' + - '/DRAMSys/tests/LPDDR4/ci.yml' #- '/DRAMSys/tests/dramsys-gem5/ci.yml' # Should be activated again when a new gitlab runner with right dependencies is used diff --git a/DRAMSys/tests/DDR3/ci.yml b/DRAMSys/tests/DDR3/ci.yml new file mode 100644 index 00000000..92b444bc --- /dev/null +++ b/DRAMSys/tests/DDR3/ci.yml @@ -0,0 +1,28 @@ +# DDR3 Dual Rank Test with Staggered Power Down Policy and Scheduler FrFcfsGrp +example_DDR3: + stage: test_DDR3 + script: + - export GCOV_PREFIX=$(pwd) + - export GCOV_PREFIX_STRIP=$(pwd | awk -F"/" '{print NF-1}') + - cd build/simulator + - ./DRAMSys ../../DRAMSys/tests/DDR3/simulations/ddr3-example.json ../../DRAMSys/tests/DDR3/ + - ls -lah + - ls -lah ../../DRAMSys/tests/DDR3/expected/ + - sqldiff ../../DRAMSys/tests/DDR3/expected/ddr3-dual-rank_ddr3_ch0.tdb ddr3-dual-rank_ddr3_ch0.tdb + - perl -e 'if(`sqldiff --table Phases ../../DRAMSys/tests/DDR3/expected/ddr3-dual-rank_ddr3_ch0.tdb ddr3-dual-rank_ddr3_ch0.tdb` eq "") {exit(0)} else {exit(-1)}' + - perl -e 'if(`sqldiff --table Transactions ../../DRAMSys/tests/DDR3/expected/ddr3-dual-rank_ddr3_ch0.tdb ddr3-dual-rank_ddr3_ch0.tdb` eq "") {exit(0)} else {exit(-1)}' + - perl -e 'if(`sqldiff --table Power ../../DRAMSys/tests/DDR3/expected/ddr3-dual-rank_ddr3_ch0.tdb ddr3-dual-rank_ddr3_ch0.tdb` eq "") {exit(0)} else {exit(-1)}' + # Run Code Coverage + - lcov -q -c --rc geninfo_adjust_src_path=$GCOV_PREFIX -d ${CI_PROJECT_DIR}/build/ -o ${CI_PROJECT_DIR}/coverage/${CI_JOB_NAME}.out + + cache: + key: build + paths: + - build/ + policy: pull + + artifacts: + paths: + - build/simulator/ddr3-dual-rank_ddr3_ch0.tdb + - coverage/${CI_JOB_NAME}.out + expire_in: 2 days diff --git a/DRAMSys/tests/ddr3_multirank/configs/amconfigs/am_ddr3_8x2Gbx8_dimm_p1KB_dual_rank_rbc.json b/DRAMSys/tests/DDR3/configs/amconfigs/am_ddr3_8x2Gbx8_dimm_p1KB_dual_rank_rbc.json similarity index 100% rename from DRAMSys/tests/ddr3_multirank/configs/amconfigs/am_ddr3_8x2Gbx8_dimm_p1KB_dual_rank_rbc.json rename to DRAMSys/tests/DDR3/configs/amconfigs/am_ddr3_8x2Gbx8_dimm_p1KB_dual_rank_rbc.json diff --git a/DRAMSys/tests/ddr3_multirank/configs/mcconfigs/fr_fcfs_grp.json b/DRAMSys/tests/DDR3/configs/mcconfigs/fr_fcfs_grp.json similarity index 100% rename from DRAMSys/tests/ddr3_multirank/configs/mcconfigs/fr_fcfs_grp.json rename to DRAMSys/tests/DDR3/configs/mcconfigs/fr_fcfs_grp.json diff --git a/DRAMSys/tests/ddr3_multirank/configs/memspecs/MICRON_2GB_DDR3-1066_64bit_D_SODIMM.json b/DRAMSys/tests/DDR3/configs/memspecs/MICRON_2GB_DDR3-1066_64bit_D_SODIMM.json similarity index 100% rename from DRAMSys/tests/ddr3_multirank/configs/memspecs/MICRON_2GB_DDR3-1066_64bit_D_SODIMM.json rename to DRAMSys/tests/DDR3/configs/memspecs/MICRON_2GB_DDR3-1066_64bit_D_SODIMM.json diff --git a/DRAMSys/tests/ddr3_multirank/configs/simulator/ddr3.json b/DRAMSys/tests/DDR3/configs/simulator/ddr3.json similarity index 100% rename from DRAMSys/tests/ddr3_multirank/configs/simulator/ddr3.json rename to DRAMSys/tests/DDR3/configs/simulator/ddr3.json diff --git a/DRAMSys/tests/ddr3_multirank/configs/thermalsim/config.json b/DRAMSys/tests/DDR3/configs/thermalsim/config.json similarity index 100% rename from DRAMSys/tests/ddr3_multirank/configs/thermalsim/config.json rename to DRAMSys/tests/DDR3/configs/thermalsim/config.json diff --git a/DRAMSys/tests/ddr3_multirank/configs/thermalsim/core.flp b/DRAMSys/tests/DDR3/configs/thermalsim/core.flp similarity index 100% rename from DRAMSys/tests/ddr3_multirank/configs/thermalsim/core.flp rename to DRAMSys/tests/DDR3/configs/thermalsim/core.flp diff --git a/DRAMSys/tests/ddr3_multirank/configs/thermalsim/mem.flp b/DRAMSys/tests/DDR3/configs/thermalsim/mem.flp similarity index 100% rename from DRAMSys/tests/ddr3_multirank/configs/thermalsim/mem.flp rename to DRAMSys/tests/DDR3/configs/thermalsim/mem.flp diff --git a/DRAMSys/tests/ddr3_multirank/configs/thermalsim/powerInfo.json b/DRAMSys/tests/DDR3/configs/thermalsim/powerInfo.json similarity index 100% rename from DRAMSys/tests/ddr3_multirank/configs/thermalsim/powerInfo.json rename to DRAMSys/tests/DDR3/configs/thermalsim/powerInfo.json diff --git a/DRAMSys/tests/ddr3_multirank/configs/thermalsim/stack.stk b/DRAMSys/tests/DDR3/configs/thermalsim/stack.stk similarity index 100% rename from DRAMSys/tests/ddr3_multirank/configs/thermalsim/stack.stk rename to DRAMSys/tests/DDR3/configs/thermalsim/stack.stk diff --git a/DRAMSys/tests/ddr3_multirank/simulations/ddr3-example.json b/DRAMSys/tests/DDR3/simulations/ddr3-example.json similarity index 100% rename from DRAMSys/tests/ddr3_multirank/simulations/ddr3-example.json rename to DRAMSys/tests/DDR3/simulations/ddr3-example.json diff --git a/DRAMSys/tests/DDR4/ci.yml b/DRAMSys/tests/DDR4/ci.yml index 1ac192fa..23ffd8ea 100644 --- a/DRAMSys/tests/DDR4/ci.yml +++ b/DRAMSys/tests/DDR4/ci.yml @@ -1,6 +1,6 @@ # DDR4 with 4 bank groups, flexible rankwise refresh and FrFcfs scheduler: example_DDR4: - stage: tests + stage: test_DDR4 script: - export GCOV_PREFIX=$(pwd) - export GCOV_PREFIX_STRIP=$(pwd | awk -F"/" '{print NF-1}') @@ -12,8 +12,6 @@ example_DDR4: - perl -e 'if(`sqldiff --table Phases ../../DRAMSys/tests/DDR4/expected/ddr4-bankgrp_ddr4_ch0.tdb ddr4-bankgrp_ddr4_ch0.tdb` eq "") {exit(0)} else {exit(-1)}' - perl -e 'if(`sqldiff --table Transactions ../../DRAMSys/tests/DDR4/expected/ddr4-bankgrp_ddr4_ch0.tdb ddr4-bankgrp_ddr4_ch0.tdb` eq "") {exit(0)} else {exit(-1)}' - perl -e 'if(`sqldiff --table Power ../../DRAMSys/tests/DDR4/expected/ddr4-bankgrp_ddr4_ch0.tdb ddr4-bankgrp_ddr4_ch0.tdb` eq "") {exit(0)} else {exit(-1)}' - #- cd ../traceAnalyzer - #- python3 ../../DRAMSys/traceAnalyzer/scripts/tests.py ../simulator/ddr4-bankgrp_ddr4_ch0.tdb | if ! grep "failed"; then exit 0; else exit 1; fi # Run Code Coverage - lcov -q -c --rc geninfo_adjust_src_path=$GCOV_PREFIX -d ${CI_PROJECT_DIR}/build/ -o ${CI_PROJECT_DIR}/coverage/${CI_JOB_NAME}.out diff --git a/DRAMSys/tests/HBM2/ci.yml b/DRAMSys/tests/HBM2/ci.yml index 8ad131f9..af9761c1 100644 --- a/DRAMSys/tests/HBM2/ci.yml +++ b/DRAMSys/tests/HBM2/ci.yml @@ -1,5 +1,5 @@ example_HBM2: - stage: tests + stage: test_HBM2 script: - export GCOV_PREFIX=$(pwd) - export GCOV_PREFIX_STRIP=$(pwd | awk -F"/" '{print NF-1}') diff --git a/DRAMSys/tests/lpddr4/ci.yml b/DRAMSys/tests/LPDDR4/ci.yml similarity index 62% rename from DRAMSys/tests/lpddr4/ci.yml rename to DRAMSys/tests/LPDDR4/ci.yml index dfb81f10..6fc7b6ee 100644 --- a/DRAMSys/tests/lpddr4/ci.yml +++ b/DRAMSys/tests/LPDDR4/ci.yml @@ -1,19 +1,17 @@ # LPDDR4 with Bankwise Flexible Refresh and FIFO Scheduler: example_LPDDR4: - stage: tests + stage: test_LPDDR4 script: - export GCOV_PREFIX=$(pwd) - export GCOV_PREFIX_STRIP=$(pwd | awk -F"/" '{print NF-1}') - cd build/simulator - - ./DRAMSys ../../DRAMSys/tests/lpddr4/simulations/lpddr4-example.json ../../DRAMSys/tests/lpddr4/ + - ./DRAMSys ../../DRAMSys/tests/LPDDR4/simulations/lpddr4-example.json ../../DRAMSys/tests/LPDDR4/ - ls -lah - - ls -lah ../../DRAMSys/tests/lpddr4/expected/ - - sqldiff ../../DRAMSys/tests/lpddr4/expected/lpddr4-example_lpddr4_ch0.tdb lpddr4-example_lpddr4_ch0.tdb - - perl -e 'if(`sqldiff --table Phases ../../DRAMSys/tests/lpddr4/expected/lpddr4-example_lpddr4_ch0.tdb lpddr4-example_lpddr4_ch0.tdb` eq "") {exit(0)} else {exit(-1)}' - - perl -e 'if(`sqldiff --table Transactions ../../DRAMSys/tests/lpddr4/expected/lpddr4-example_lpddr4_ch0.tdb lpddr4-example_lpddr4_ch0.tdb` eq "") {exit(0)} else {exit(-1)}' - - perl -e 'if(`sqldiff --table Power ../../DRAMSys/tests/lpddr4/expected/lpddr4-example_lpddr4_ch0.tdb lpddr4-example_lpddr4_ch0.tdb` eq "") {exit(0)} else {exit(-1)}' - #- cd ../traceAnalyzer - #- python3 ../../DRAMSys/traceAnalyzer/scripts/tests.py ../simulator/lpddr4-example_lpddr4_ch0.tdb | if ! grep "failed"; then exit 0; else exit 1; fi + - ls -lah ../../DRAMSys/tests/LPDDR4/expected/ + - sqldiff ../../DRAMSys/tests/LPDDR4/expected/lpddr4-example_lpddr4_ch0.tdb lpddr4-example_lpddr4_ch0.tdb + - perl -e 'if(`sqldiff --table Phases ../../DRAMSys/tests/LPDDR4/expected/lpddr4-example_lpddr4_ch0.tdb lpddr4-example_lpddr4_ch0.tdb` eq "") {exit(0)} else {exit(-1)}' + - perl -e 'if(`sqldiff --table Transactions ../../DRAMSys/tests/LPDDR4/expected/lpddr4-example_lpddr4_ch0.tdb lpddr4-example_lpddr4_ch0.tdb` eq "") {exit(0)} else {exit(-1)}' + - perl -e 'if(`sqldiff --table Power ../../DRAMSys/tests/LPDDR4/expected/lpddr4-example_lpddr4_ch0.tdb lpddr4-example_lpddr4_ch0.tdb` eq "") {exit(0)} else {exit(-1)}' # Run Code Coverage - lcov -q -c --rc geninfo_adjust_src_path=$GCOV_PREFIX -d ${CI_PROJECT_DIR}/build/ -o ${CI_PROJECT_DIR}/coverage/${CI_JOB_NAME}.out diff --git a/DRAMSys/tests/lpddr4/configs/amconfigs/am_lpddr4_8Gbx16_brc.json b/DRAMSys/tests/LPDDR4/configs/amconfigs/am_lpddr4_8Gbx16_brc.json similarity index 100% rename from DRAMSys/tests/lpddr4/configs/amconfigs/am_lpddr4_8Gbx16_brc.json rename to DRAMSys/tests/LPDDR4/configs/amconfigs/am_lpddr4_8Gbx16_brc.json diff --git a/DRAMSys/tests/lpddr4/configs/mcconfigs/fifo.json b/DRAMSys/tests/LPDDR4/configs/mcconfigs/fifo.json similarity index 100% rename from DRAMSys/tests/lpddr4/configs/mcconfigs/fifo.json rename to DRAMSys/tests/LPDDR4/configs/mcconfigs/fifo.json diff --git a/DRAMSys/tests/lpddr4/configs/memspecs/JEDEC_8Gb_LPDDR4-3200_16bit.json b/DRAMSys/tests/LPDDR4/configs/memspecs/JEDEC_8Gb_LPDDR4-3200_16bit.json similarity index 100% rename from DRAMSys/tests/lpddr4/configs/memspecs/JEDEC_8Gb_LPDDR4-3200_16bit.json rename to DRAMSys/tests/LPDDR4/configs/memspecs/JEDEC_8Gb_LPDDR4-3200_16bit.json diff --git a/DRAMSys/tests/lpddr4/configs/simulator/lpddr4.json b/DRAMSys/tests/LPDDR4/configs/simulator/lpddr4.json similarity index 100% rename from DRAMSys/tests/lpddr4/configs/simulator/lpddr4.json rename to DRAMSys/tests/LPDDR4/configs/simulator/lpddr4.json diff --git a/DRAMSys/tests/lpddr4/configs/thermalsim/config.json b/DRAMSys/tests/LPDDR4/configs/thermalsim/config.json similarity index 100% rename from DRAMSys/tests/lpddr4/configs/thermalsim/config.json rename to DRAMSys/tests/LPDDR4/configs/thermalsim/config.json diff --git a/DRAMSys/tests/lpddr4/configs/thermalsim/core.flp b/DRAMSys/tests/LPDDR4/configs/thermalsim/core.flp similarity index 100% rename from DRAMSys/tests/lpddr4/configs/thermalsim/core.flp rename to DRAMSys/tests/LPDDR4/configs/thermalsim/core.flp diff --git a/DRAMSys/tests/lpddr4/configs/thermalsim/mem.flp b/DRAMSys/tests/LPDDR4/configs/thermalsim/mem.flp similarity index 100% rename from DRAMSys/tests/lpddr4/configs/thermalsim/mem.flp rename to DRAMSys/tests/LPDDR4/configs/thermalsim/mem.flp diff --git a/DRAMSys/tests/lpddr4/configs/thermalsim/powerInfo.json b/DRAMSys/tests/LPDDR4/configs/thermalsim/powerInfo.json similarity index 100% rename from DRAMSys/tests/lpddr4/configs/thermalsim/powerInfo.json rename to DRAMSys/tests/LPDDR4/configs/thermalsim/powerInfo.json diff --git a/DRAMSys/tests/lpddr4/configs/thermalsim/stack.stk b/DRAMSys/tests/LPDDR4/configs/thermalsim/stack.stk similarity index 100% rename from DRAMSys/tests/lpddr4/configs/thermalsim/stack.stk rename to DRAMSys/tests/LPDDR4/configs/thermalsim/stack.stk diff --git a/DRAMSys/tests/lpddr4/simulations/lpddr4-example.json b/DRAMSys/tests/LPDDR4/simulations/lpddr4-example.json similarity index 100% rename from DRAMSys/tests/lpddr4/simulations/lpddr4-example.json rename to DRAMSys/tests/LPDDR4/simulations/lpddr4-example.json diff --git a/DRAMSys/tests/ddr3_multirank/ci.yml b/DRAMSys/tests/ddr3_multirank/ci.yml deleted file mode 100644 index 16ee69ee..00000000 --- a/DRAMSys/tests/ddr3_multirank/ci.yml +++ /dev/null @@ -1,30 +0,0 @@ -# DDR3 Dual Rank Test with Staggered Power Down Policy and Scheduler FrFcfsGrp -example_DDR3: - stage: tests - script: - - export GCOV_PREFIX=$(pwd) - - export GCOV_PREFIX_STRIP=$(pwd | awk -F"/" '{print NF-1}') - - cd build/simulator - - ./DRAMSys ../../DRAMSys/tests/ddr3_multirank/simulations/ddr3-example.json ../../DRAMSys/tests/ddr3_multirank/ - - ls -lah - - ls -lah ../../DRAMSys/tests/ddr3_multirank/expected/ - - sqldiff ../../DRAMSys/tests/ddr3_multirank/expected/ddr3-dual-rank_ddr3_ch0.tdb ddr3-dual-rank_ddr3_ch0.tdb - - perl -e 'if(`sqldiff --table Phases ../../DRAMSys/tests/ddr3_multirank/expected/ddr3-dual-rank_ddr3_ch0.tdb ddr3-dual-rank_ddr3_ch0.tdb` eq "") {exit(0)} else {exit(-1)}' - - perl -e 'if(`sqldiff --table Transactions ../../DRAMSys/tests/ddr3_multirank/expected/ddr3-dual-rank_ddr3_ch0.tdb ddr3-dual-rank_ddr3_ch0.tdb` eq "") {exit(0)} else {exit(-1)}' - - perl -e 'if(`sqldiff --table Power ../../DRAMSys/tests/ddr3_multirank/expected/ddr3-dual-rank_ddr3_ch0.tdb ddr3-dual-rank_ddr3_ch0.tdb` eq "") {exit(0)} else {exit(-1)}' - #- cd ../traceAnalyzer - #- python3 ../../DRAMSys/traceAnalyzer/scripts/tests.py ../simulator/ddr3_multirank_ddr3_ch0.tdb | if ! grep "failed"; then exit 0; else exit 1; fi - # Run Code Coverage - - lcov -q -c --rc geninfo_adjust_src_path=$GCOV_PREFIX -d ${CI_PROJECT_DIR}/build/ -o ${CI_PROJECT_DIR}/coverage/${CI_JOB_NAME}.out - - cache: - key: build - paths: - - build/ - policy: pull - - artifacts: - paths: - - build/simulator/ddr3-dual-rank_ddr3_ch0.tdb - - coverage/${CI_JOB_NAME}.out - expire_in: 2 days