diff --git a/.gitignore b/.gitignore index 8e70d78d..5e63ad0d 100644 --- a/.gitignore +++ b/.gitignore @@ -11,7 +11,7 @@ /build-simulation /release-simulation *.*~ -dram/build-*/ +build-*/ ._.DS_Store .DS_Store *.swp diff --git a/.gitmodules b/.gitmodules index 53c14add..677fc1c9 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,6 @@ -[submodule "dram/src/common/third_party/DRAMPower"] - path = dram/src/common/third_party/DRAMPower +[submodule "DRAMSys/dram/src/common/third_party/DRAMPower"] + path = DRAMSys/dram/src/common/third_party/DRAMPower url = https://github.com/ravenrd/DRAMPower.git -[submodule "dram/src/common/third_party/tinyxml2"] - path = dram/src/common/third_party/tinyxml2 +[submodule "DRAMSys/dram/src/common/third_party/tinyxml2"] + path = DRAMSys/dram/src/common/third_party/tinyxml2 url = https://github.com/leethomason/tinyxml2.git diff --git a/analyzer/analyzer/README.md b/DRAMSys/analyzer/analyzer/README.md similarity index 100% rename from analyzer/analyzer/README.md rename to DRAMSys/analyzer/analyzer/README.md diff --git a/analyzer/analyzer/businessObjects/calculatedMetric.h b/DRAMSys/analyzer/analyzer/businessObjects/calculatedMetric.h similarity index 100% rename from analyzer/analyzer/businessObjects/calculatedMetric.h rename to DRAMSys/analyzer/analyzer/businessObjects/calculatedMetric.h diff --git a/analyzer/analyzer/businessObjects/comment.h b/DRAMSys/analyzer/analyzer/businessObjects/comment.h similarity index 100% rename from analyzer/analyzer/businessObjects/comment.h rename to DRAMSys/analyzer/analyzer/businessObjects/comment.h diff --git a/analyzer/analyzer/businessObjects/generalinfo.h b/DRAMSys/analyzer/analyzer/businessObjects/generalinfo.h similarity index 100% rename from analyzer/analyzer/businessObjects/generalinfo.h rename to DRAMSys/analyzer/analyzer/businessObjects/generalinfo.h diff --git a/analyzer/analyzer/businessObjects/phases/phase.cpp b/DRAMSys/analyzer/analyzer/businessObjects/phases/phase.cpp similarity index 100% rename from analyzer/analyzer/businessObjects/phases/phase.cpp rename to DRAMSys/analyzer/analyzer/businessObjects/phases/phase.cpp diff --git a/analyzer/analyzer/businessObjects/phases/phase.h b/DRAMSys/analyzer/analyzer/businessObjects/phases/phase.h similarity index 100% rename from analyzer/analyzer/businessObjects/phases/phase.h rename to DRAMSys/analyzer/analyzer/businessObjects/phases/phase.h diff --git a/analyzer/analyzer/businessObjects/phases/phasefactory.cpp b/DRAMSys/analyzer/analyzer/businessObjects/phases/phasefactory.cpp similarity index 100% rename from analyzer/analyzer/businessObjects/phases/phasefactory.cpp rename to DRAMSys/analyzer/analyzer/businessObjects/phases/phasefactory.cpp diff --git a/analyzer/analyzer/businessObjects/phases/phasefactory.h b/DRAMSys/analyzer/analyzer/businessObjects/phases/phasefactory.h similarity index 100% rename from analyzer/analyzer/businessObjects/phases/phasefactory.h rename to DRAMSys/analyzer/analyzer/businessObjects/phases/phasefactory.h diff --git a/analyzer/analyzer/businessObjects/pythoncaller.cpp b/DRAMSys/analyzer/analyzer/businessObjects/pythoncaller.cpp similarity index 100% rename from analyzer/analyzer/businessObjects/pythoncaller.cpp rename to DRAMSys/analyzer/analyzer/businessObjects/pythoncaller.cpp diff --git a/analyzer/analyzer/businessObjects/pythoncaller.h b/DRAMSys/analyzer/analyzer/businessObjects/pythoncaller.h similarity index 100% rename from analyzer/analyzer/businessObjects/pythoncaller.h rename to DRAMSys/analyzer/analyzer/businessObjects/pythoncaller.h diff --git a/analyzer/analyzer/businessObjects/testresult.h b/DRAMSys/analyzer/analyzer/businessObjects/testresult.h similarity index 100% rename from analyzer/analyzer/businessObjects/testresult.h rename to DRAMSys/analyzer/analyzer/businessObjects/testresult.h diff --git a/analyzer/analyzer/businessObjects/timespan.cpp b/DRAMSys/analyzer/analyzer/businessObjects/timespan.cpp similarity index 100% rename from analyzer/analyzer/businessObjects/timespan.cpp rename to DRAMSys/analyzer/analyzer/businessObjects/timespan.cpp diff --git a/analyzer/analyzer/businessObjects/timespan.h b/DRAMSys/analyzer/analyzer/businessObjects/timespan.h similarity index 100% rename from analyzer/analyzer/businessObjects/timespan.h rename to DRAMSys/analyzer/analyzer/businessObjects/timespan.h diff --git a/analyzer/analyzer/businessObjects/tracecalculatedmetrics.h b/DRAMSys/analyzer/analyzer/businessObjects/tracecalculatedmetrics.h similarity index 100% rename from analyzer/analyzer/businessObjects/tracecalculatedmetrics.h rename to DRAMSys/analyzer/analyzer/businessObjects/tracecalculatedmetrics.h diff --git a/analyzer/analyzer/businessObjects/tracetestresults.cpp b/DRAMSys/analyzer/analyzer/businessObjects/tracetestresults.cpp similarity index 100% rename from analyzer/analyzer/businessObjects/tracetestresults.cpp rename to DRAMSys/analyzer/analyzer/businessObjects/tracetestresults.cpp diff --git a/analyzer/analyzer/businessObjects/tracetestresults.h b/DRAMSys/analyzer/analyzer/businessObjects/tracetestresults.h similarity index 100% rename from analyzer/analyzer/businessObjects/tracetestresults.h rename to DRAMSys/analyzer/analyzer/businessObjects/tracetestresults.h diff --git a/analyzer/analyzer/businessObjects/tracetime.h b/DRAMSys/analyzer/analyzer/businessObjects/tracetime.h similarity index 100% rename from analyzer/analyzer/businessObjects/tracetime.h rename to DRAMSys/analyzer/analyzer/businessObjects/tracetime.h diff --git a/analyzer/analyzer/businessObjects/transaction.cpp b/DRAMSys/analyzer/analyzer/businessObjects/transaction.cpp similarity index 100% rename from analyzer/analyzer/businessObjects/transaction.cpp rename to DRAMSys/analyzer/analyzer/businessObjects/transaction.cpp diff --git a/analyzer/analyzer/businessObjects/transaction.h b/DRAMSys/analyzer/analyzer/businessObjects/transaction.h similarity index 100% rename from analyzer/analyzer/businessObjects/transaction.h rename to DRAMSys/analyzer/analyzer/businessObjects/transaction.h diff --git a/analyzer/analyzer/data/QueryTexts.h b/DRAMSys/analyzer/analyzer/data/QueryTexts.h similarity index 100% rename from analyzer/analyzer/data/QueryTexts.h rename to DRAMSys/analyzer/analyzer/data/QueryTexts.h diff --git a/analyzer/analyzer/data/tracedb.cpp b/DRAMSys/analyzer/analyzer/data/tracedb.cpp similarity index 100% rename from analyzer/analyzer/data/tracedb.cpp rename to DRAMSys/analyzer/analyzer/data/tracedb.cpp diff --git a/analyzer/analyzer/data/tracedb.h b/DRAMSys/analyzer/analyzer/data/tracedb.h similarity index 100% rename from analyzer/analyzer/data/tracedb.h rename to DRAMSys/analyzer/analyzer/data/tracedb.h diff --git a/analyzer/analyzer/evaluationtool.cpp b/DRAMSys/analyzer/analyzer/evaluationtool.cpp similarity index 100% rename from analyzer/analyzer/evaluationtool.cpp rename to DRAMSys/analyzer/analyzer/evaluationtool.cpp diff --git a/analyzer/analyzer/evaluationtool.h b/DRAMSys/analyzer/analyzer/evaluationtool.h similarity index 100% rename from analyzer/analyzer/evaluationtool.h rename to DRAMSys/analyzer/analyzer/evaluationtool.h diff --git a/analyzer/analyzer/evaluationtool.ui b/DRAMSys/analyzer/analyzer/evaluationtool.ui similarity index 100% rename from analyzer/analyzer/evaluationtool.ui rename to DRAMSys/analyzer/analyzer/evaluationtool.ui diff --git a/analyzer/analyzer/gototimedialog.cpp b/DRAMSys/analyzer/analyzer/gototimedialog.cpp similarity index 100% rename from analyzer/analyzer/gototimedialog.cpp rename to DRAMSys/analyzer/analyzer/gototimedialog.cpp diff --git a/analyzer/analyzer/gototimedialog.h b/DRAMSys/analyzer/analyzer/gototimedialog.h similarity index 100% rename from analyzer/analyzer/gototimedialog.h rename to DRAMSys/analyzer/analyzer/gototimedialog.h diff --git a/analyzer/analyzer/gototimedialog.ui b/DRAMSys/analyzer/analyzer/gototimedialog.ui similarity index 100% rename from analyzer/analyzer/gototimedialog.ui rename to DRAMSys/analyzer/analyzer/gototimedialog.ui diff --git a/analyzer/analyzer/main.cpp b/DRAMSys/analyzer/analyzer/main.cpp similarity index 100% rename from analyzer/analyzer/main.cpp rename to DRAMSys/analyzer/analyzer/main.cpp diff --git a/analyzer/analyzer/mainwindow.cpp b/DRAMSys/analyzer/analyzer/mainwindow.cpp similarity index 100% rename from analyzer/analyzer/mainwindow.cpp rename to DRAMSys/analyzer/analyzer/mainwindow.cpp diff --git a/analyzer/analyzer/mainwindow.h b/DRAMSys/analyzer/analyzer/mainwindow.h similarity index 100% rename from analyzer/analyzer/mainwindow.h rename to DRAMSys/analyzer/analyzer/mainwindow.h diff --git a/analyzer/analyzer/markerplotitem.cpp b/DRAMSys/analyzer/analyzer/markerplotitem.cpp similarity index 100% rename from analyzer/analyzer/markerplotitem.cpp rename to DRAMSys/analyzer/analyzer/markerplotitem.cpp diff --git a/analyzer/analyzer/markerplotitem.h b/DRAMSys/analyzer/analyzer/markerplotitem.h similarity index 100% rename from analyzer/analyzer/markerplotitem.h rename to DRAMSys/analyzer/analyzer/markerplotitem.h diff --git a/analyzer/analyzer/paths.pro b/DRAMSys/analyzer/analyzer/paths.pro similarity index 100% rename from analyzer/analyzer/paths.pro rename to DRAMSys/analyzer/analyzer/paths.pro diff --git a/analyzer/analyzer/preferences.ui b/DRAMSys/analyzer/analyzer/preferences.ui similarity index 100% rename from analyzer/analyzer/preferences.ui rename to DRAMSys/analyzer/analyzer/preferences.ui diff --git a/analyzer/analyzer/presentation/commenttreewidget.cpp b/DRAMSys/analyzer/analyzer/presentation/commenttreewidget.cpp similarity index 100% rename from analyzer/analyzer/presentation/commenttreewidget.cpp rename to DRAMSys/analyzer/analyzer/presentation/commenttreewidget.cpp diff --git a/analyzer/analyzer/presentation/commenttreewidget.h b/DRAMSys/analyzer/analyzer/presentation/commenttreewidget.h similarity index 100% rename from analyzer/analyzer/presentation/commenttreewidget.h rename to DRAMSys/analyzer/analyzer/presentation/commenttreewidget.h diff --git a/analyzer/analyzer/presentation/debugmessagetreewidget.cpp b/DRAMSys/analyzer/analyzer/presentation/debugmessagetreewidget.cpp similarity index 100% rename from analyzer/analyzer/presentation/debugmessagetreewidget.cpp rename to DRAMSys/analyzer/analyzer/presentation/debugmessagetreewidget.cpp diff --git a/analyzer/analyzer/presentation/debugmessagetreewidget.h b/DRAMSys/analyzer/analyzer/presentation/debugmessagetreewidget.h similarity index 100% rename from analyzer/analyzer/presentation/debugmessagetreewidget.h rename to DRAMSys/analyzer/analyzer/presentation/debugmessagetreewidget.h diff --git a/analyzer/analyzer/presentation/pornotracescroller.cpp b/DRAMSys/analyzer/analyzer/presentation/pornotracescroller.cpp similarity index 100% rename from analyzer/analyzer/presentation/pornotracescroller.cpp rename to DRAMSys/analyzer/analyzer/presentation/pornotracescroller.cpp diff --git a/analyzer/analyzer/presentation/pornotracescroller.h b/DRAMSys/analyzer/analyzer/presentation/pornotracescroller.h similarity index 100% rename from analyzer/analyzer/presentation/pornotracescroller.h rename to DRAMSys/analyzer/analyzer/presentation/pornotracescroller.h diff --git a/analyzer/analyzer/presentation/selectedtransactiontreewidget.cpp b/DRAMSys/analyzer/analyzer/presentation/selectedtransactiontreewidget.cpp similarity index 100% rename from analyzer/analyzer/presentation/selectedtransactiontreewidget.cpp rename to DRAMSys/analyzer/analyzer/presentation/selectedtransactiontreewidget.cpp diff --git a/analyzer/analyzer/presentation/selectedtransactiontreewidget.h b/DRAMSys/analyzer/analyzer/presentation/selectedtransactiontreewidget.h similarity index 100% rename from analyzer/analyzer/presentation/selectedtransactiontreewidget.h rename to DRAMSys/analyzer/analyzer/presentation/selectedtransactiontreewidget.h diff --git a/analyzer/analyzer/presentation/tracePlotMouseLabel.cpp b/DRAMSys/analyzer/analyzer/presentation/tracePlotMouseLabel.cpp similarity index 100% rename from analyzer/analyzer/presentation/tracePlotMouseLabel.cpp rename to DRAMSys/analyzer/analyzer/presentation/tracePlotMouseLabel.cpp diff --git a/analyzer/analyzer/presentation/tracePlotMouseLabel.h b/DRAMSys/analyzer/analyzer/presentation/tracePlotMouseLabel.h similarity index 100% rename from analyzer/analyzer/presentation/tracePlotMouseLabel.h rename to DRAMSys/analyzer/analyzer/presentation/tracePlotMouseLabel.h diff --git a/analyzer/analyzer/presentation/tracedrawing.cpp b/DRAMSys/analyzer/analyzer/presentation/tracedrawing.cpp similarity index 100% rename from analyzer/analyzer/presentation/tracedrawing.cpp rename to DRAMSys/analyzer/analyzer/presentation/tracedrawing.cpp diff --git a/analyzer/analyzer/presentation/tracedrawing.h b/DRAMSys/analyzer/analyzer/presentation/tracedrawing.h similarity index 100% rename from analyzer/analyzer/presentation/tracedrawing.h rename to DRAMSys/analyzer/analyzer/presentation/tracedrawing.h diff --git a/analyzer/analyzer/presentation/tracedrawingproperties.h b/DRAMSys/analyzer/analyzer/presentation/tracedrawingproperties.h similarity index 100% rename from analyzer/analyzer/presentation/tracedrawingproperties.h rename to DRAMSys/analyzer/analyzer/presentation/tracedrawingproperties.h diff --git a/analyzer/analyzer/presentation/tracemetrictreewidget.cpp b/DRAMSys/analyzer/analyzer/presentation/tracemetrictreewidget.cpp similarity index 100% rename from analyzer/analyzer/presentation/tracemetrictreewidget.cpp rename to DRAMSys/analyzer/analyzer/presentation/tracemetrictreewidget.cpp diff --git a/analyzer/analyzer/presentation/tracemetrictreewidget.h b/DRAMSys/analyzer/analyzer/presentation/tracemetrictreewidget.h similarity index 100% rename from analyzer/analyzer/presentation/tracemetrictreewidget.h rename to DRAMSys/analyzer/analyzer/presentation/tracemetrictreewidget.h diff --git a/analyzer/analyzer/presentation/tracenavigator.cpp b/DRAMSys/analyzer/analyzer/presentation/tracenavigator.cpp similarity index 100% rename from analyzer/analyzer/presentation/tracenavigator.cpp rename to DRAMSys/analyzer/analyzer/presentation/tracenavigator.cpp diff --git a/analyzer/analyzer/presentation/tracenavigator.h b/DRAMSys/analyzer/analyzer/presentation/tracenavigator.h similarity index 100% rename from analyzer/analyzer/presentation/tracenavigator.h rename to DRAMSys/analyzer/analyzer/presentation/tracenavigator.h diff --git a/analyzer/analyzer/presentation/traceplot.cpp b/DRAMSys/analyzer/analyzer/presentation/traceplot.cpp similarity index 100% rename from analyzer/analyzer/presentation/traceplot.cpp rename to DRAMSys/analyzer/analyzer/presentation/traceplot.cpp diff --git a/analyzer/analyzer/presentation/traceplot.h b/DRAMSys/analyzer/analyzer/presentation/traceplot.h similarity index 100% rename from analyzer/analyzer/presentation/traceplot.h rename to DRAMSys/analyzer/analyzer/presentation/traceplot.h diff --git a/analyzer/analyzer/presentation/traceplotitem.cpp b/DRAMSys/analyzer/analyzer/presentation/traceplotitem.cpp similarity index 100% rename from analyzer/analyzer/presentation/traceplotitem.cpp rename to DRAMSys/analyzer/analyzer/presentation/traceplotitem.cpp diff --git a/analyzer/analyzer/presentation/traceplotitem.h b/DRAMSys/analyzer/analyzer/presentation/traceplotitem.h similarity index 100% rename from analyzer/analyzer/presentation/traceplotitem.h rename to DRAMSys/analyzer/analyzer/presentation/traceplotitem.h diff --git a/analyzer/analyzer/presentation/tracetesttreewidget.cpp b/DRAMSys/analyzer/analyzer/presentation/tracetesttreewidget.cpp similarity index 100% rename from analyzer/analyzer/presentation/tracetesttreewidget.cpp rename to DRAMSys/analyzer/analyzer/presentation/tracetesttreewidget.cpp diff --git a/analyzer/analyzer/presentation/tracetesttreewidget.h b/DRAMSys/analyzer/analyzer/presentation/tracetesttreewidget.h similarity index 100% rename from analyzer/analyzer/presentation/tracetesttreewidget.h rename to DRAMSys/analyzer/analyzer/presentation/tracetesttreewidget.h diff --git a/analyzer/analyzer/presentation/transactiontreewidget.cpp b/DRAMSys/analyzer/analyzer/presentation/transactiontreewidget.cpp similarity index 100% rename from analyzer/analyzer/presentation/transactiontreewidget.cpp rename to DRAMSys/analyzer/analyzer/presentation/transactiontreewidget.cpp diff --git a/analyzer/analyzer/presentation/transactiontreewidget.h b/DRAMSys/analyzer/analyzer/presentation/transactiontreewidget.h similarity index 100% rename from analyzer/analyzer/presentation/transactiontreewidget.h rename to DRAMSys/analyzer/analyzer/presentation/transactiontreewidget.h diff --git a/analyzer/analyzer/presentation/util/clkgrid.cpp b/DRAMSys/analyzer/analyzer/presentation/util/clkgrid.cpp similarity index 100% rename from analyzer/analyzer/presentation/util/clkgrid.cpp rename to DRAMSys/analyzer/analyzer/presentation/util/clkgrid.cpp diff --git a/analyzer/analyzer/presentation/util/clkgrid.h b/DRAMSys/analyzer/analyzer/presentation/util/clkgrid.h similarity index 100% rename from analyzer/analyzer/presentation/util/clkgrid.h rename to DRAMSys/analyzer/analyzer/presentation/util/clkgrid.h diff --git a/analyzer/analyzer/presentation/util/colorgenerator.cpp b/DRAMSys/analyzer/analyzer/presentation/util/colorgenerator.cpp similarity index 100% rename from analyzer/analyzer/presentation/util/colorgenerator.cpp rename to DRAMSys/analyzer/analyzer/presentation/util/colorgenerator.cpp diff --git a/analyzer/analyzer/presentation/util/colorgenerator.h b/DRAMSys/analyzer/analyzer/presentation/util/colorgenerator.h similarity index 100% rename from analyzer/analyzer/presentation/util/colorgenerator.h rename to DRAMSys/analyzer/analyzer/presentation/util/colorgenerator.h diff --git a/analyzer/analyzer/presentation/util/customlabelscaledraw.h b/DRAMSys/analyzer/analyzer/presentation/util/customlabelscaledraw.h similarity index 100% rename from analyzer/analyzer/presentation/util/customlabelscaledraw.h rename to DRAMSys/analyzer/analyzer/presentation/util/customlabelscaledraw.h diff --git a/analyzer/analyzer/presentation/util/engineeringScaleDraw.h b/DRAMSys/analyzer/analyzer/presentation/util/engineeringScaleDraw.h similarity index 100% rename from analyzer/analyzer/presentation/util/engineeringScaleDraw.h rename to DRAMSys/analyzer/analyzer/presentation/util/engineeringScaleDraw.h diff --git a/analyzer/analyzer/presentation/util/testlight.cpp b/DRAMSys/analyzer/analyzer/presentation/util/testlight.cpp similarity index 100% rename from analyzer/analyzer/presentation/util/testlight.cpp rename to DRAMSys/analyzer/analyzer/presentation/util/testlight.cpp diff --git a/analyzer/analyzer/presentation/util/testlight.h b/DRAMSys/analyzer/analyzer/presentation/util/testlight.h similarity index 100% rename from analyzer/analyzer/presentation/util/testlight.h rename to DRAMSys/analyzer/analyzer/presentation/util/testlight.h diff --git a/analyzer/analyzer/queryeditor.cpp b/DRAMSys/analyzer/analyzer/queryeditor.cpp similarity index 100% rename from analyzer/analyzer/queryeditor.cpp rename to DRAMSys/analyzer/analyzer/queryeditor.cpp diff --git a/analyzer/analyzer/queryeditor.h b/DRAMSys/analyzer/analyzer/queryeditor.h similarity index 100% rename from analyzer/analyzer/queryeditor.h rename to DRAMSys/analyzer/analyzer/queryeditor.h diff --git a/analyzer/analyzer/queryeditor.ui b/DRAMSys/analyzer/analyzer/queryeditor.ui similarity index 100% rename from analyzer/analyzer/queryeditor.ui rename to DRAMSys/analyzer/analyzer/queryeditor.ui diff --git a/analyzer/analyzer/schedulerwrapper.h b/DRAMSys/analyzer/analyzer/schedulerwrapper.h similarity index 100% rename from analyzer/analyzer/schedulerwrapper.h rename to DRAMSys/analyzer/analyzer/schedulerwrapper.h diff --git a/analyzer/analyzer/scripts/metrics.py b/DRAMSys/analyzer/analyzer/scripts/metrics.py similarity index 100% rename from analyzer/analyzer/scripts/metrics.py rename to DRAMSys/analyzer/analyzer/scripts/metrics.py diff --git a/analyzer/analyzer/scripts/tests.py b/DRAMSys/analyzer/analyzer/scripts/tests.py similarity index 100% rename from analyzer/analyzer/scripts/tests.py rename to DRAMSys/analyzer/analyzer/scripts/tests.py diff --git a/analyzer/analyzer/traceAnalyzer.pro b/DRAMSys/analyzer/analyzer/traceAnalyzer.pro similarity index 100% rename from analyzer/analyzer/traceAnalyzer.pro rename to DRAMSys/analyzer/analyzer/traceAnalyzer.pro diff --git a/analyzer/analyzer/traceanalyzer.cpp b/DRAMSys/analyzer/analyzer/traceanalyzer.cpp similarity index 100% rename from analyzer/analyzer/traceanalyzer.cpp rename to DRAMSys/analyzer/analyzer/traceanalyzer.cpp diff --git a/analyzer/analyzer/traceanalyzer.h b/DRAMSys/analyzer/analyzer/traceanalyzer.h similarity index 100% rename from analyzer/analyzer/traceanalyzer.h rename to DRAMSys/analyzer/analyzer/traceanalyzer.h diff --git a/analyzer/analyzer/traceanalyzer.ui b/DRAMSys/analyzer/analyzer/traceanalyzer.ui similarity index 100% rename from analyzer/analyzer/traceanalyzer.ui rename to DRAMSys/analyzer/analyzer/traceanalyzer.ui diff --git a/analyzer/analyzer/tracefiletab.cpp b/DRAMSys/analyzer/analyzer/tracefiletab.cpp similarity index 100% rename from analyzer/analyzer/tracefiletab.cpp rename to DRAMSys/analyzer/analyzer/tracefiletab.cpp diff --git a/analyzer/analyzer/tracefiletab.h b/DRAMSys/analyzer/analyzer/tracefiletab.h similarity index 100% rename from analyzer/analyzer/tracefiletab.h rename to DRAMSys/analyzer/analyzer/tracefiletab.h diff --git a/analyzer/analyzer/tracefiletab.ui b/DRAMSys/analyzer/analyzer/tracefiletab.ui similarity index 100% rename from analyzer/analyzer/tracefiletab.ui rename to DRAMSys/analyzer/analyzer/tracefiletab.ui diff --git a/docs/Timings.ods b/DRAMSys/docs/Timings.ods similarity index 100% rename from docs/Timings.ods rename to DRAMSys/docs/Timings.ods diff --git a/docs/images/am_sample1.svg b/DRAMSys/docs/images/am_sample1.svg similarity index 100% rename from docs/images/am_sample1.svg rename to DRAMSys/docs/images/am_sample1.svg diff --git a/docs/images/am_sample2.svg b/DRAMSys/docs/images/am_sample2.svg similarity index 100% rename from docs/images/am_sample2.svg rename to DRAMSys/docs/images/am_sample2.svg diff --git a/DRAMSys/dram.vp.system.pro b/DRAMSys/dram.vp.system.pro new file mode 100644 index 00000000..8a415440 --- /dev/null +++ b/DRAMSys/dram.vp.system.pro @@ -0,0 +1,5 @@ +TEMPLATE = subdirs + +SUBDIRS = dram/dramSys/dramSys.pro +SUBDIRS += analyzer/analyzer/traceAnalyzer.pro + diff --git a/dram/dramSys/dramSys.pro b/DRAMSys/dram/dramSys/dramSys.pro similarity index 95% rename from dram/dramSys/dramSys.pro rename to DRAMSys/dram/dramSys/dramSys.pro index d656f3a0..7c408025 100644 --- a/dram/dramSys/dramSys.pro +++ b/DRAMSys/dram/dramSys/dramSys.pro @@ -3,13 +3,13 @@ CONFIG += console CONFIG -= app_bundle CONFIG -= qt -system(cd ../src/common/third_party/DRAMPower; make lib;) +system(cd ../../../DRAMSys/dram/src/common/third_party/DRAMPower; make lib;) LIBS += -L/opt/systemc/lib-linux64 -lsystemc LIBS += -L/opt/boost/lib -lboost_filesystem -lboost_system LIBS += -lsqlite3 LIBS += -lpthread -LIBS += -L../src/common/third_party/DRAMPower/src/ -ldrampower +LIBS += -L../../../DRAMSys/dram/src/common/third_party/DRAMPower/src/ -ldrampower INCLUDEPATH += /opt/systemc/include INCLUDEPATH += /opt/boost/include @@ -24,6 +24,8 @@ release { } QMAKE_CXXFLAGS += -std=c++11 +QMAKE_CXXFLAGS += -isystem /opt/systemc/include +QMAKE_CXXFLAGS += -isystem /opt/boost/include SOURCES += \ ../src/common/third_party/tinyxml2/tinyxml2.cpp \ diff --git a/dram/resources/.gitignore b/DRAMSys/dram/resources/.gitignore similarity index 100% rename from dram/resources/.gitignore rename to DRAMSys/dram/resources/.gitignore diff --git a/dram/resources/configs/amconfigs/am_ddr4.xml b/DRAMSys/dram/resources/configs/amconfigs/am_ddr4.xml similarity index 100% rename from dram/resources/configs/amconfigs/am_ddr4.xml rename to DRAMSys/dram/resources/configs/amconfigs/am_ddr4.xml diff --git a/dram/resources/configs/amconfigs/am_highHits.xml b/DRAMSys/dram/resources/configs/amconfigs/am_highHits.xml similarity index 100% rename from dram/resources/configs/amconfigs/am_highHits.xml rename to DRAMSys/dram/resources/configs/amconfigs/am_highHits.xml diff --git a/dram/resources/configs/amconfigs/am_highPara.xml b/DRAMSys/dram/resources/configs/amconfigs/am_highPara.xml similarity index 100% rename from dram/resources/configs/amconfigs/am_highPara.xml rename to DRAMSys/dram/resources/configs/amconfigs/am_highPara.xml diff --git a/dram/resources/configs/amconfigs/am_lowHits.xml b/DRAMSys/dram/resources/configs/amconfigs/am_lowHits.xml similarity index 100% rename from dram/resources/configs/amconfigs/am_lowHits.xml rename to DRAMSys/dram/resources/configs/amconfigs/am_lowHits.xml diff --git a/dram/resources/configs/amconfigs/am_lowPara.xml b/DRAMSys/dram/resources/configs/amconfigs/am_lowPara.xml similarity index 100% rename from dram/resources/configs/amconfigs/am_lowPara.xml rename to DRAMSys/dram/resources/configs/amconfigs/am_lowPara.xml diff --git a/dram/resources/configs/amconfigs/am_wideio.xml b/DRAMSys/dram/resources/configs/amconfigs/am_wideio.xml similarity index 100% rename from dram/resources/configs/amconfigs/am_wideio.xml rename to DRAMSys/dram/resources/configs/amconfigs/am_wideio.xml diff --git a/dram/resources/configs/amconfigs/am_wideioFourBanks.xml b/DRAMSys/dram/resources/configs/amconfigs/am_wideioFourBanks.xml similarity index 100% rename from dram/resources/configs/amconfigs/am_wideioFourBanks.xml rename to DRAMSys/dram/resources/configs/amconfigs/am_wideioFourBanks.xml diff --git a/dram/resources/configs/memconfigs/.gitignore b/DRAMSys/dram/resources/configs/memconfigs/.gitignore similarity index 100% rename from dram/resources/configs/memconfigs/.gitignore rename to DRAMSys/dram/resources/configs/memconfigs/.gitignore diff --git a/dram/resources/configs/memconfigs/_old/fr_fcfs_bankwise.xml b/DRAMSys/dram/resources/configs/memconfigs/_old/fr_fcfs_bankwise.xml similarity index 100% rename from dram/resources/configs/memconfigs/_old/fr_fcfs_bankwise.xml rename to DRAMSys/dram/resources/configs/memconfigs/_old/fr_fcfs_bankwise.xml diff --git a/dram/resources/configs/memconfigs/_old/fr_fcfs_unaware.xml b/DRAMSys/dram/resources/configs/memconfigs/_old/fr_fcfs_unaware.xml similarity index 100% rename from dram/resources/configs/memconfigs/_old/fr_fcfs_unaware.xml rename to DRAMSys/dram/resources/configs/memconfigs/_old/fr_fcfs_unaware.xml diff --git a/dram/resources/configs/memconfigs/_old/grouper.xml b/DRAMSys/dram/resources/configs/memconfigs/_old/grouper.xml similarity index 100% rename from dram/resources/configs/memconfigs/_old/grouper.xml rename to DRAMSys/dram/resources/configs/memconfigs/_old/grouper.xml diff --git a/dram/resources/configs/memconfigs/_old/par_bs.xml b/DRAMSys/dram/resources/configs/memconfigs/_old/par_bs.xml similarity index 100% rename from dram/resources/configs/memconfigs/_old/par_bs.xml rename to DRAMSys/dram/resources/configs/memconfigs/_old/par_bs.xml diff --git a/dram/resources/configs/memconfigs/_old/par_bs_unaware.xml b/DRAMSys/dram/resources/configs/memconfigs/_old/par_bs_unaware.xml similarity index 100% rename from dram/resources/configs/memconfigs/_old/par_bs_unaware.xml rename to DRAMSys/dram/resources/configs/memconfigs/_old/par_bs_unaware.xml diff --git a/dram/resources/configs/memconfigs/fifo.xml b/DRAMSys/dram/resources/configs/memconfigs/fifo.xml similarity index 100% rename from dram/resources/configs/memconfigs/fifo.xml rename to DRAMSys/dram/resources/configs/memconfigs/fifo.xml diff --git a/dram/resources/configs/memconfigs/fifoStrict.xml b/DRAMSys/dram/resources/configs/memconfigs/fifoStrict.xml similarity index 100% rename from dram/resources/configs/memconfigs/fifoStrict.xml rename to DRAMSys/dram/resources/configs/memconfigs/fifoStrict.xml diff --git a/dram/resources/configs/memconfigs/fr_fcfs.xml b/DRAMSys/dram/resources/configs/memconfigs/fr_fcfs.xml similarity index 100% rename from dram/resources/configs/memconfigs/fr_fcfs.xml rename to DRAMSys/dram/resources/configs/memconfigs/fr_fcfs.xml diff --git a/dram/resources/configs/memspecs/DDR4.xml b/DRAMSys/dram/resources/configs/memspecs/DDR4.xml similarity index 100% rename from dram/resources/configs/memspecs/DDR4.xml rename to DRAMSys/dram/resources/configs/memspecs/DDR4.xml diff --git a/dram/resources/configs/memspecs/JEDEC_256Mb_WIDEIO_SDR-200_128bit.xml b/DRAMSys/dram/resources/configs/memspecs/JEDEC_256Mb_WIDEIO_SDR-200_128bit.xml similarity index 100% rename from dram/resources/configs/memspecs/JEDEC_256Mb_WIDEIO_SDR-200_128bit.xml rename to DRAMSys/dram/resources/configs/memspecs/JEDEC_256Mb_WIDEIO_SDR-200_128bit.xml diff --git a/dram/resources/configs/memspecs/JEDEC_256Mb_WIDEIO_SDR-266_128bit.xml b/DRAMSys/dram/resources/configs/memspecs/JEDEC_256Mb_WIDEIO_SDR-266_128bit.xml similarity index 100% rename from dram/resources/configs/memspecs/JEDEC_256Mb_WIDEIO_SDR-266_128bit.xml rename to DRAMSys/dram/resources/configs/memspecs/JEDEC_256Mb_WIDEIO_SDR-266_128bit.xml diff --git a/dram/resources/configs/memspecs/MICRON_4Gb_DDR4-1866_8bit_A.xml b/DRAMSys/dram/resources/configs/memspecs/MICRON_4Gb_DDR4-1866_8bit_A.xml similarity index 100% rename from dram/resources/configs/memspecs/MICRON_4Gb_DDR4-1866_8bit_A.xml rename to DRAMSys/dram/resources/configs/memspecs/MICRON_4Gb_DDR4-1866_8bit_A.xml diff --git a/dram/resources/configs/memspecs/MICRON_4Gb_DDR4-2400_8bit_A.xml b/DRAMSys/dram/resources/configs/memspecs/MICRON_4Gb_DDR4-2400_8bit_A.xml similarity index 100% rename from dram/resources/configs/memspecs/MICRON_4Gb_DDR4-2400_8bit_A.xml rename to DRAMSys/dram/resources/configs/memspecs/MICRON_4Gb_DDR4-2400_8bit_A.xml diff --git a/dram/resources/configs/memspecs/MatzesWideIO-short.xml b/DRAMSys/dram/resources/configs/memspecs/MatzesWideIO-short.xml similarity index 100% rename from dram/resources/configs/memspecs/MatzesWideIO-short.xml rename to DRAMSys/dram/resources/configs/memspecs/MatzesWideIO-short.xml diff --git a/dram/resources/configs/memspecs/MatzesWideIO.xml b/DRAMSys/dram/resources/configs/memspecs/MatzesWideIO.xml similarity index 100% rename from dram/resources/configs/memspecs/MatzesWideIO.xml rename to DRAMSys/dram/resources/configs/memspecs/MatzesWideIO.xml diff --git a/dram/resources/configs/memspecs/WideIO.xml b/DRAMSys/dram/resources/configs/memspecs/WideIO.xml similarity index 100% rename from dram/resources/configs/memspecs/WideIO.xml rename to DRAMSys/dram/resources/configs/memspecs/WideIO.xml diff --git a/dram/resources/configs/memspecs/memspec.dtd b/DRAMSys/dram/resources/configs/memspecs/memspec.dtd similarity index 100% rename from dram/resources/configs/memspecs/memspec.dtd rename to DRAMSys/dram/resources/configs/memspecs/memspec.dtd diff --git a/dram/resources/scripts/address_scrambler.pl b/DRAMSys/dram/resources/scripts/address_scrambler.pl similarity index 100% rename from dram/resources/scripts/address_scrambler.pl rename to DRAMSys/dram/resources/scripts/address_scrambler.pl diff --git a/dram/resources/scripts/analyse_trace.pl b/DRAMSys/dram/resources/scripts/analyse_trace.pl similarity index 100% rename from dram/resources/scripts/analyse_trace.pl rename to DRAMSys/dram/resources/scripts/analyse_trace.pl diff --git a/dram/resources/scripts/createTraceDB.sql b/DRAMSys/dram/resources/scripts/createTraceDB.sql similarity index 100% rename from dram/resources/scripts/createTraceDB.sql rename to DRAMSys/dram/resources/scripts/createTraceDB.sql diff --git a/dram/resources/scripts/stride_detection.pl b/DRAMSys/dram/resources/scripts/stride_detection.pl similarity index 100% rename from dram/resources/scripts/stride_detection.pl rename to DRAMSys/dram/resources/scripts/stride_detection.pl diff --git a/DRAMSys/dram/resources/simulations/sim-batch.xml b/DRAMSys/dram/resources/simulations/sim-batch.xml new file mode 100644 index 00000000..0da6195c --- /dev/null +++ b/DRAMSys/dram/resources/simulations/sim-batch.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + chstone-adpcm_32.stl + + + + diff --git a/dram/resources/traces/prettyTest b/DRAMSys/dram/resources/traces/prettyTest similarity index 100% rename from dram/resources/traces/prettyTest rename to DRAMSys/dram/resources/traces/prettyTest diff --git a/dram/src/common/DebugManager.cpp b/DRAMSys/dram/src/common/DebugManager.cpp similarity index 100% rename from dram/src/common/DebugManager.cpp rename to DRAMSys/dram/src/common/DebugManager.cpp diff --git a/dram/src/common/DebugManager.h b/DRAMSys/dram/src/common/DebugManager.h similarity index 100% rename from dram/src/common/DebugManager.h rename to DRAMSys/dram/src/common/DebugManager.h diff --git a/dram/src/common/TlmRecorder.cpp b/DRAMSys/dram/src/common/TlmRecorder.cpp similarity index 99% rename from dram/src/common/TlmRecorder.cpp rename to DRAMSys/dram/src/common/TlmRecorder.cpp index 58b8a4c8..36baa1cf 100644 --- a/dram/src/common/TlmRecorder.cpp +++ b/DRAMSys/dram/src/common/TlmRecorder.cpp @@ -216,7 +216,7 @@ void TlmRecorder::openDB(std::string name) boost::filesystem::wpath file(name); if(boost::filesystem::exists(file)) boost::filesystem::remove(file); - if (sqlite3_open(name.c_str(), &db)) + if (sqlite3_open(name.c_str(), &db) != SQLITE_OK) { SC_REPORT_FATAL("Error in TraceRecorder", "Error cannot open database"); sqlite3_close(db); diff --git a/dram/src/common/TlmRecorder.h b/DRAMSys/dram/src/common/TlmRecorder.h similarity index 100% rename from dram/src/common/TlmRecorder.h rename to DRAMSys/dram/src/common/TlmRecorder.h diff --git a/dram/src/common/Utils.cpp b/DRAMSys/dram/src/common/Utils.cpp similarity index 100% rename from dram/src/common/Utils.cpp rename to DRAMSys/dram/src/common/Utils.cpp diff --git a/dram/src/common/Utils.h b/DRAMSys/dram/src/common/Utils.h similarity index 99% rename from dram/src/common/Utils.h rename to DRAMSys/dram/src/common/Utils.h index bfa0c126..8bd41d90 100644 --- a/dram/src/common/Utils.h +++ b/DRAMSys/dram/src/common/Utils.h @@ -32,6 +32,7 @@ * Authors: * Robert Gernhardt * Matthias Jung + * Eder F. Zulian */ #ifndef UTILS_COMMON_UTILS_H_ diff --git a/dram/src/common/dramExtension.cpp b/DRAMSys/dram/src/common/dramExtension.cpp similarity index 100% rename from dram/src/common/dramExtension.cpp rename to DRAMSys/dram/src/common/dramExtension.cpp diff --git a/dram/src/common/dramExtension.h b/DRAMSys/dram/src/common/dramExtension.h similarity index 100% rename from dram/src/common/dramExtension.h rename to DRAMSys/dram/src/common/dramExtension.h diff --git a/dram/src/common/protocol.h b/DRAMSys/dram/src/common/protocol.h similarity index 100% rename from dram/src/common/protocol.h rename to DRAMSys/dram/src/common/protocol.h diff --git a/dram/src/common/third_party/DRAMPower b/DRAMSys/dram/src/common/third_party/DRAMPower similarity index 100% rename from dram/src/common/third_party/DRAMPower rename to DRAMSys/dram/src/common/third_party/DRAMPower diff --git a/DRAMSys/dram/src/common/third_party/tinyxml2 b/DRAMSys/dram/src/common/third_party/tinyxml2 new file mode 160000 index 00000000..aebaeea6 --- /dev/null +++ b/DRAMSys/dram/src/common/third_party/tinyxml2 @@ -0,0 +1 @@ +Subproject commit aebaeea687f69b41e55f1acbf0a11321c6af5bfd diff --git a/dram/src/common/tlm2_base_protocol_checker.h b/DRAMSys/dram/src/common/tlm2_base_protocol_checker.h similarity index 100% rename from dram/src/common/tlm2_base_protocol_checker.h rename to DRAMSys/dram/src/common/tlm2_base_protocol_checker.h diff --git a/dram/src/common/xmlAddressdecoder.cpp b/DRAMSys/dram/src/common/xmlAddressdecoder.cpp similarity index 100% rename from dram/src/common/xmlAddressdecoder.cpp rename to DRAMSys/dram/src/common/xmlAddressdecoder.cpp diff --git a/dram/src/common/xmlAddressdecoder.h b/DRAMSys/dram/src/common/xmlAddressdecoder.h similarity index 100% rename from dram/src/common/xmlAddressdecoder.h rename to DRAMSys/dram/src/common/xmlAddressdecoder.h diff --git a/dram/src/controller/Command.cpp b/DRAMSys/dram/src/controller/Command.cpp similarity index 100% rename from dram/src/controller/Command.cpp rename to DRAMSys/dram/src/controller/Command.cpp diff --git a/dram/src/controller/Command.h b/DRAMSys/dram/src/controller/Command.h similarity index 100% rename from dram/src/controller/Command.h rename to DRAMSys/dram/src/controller/Command.h diff --git a/dram/src/controller/Controller.cpp b/DRAMSys/dram/src/controller/Controller.cpp similarity index 100% rename from dram/src/controller/Controller.cpp rename to DRAMSys/dram/src/controller/Controller.cpp diff --git a/dram/src/controller/Controller.h b/DRAMSys/dram/src/controller/Controller.h similarity index 99% rename from dram/src/controller/Controller.h rename to DRAMSys/dram/src/controller/Controller.h index b3b49abc..66cf672b 100644 --- a/dram/src/controller/Controller.h +++ b/DRAMSys/dram/src/controller/Controller.h @@ -40,7 +40,7 @@ #include #include #include -#include +#include #include "/opt/systemc-2.3.0/include/systemc" #include "/opt/systemc-2.3.0/include/tlm" diff --git a/dram/src/controller/ControllerState.cpp b/DRAMSys/dram/src/controller/ControllerState.cpp similarity index 100% rename from dram/src/controller/ControllerState.cpp rename to DRAMSys/dram/src/controller/ControllerState.cpp diff --git a/dram/src/controller/ControllerState.h b/DRAMSys/dram/src/controller/ControllerState.h similarity index 100% rename from dram/src/controller/ControllerState.h rename to DRAMSys/dram/src/controller/ControllerState.h diff --git a/dram/src/controller/IController.h b/DRAMSys/dram/src/controller/IController.h similarity index 100% rename from dram/src/controller/IController.h rename to DRAMSys/dram/src/controller/IController.h diff --git a/dram/src/controller/RowBufferStates.cpp b/DRAMSys/dram/src/controller/RowBufferStates.cpp similarity index 100% rename from dram/src/controller/RowBufferStates.cpp rename to DRAMSys/dram/src/controller/RowBufferStates.cpp diff --git a/dram/src/controller/RowBufferStates.h b/DRAMSys/dram/src/controller/RowBufferStates.h similarity index 100% rename from dram/src/controller/RowBufferStates.h rename to DRAMSys/dram/src/controller/RowBufferStates.h diff --git a/dram/src/controller/core/ControllerCore.cpp b/DRAMSys/dram/src/controller/core/ControllerCore.cpp similarity index 99% rename from dram/src/controller/core/ControllerCore.cpp rename to DRAMSys/dram/src/controller/core/ControllerCore.cpp index 7c11943f..10830362 100644 --- a/dram/src/controller/core/ControllerCore.cpp +++ b/DRAMSys/dram/src/controller/core/ControllerCore.cpp @@ -227,4 +227,3 @@ void ControllerCore::printDebugMessage(string message) DebugManager::getInstance().printDebugMessage(ControllerCore::senderName, message); } - diff --git a/dram/src/controller/core/ControllerCore.h b/DRAMSys/dram/src/controller/core/ControllerCore.h similarity index 100% rename from dram/src/controller/core/ControllerCore.h rename to DRAMSys/dram/src/controller/core/ControllerCore.h index 2cf29e92..455aa53a 100644 --- a/dram/src/controller/core/ControllerCore.h +++ b/DRAMSys/dram/src/controller/core/ControllerCore.h @@ -80,5 +80,5 @@ private: std::map commandChecker; }; - #endif /* CONTROLLER_H_ */ + diff --git a/dram/src/controller/core/Slots.cpp b/DRAMSys/dram/src/controller/core/Slots.cpp similarity index 100% rename from dram/src/controller/core/Slots.cpp rename to DRAMSys/dram/src/controller/core/Slots.cpp diff --git a/dram/src/controller/core/Slots.h b/DRAMSys/dram/src/controller/core/Slots.h similarity index 100% rename from dram/src/controller/core/Slots.h rename to DRAMSys/dram/src/controller/core/Slots.h diff --git a/dram/src/controller/core/TimingCalculation.cpp b/DRAMSys/dram/src/controller/core/TimingCalculation.cpp similarity index 100% rename from dram/src/controller/core/TimingCalculation.cpp rename to DRAMSys/dram/src/controller/core/TimingCalculation.cpp diff --git a/dram/src/controller/core/TimingCalculation.h b/DRAMSys/dram/src/controller/core/TimingCalculation.h similarity index 100% rename from dram/src/controller/core/TimingCalculation.h rename to DRAMSys/dram/src/controller/core/TimingCalculation.h diff --git a/dram/src/controller/core/configuration/Configuration.cpp b/DRAMSys/dram/src/controller/core/configuration/Configuration.cpp similarity index 95% rename from dram/src/controller/core/configuration/Configuration.cpp rename to DRAMSys/dram/src/controller/core/configuration/Configuration.cpp index 8b1d926f..d3c35a58 100644 --- a/dram/src/controller/core/configuration/Configuration.cpp +++ b/DRAMSys/dram/src/controller/core/configuration/Configuration.cpp @@ -32,6 +32,7 @@ * Authors: * Janik Schlemminger * Matthias Jung + * Eder F. Zulian */ #include "Configuration.h" @@ -116,6 +117,10 @@ void Configuration::setParameter(std::string name, std::string value) PowerAnalysis = string2bool(value); else if(name == "Debug") Debug = string2bool(value); + else if (name == "NumberOfTracePlayers") + NumberOfTracePlayers = string2int(value); + else if (name == "NumberOfMemChannels") + NumberOfMemChannels = string2int(value); // Specification for ErrorChipSeed, ErrorCSVFile path and ErrorStoreMode else if(name == "ErrorChipSeed") ErrorChipSeed = string2int(value); diff --git a/dram/src/controller/core/configuration/Configuration.h b/DRAMSys/dram/src/controller/core/configuration/Configuration.h similarity index 96% rename from dram/src/controller/core/configuration/Configuration.h rename to DRAMSys/dram/src/controller/core/configuration/Configuration.h index 7cdab17c..6c89fd4e 100644 --- a/dram/src/controller/core/configuration/Configuration.h +++ b/DRAMSys/dram/src/controller/core/configuration/Configuration.h @@ -32,6 +32,7 @@ * Authors: * Janik Schlemminger * Matthias Jung + * Eder F. Zulian */ #ifndef CONFIGURATION_H_ @@ -72,6 +73,8 @@ struct Configuration bool DatabaseRecording = true; bool PowerAnalysis = false; bool Debug = false; + unsigned int NumberOfTracePlayers = 1; + unsigned int NumberOfMemChannels = 1; //MemSpec(from DRAM-Power XML) MemSpec memSpec; diff --git a/dram/src/controller/core/configuration/ConfigurationLoader.cpp b/DRAMSys/dram/src/controller/core/configuration/ConfigurationLoader.cpp similarity index 100% rename from dram/src/controller/core/configuration/ConfigurationLoader.cpp rename to DRAMSys/dram/src/controller/core/configuration/ConfigurationLoader.cpp diff --git a/dram/src/controller/core/configuration/ConfigurationLoader.h b/DRAMSys/dram/src/controller/core/configuration/ConfigurationLoader.h similarity index 100% rename from dram/src/controller/core/configuration/ConfigurationLoader.h rename to DRAMSys/dram/src/controller/core/configuration/ConfigurationLoader.h diff --git a/dram/src/controller/core/configuration/MemSpec.h b/DRAMSys/dram/src/controller/core/configuration/MemSpec.h similarity index 100% rename from dram/src/controller/core/configuration/MemSpec.h rename to DRAMSys/dram/src/controller/core/configuration/MemSpec.h diff --git a/dram/src/controller/core/configuration/MemSpecLoader.h.autosave b/DRAMSys/dram/src/controller/core/configuration/MemSpecLoader.h.autosave similarity index 100% rename from dram/src/controller/core/configuration/MemSpecLoader.h.autosave rename to DRAMSys/dram/src/controller/core/configuration/MemSpecLoader.h.autosave diff --git a/dram/src/controller/core/powerdown/IPowerDownManager.h b/DRAMSys/dram/src/controller/core/powerdown/IPowerDownManager.h similarity index 100% rename from dram/src/controller/core/powerdown/IPowerDownManager.h rename to DRAMSys/dram/src/controller/core/powerdown/IPowerDownManager.h diff --git a/dram/src/controller/core/powerdown/NoPowerDown.cpp b/DRAMSys/dram/src/controller/core/powerdown/NoPowerDown.cpp similarity index 100% rename from dram/src/controller/core/powerdown/NoPowerDown.cpp rename to DRAMSys/dram/src/controller/core/powerdown/NoPowerDown.cpp diff --git a/dram/src/controller/core/powerdown/NoPowerDown.h b/DRAMSys/dram/src/controller/core/powerdown/NoPowerDown.h similarity index 100% rename from dram/src/controller/core/powerdown/NoPowerDown.h rename to DRAMSys/dram/src/controller/core/powerdown/NoPowerDown.h diff --git a/dram/src/controller/core/powerdown/PowerDownManager.cpp b/DRAMSys/dram/src/controller/core/powerdown/PowerDownManager.cpp similarity index 100% rename from dram/src/controller/core/powerdown/PowerDownManager.cpp rename to DRAMSys/dram/src/controller/core/powerdown/PowerDownManager.cpp diff --git a/dram/src/controller/core/powerdown/PowerDownManager.h b/DRAMSys/dram/src/controller/core/powerdown/PowerDownManager.h similarity index 100% rename from dram/src/controller/core/powerdown/PowerDownManager.h rename to DRAMSys/dram/src/controller/core/powerdown/PowerDownManager.h diff --git a/dram/src/controller/core/powerdown/PowerDownManagerBankwise.cpp b/DRAMSys/dram/src/controller/core/powerdown/PowerDownManagerBankwise.cpp similarity index 100% rename from dram/src/controller/core/powerdown/PowerDownManagerBankwise.cpp rename to DRAMSys/dram/src/controller/core/powerdown/PowerDownManagerBankwise.cpp diff --git a/dram/src/controller/core/powerdown/PowerDownManagerBankwise.h b/DRAMSys/dram/src/controller/core/powerdown/PowerDownManagerBankwise.h similarity index 100% rename from dram/src/controller/core/powerdown/PowerDownManagerBankwise.h rename to DRAMSys/dram/src/controller/core/powerdown/PowerDownManagerBankwise.h diff --git a/dram/src/controller/core/powerdown/PowerDownManagerTimeout.cpp b/DRAMSys/dram/src/controller/core/powerdown/PowerDownManagerTimeout.cpp similarity index 100% rename from dram/src/controller/core/powerdown/PowerDownManagerTimeout.cpp rename to DRAMSys/dram/src/controller/core/powerdown/PowerDownManagerTimeout.cpp diff --git a/dram/src/controller/core/powerdown/PowerDownManagerTimeout.h b/DRAMSys/dram/src/controller/core/powerdown/PowerDownManagerTimeout.h similarity index 100% rename from dram/src/controller/core/powerdown/PowerDownManagerTimeout.h rename to DRAMSys/dram/src/controller/core/powerdown/PowerDownManagerTimeout.h diff --git a/dram/src/controller/core/refresh/IRefreshManager.h b/DRAMSys/dram/src/controller/core/refresh/IRefreshManager.h similarity index 100% rename from dram/src/controller/core/refresh/IRefreshManager.h rename to DRAMSys/dram/src/controller/core/refresh/IRefreshManager.h diff --git a/dram/src/controller/core/refresh/RefreshManager.cpp b/DRAMSys/dram/src/controller/core/refresh/RefreshManager.cpp similarity index 100% rename from dram/src/controller/core/refresh/RefreshManager.cpp rename to DRAMSys/dram/src/controller/core/refresh/RefreshManager.cpp diff --git a/dram/src/controller/core/refresh/RefreshManager.h b/DRAMSys/dram/src/controller/core/refresh/RefreshManager.h similarity index 100% rename from dram/src/controller/core/refresh/RefreshManager.h rename to DRAMSys/dram/src/controller/core/refresh/RefreshManager.h diff --git a/dram/src/controller/core/refresh/RefreshManagerBankwise.cpp b/DRAMSys/dram/src/controller/core/refresh/RefreshManagerBankwise.cpp similarity index 100% rename from dram/src/controller/core/refresh/RefreshManagerBankwise.cpp rename to DRAMSys/dram/src/controller/core/refresh/RefreshManagerBankwise.cpp diff --git a/dram/src/controller/core/refresh/RefreshManagerBankwise.h b/DRAMSys/dram/src/controller/core/refresh/RefreshManagerBankwise.h similarity index 100% rename from dram/src/controller/core/refresh/RefreshManagerBankwise.h rename to DRAMSys/dram/src/controller/core/refresh/RefreshManagerBankwise.h diff --git a/dram/src/controller/core/scheduling/ScheduledCommand.cpp b/DRAMSys/dram/src/controller/core/scheduling/ScheduledCommand.cpp similarity index 100% rename from dram/src/controller/core/scheduling/ScheduledCommand.cpp rename to DRAMSys/dram/src/controller/core/scheduling/ScheduledCommand.cpp diff --git a/dram/src/controller/core/scheduling/ScheduledCommand.h b/DRAMSys/dram/src/controller/core/scheduling/ScheduledCommand.h similarity index 100% rename from dram/src/controller/core/scheduling/ScheduledCommand.h rename to DRAMSys/dram/src/controller/core/scheduling/ScheduledCommand.h diff --git a/dram/src/controller/core/scheduling/Trigger.h b/DRAMSys/dram/src/controller/core/scheduling/Trigger.h similarity index 100% rename from dram/src/controller/core/scheduling/Trigger.h rename to DRAMSys/dram/src/controller/core/scheduling/Trigger.h diff --git a/dram/src/controller/core/scheduling/checker/ActivateChecker.cpp b/DRAMSys/dram/src/controller/core/scheduling/checker/ActivateChecker.cpp similarity index 100% rename from dram/src/controller/core/scheduling/checker/ActivateChecker.cpp rename to DRAMSys/dram/src/controller/core/scheduling/checker/ActivateChecker.cpp diff --git a/dram/src/controller/core/scheduling/checker/ActivateChecker.h b/DRAMSys/dram/src/controller/core/scheduling/checker/ActivateChecker.h similarity index 100% rename from dram/src/controller/core/scheduling/checker/ActivateChecker.h rename to DRAMSys/dram/src/controller/core/scheduling/checker/ActivateChecker.h diff --git a/dram/src/controller/core/scheduling/checker/ICommandChecker.h b/DRAMSys/dram/src/controller/core/scheduling/checker/ICommandChecker.h similarity index 100% rename from dram/src/controller/core/scheduling/checker/ICommandChecker.h rename to DRAMSys/dram/src/controller/core/scheduling/checker/ICommandChecker.h diff --git a/dram/src/controller/core/scheduling/checker/PowerDownChecker.cpp b/DRAMSys/dram/src/controller/core/scheduling/checker/PowerDownChecker.cpp similarity index 100% rename from dram/src/controller/core/scheduling/checker/PowerDownChecker.cpp rename to DRAMSys/dram/src/controller/core/scheduling/checker/PowerDownChecker.cpp diff --git a/dram/src/controller/core/scheduling/checker/PowerDownChecker.h b/DRAMSys/dram/src/controller/core/scheduling/checker/PowerDownChecker.h similarity index 100% rename from dram/src/controller/core/scheduling/checker/PowerDownChecker.h rename to DRAMSys/dram/src/controller/core/scheduling/checker/PowerDownChecker.h diff --git a/dram/src/controller/core/scheduling/checker/PrechargeAllChecker.cpp b/DRAMSys/dram/src/controller/core/scheduling/checker/PrechargeAllChecker.cpp similarity index 100% rename from dram/src/controller/core/scheduling/checker/PrechargeAllChecker.cpp rename to DRAMSys/dram/src/controller/core/scheduling/checker/PrechargeAllChecker.cpp diff --git a/dram/src/controller/core/scheduling/checker/PrechargeAllChecker.h b/DRAMSys/dram/src/controller/core/scheduling/checker/PrechargeAllChecker.h similarity index 100% rename from dram/src/controller/core/scheduling/checker/PrechargeAllChecker.h rename to DRAMSys/dram/src/controller/core/scheduling/checker/PrechargeAllChecker.h diff --git a/dram/src/controller/core/scheduling/checker/PrechargeChecker.cpp b/DRAMSys/dram/src/controller/core/scheduling/checker/PrechargeChecker.cpp similarity index 100% rename from dram/src/controller/core/scheduling/checker/PrechargeChecker.cpp rename to DRAMSys/dram/src/controller/core/scheduling/checker/PrechargeChecker.cpp diff --git a/dram/src/controller/core/scheduling/checker/PrechargeChecker.h b/DRAMSys/dram/src/controller/core/scheduling/checker/PrechargeChecker.h similarity index 100% rename from dram/src/controller/core/scheduling/checker/PrechargeChecker.h rename to DRAMSys/dram/src/controller/core/scheduling/checker/PrechargeChecker.h diff --git a/dram/src/controller/core/scheduling/checker/ReadChecker.cpp b/DRAMSys/dram/src/controller/core/scheduling/checker/ReadChecker.cpp similarity index 100% rename from dram/src/controller/core/scheduling/checker/ReadChecker.cpp rename to DRAMSys/dram/src/controller/core/scheduling/checker/ReadChecker.cpp diff --git a/dram/src/controller/core/scheduling/checker/ReadChecker.h b/DRAMSys/dram/src/controller/core/scheduling/checker/ReadChecker.h similarity index 100% rename from dram/src/controller/core/scheduling/checker/ReadChecker.h rename to DRAMSys/dram/src/controller/core/scheduling/checker/ReadChecker.h diff --git a/dram/src/controller/core/scheduling/checker/RefreshChecker.cpp b/DRAMSys/dram/src/controller/core/scheduling/checker/RefreshChecker.cpp similarity index 100% rename from dram/src/controller/core/scheduling/checker/RefreshChecker.cpp rename to DRAMSys/dram/src/controller/core/scheduling/checker/RefreshChecker.cpp diff --git a/dram/src/controller/core/scheduling/checker/RefreshChecker.h b/DRAMSys/dram/src/controller/core/scheduling/checker/RefreshChecker.h similarity index 100% rename from dram/src/controller/core/scheduling/checker/RefreshChecker.h rename to DRAMSys/dram/src/controller/core/scheduling/checker/RefreshChecker.h diff --git a/dram/src/controller/core/scheduling/checker/WriteChecker.cpp b/DRAMSys/dram/src/controller/core/scheduling/checker/WriteChecker.cpp similarity index 100% rename from dram/src/controller/core/scheduling/checker/WriteChecker.cpp rename to DRAMSys/dram/src/controller/core/scheduling/checker/WriteChecker.cpp diff --git a/dram/src/controller/core/scheduling/checker/WriteChecker.h b/DRAMSys/dram/src/controller/core/scheduling/checker/WriteChecker.h similarity index 100% rename from dram/src/controller/core/scheduling/checker/WriteChecker.h rename to DRAMSys/dram/src/controller/core/scheduling/checker/WriteChecker.h diff --git a/dram/src/controller/scheduler/Fifo.cpp b/DRAMSys/dram/src/controller/scheduler/Fifo.cpp similarity index 100% rename from dram/src/controller/scheduler/Fifo.cpp rename to DRAMSys/dram/src/controller/scheduler/Fifo.cpp diff --git a/dram/src/controller/scheduler/Fifo.h b/DRAMSys/dram/src/controller/scheduler/Fifo.h similarity index 100% rename from dram/src/controller/scheduler/Fifo.h rename to DRAMSys/dram/src/controller/scheduler/Fifo.h diff --git a/dram/src/controller/scheduler/FifoStrict.cpp b/DRAMSys/dram/src/controller/scheduler/FifoStrict.cpp similarity index 100% rename from dram/src/controller/scheduler/FifoStrict.cpp rename to DRAMSys/dram/src/controller/scheduler/FifoStrict.cpp diff --git a/dram/src/controller/scheduler/FifoStrict.h b/DRAMSys/dram/src/controller/scheduler/FifoStrict.h similarity index 100% rename from dram/src/controller/scheduler/FifoStrict.h rename to DRAMSys/dram/src/controller/scheduler/FifoStrict.h diff --git a/dram/src/controller/scheduler/Fr_Fcfs.cpp b/DRAMSys/dram/src/controller/scheduler/Fr_Fcfs.cpp similarity index 100% rename from dram/src/controller/scheduler/Fr_Fcfs.cpp rename to DRAMSys/dram/src/controller/scheduler/Fr_Fcfs.cpp diff --git a/dram/src/controller/scheduler/Fr_Fcfs.h b/DRAMSys/dram/src/controller/scheduler/Fr_Fcfs.h similarity index 100% rename from dram/src/controller/scheduler/Fr_Fcfs.h rename to DRAMSys/dram/src/controller/scheduler/Fr_Fcfs.h diff --git a/dram/src/controller/scheduler/IScheduler.cpp b/DRAMSys/dram/src/controller/scheduler/IScheduler.cpp similarity index 100% rename from dram/src/controller/scheduler/IScheduler.cpp rename to DRAMSys/dram/src/controller/scheduler/IScheduler.cpp diff --git a/dram/src/controller/scheduler/IScheduler.h b/DRAMSys/dram/src/controller/scheduler/IScheduler.h similarity index 100% rename from dram/src/controller/scheduler/IScheduler.h rename to DRAMSys/dram/src/controller/scheduler/IScheduler.h diff --git a/dram/src/controller/scheduler/PARBS.cpp b/DRAMSys/dram/src/controller/scheduler/PARBS.cpp similarity index 100% rename from dram/src/controller/scheduler/PARBS.cpp rename to DRAMSys/dram/src/controller/scheduler/PARBS.cpp diff --git a/dram/src/controller/scheduler/PARBS.h b/DRAMSys/dram/src/controller/scheduler/PARBS.h similarity index 100% rename from dram/src/controller/scheduler/PARBS.h rename to DRAMSys/dram/src/controller/scheduler/PARBS.h diff --git a/dram/src/controller/scheduler/ThreadLoad.cpp b/DRAMSys/dram/src/controller/scheduler/ThreadLoad.cpp similarity index 100% rename from dram/src/controller/scheduler/ThreadLoad.cpp rename to DRAMSys/dram/src/controller/scheduler/ThreadLoad.cpp diff --git a/dram/src/controller/scheduler/ThreadLoad.h b/DRAMSys/dram/src/controller/scheduler/ThreadLoad.h similarity index 100% rename from dram/src/controller/scheduler/ThreadLoad.h rename to DRAMSys/dram/src/controller/scheduler/ThreadLoad.h diff --git a/dram/src/controller/scheduler/readwritegrouper.cpp b/DRAMSys/dram/src/controller/scheduler/readwritegrouper.cpp similarity index 100% rename from dram/src/controller/scheduler/readwritegrouper.cpp rename to DRAMSys/dram/src/controller/scheduler/readwritegrouper.cpp diff --git a/dram/src/controller/scheduler/readwritegrouper.h b/DRAMSys/dram/src/controller/scheduler/readwritegrouper.h similarity index 100% rename from dram/src/controller/scheduler/readwritegrouper.h rename to DRAMSys/dram/src/controller/scheduler/readwritegrouper.h diff --git a/dram/src/error/error_new.csv b/DRAMSys/dram/src/error/error_new.csv similarity index 100% rename from dram/src/error/error_new.csv rename to DRAMSys/dram/src/error/error_new.csv diff --git a/dram/src/error/flip_memory.cpp b/DRAMSys/dram/src/error/flip_memory.cpp similarity index 100% rename from dram/src/error/flip_memory.cpp rename to DRAMSys/dram/src/error/flip_memory.cpp diff --git a/dram/src/error/flip_memory.h b/DRAMSys/dram/src/error/flip_memory.h similarity index 100% rename from dram/src/error/flip_memory.h rename to DRAMSys/dram/src/error/flip_memory.h diff --git a/dram/src/error/nest_map.cpp b/DRAMSys/dram/src/error/nest_map.cpp similarity index 100% rename from dram/src/error/nest_map.cpp rename to DRAMSys/dram/src/error/nest_map.cpp diff --git a/dram/src/error/nest_map.h b/DRAMSys/dram/src/error/nest_map.h similarity index 100% rename from dram/src/error/nest_map.h rename to DRAMSys/dram/src/error/nest_map.h diff --git a/DRAMSys/dram/src/simulation/Arbiter.h b/DRAMSys/dram/src/simulation/Arbiter.h new file mode 100644 index 00000000..2c8d096a --- /dev/null +++ b/DRAMSys/dram/src/simulation/Arbiter.h @@ -0,0 +1,209 @@ +/* + * Copyright (c) 2015, University of Kaiserslautern + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * 3. Neither the name of the copyright holder nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER + * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * Authors: + * Robert Gernhardt + * Matthias Jung + * Eder F. Zulian + */ + +#ifndef ARBITER_H_ +#define ARBITER_H_ + +#include +#include +#include +#include +#include +#include +#include +#include +#include "../common/xmlAddressdecoder.h" +#include "../common/dramExtension.h" +#include "../controller/core/TimingCalculation.h" +#include "../controller/core/configuration/ConfigurationLoader.h" + +using namespace std; +using namespace tlm; + +template +struct Arbiter: public sc_module { +public: + tlm_utils::multi_passthrough_initiator_socket iSocket; + tlm_utils::multi_passthrough_target_socket tSocket; + + SC_CTOR(Arbiter) : payloadEventQueue(this, &Arbiter::peqCallback) { + // The arbiter communicates with one or more memory unity through one or more sockets (one or more memory channels). + // Each of the arbiter's initiator sockets is bound to a memory controller's target socket. + // Anytime an transaction comes from a memory unity to the arbiter the "bw" callback is called. + iSocket.register_nb_transport_bw(this, &Arbiter::nb_transport_bw); + + for (size_t i = 0; i < Configuration::getInstance().NumberOfMemChannels; ++i) { + channelIsFree.push_back(true); + pendingRequests.push_back(queue()); + } + + // One or more devices can accesss all the memory units through the arbiter. + // Devices' initiator sockets are bound to arbiter's target sockets. + // As soon the arbiter receives a request in any of its target sockets it should treat and forward it to the proper memory channel. + tSocket.register_nb_transport_fw(this, &Arbiter::nb_transport_fw); + + for (size_t i = 0; i < Configuration::getInstance().NumberOfTracePlayers; ++i) { + receivedResponses.push_back(queue()); + } + } + +private: + tlm_utils::peq_with_cb_and_phase payloadEventQueue; + + vector channelIsFree; + + //used to account for the request_accept_delay in the dram controllers + // This is a queue of new transactions. The phase of a new request is BEGIN_REQ. + vector> pendingRequests; + //used to account for the response_accept_delay in the initiators (traceplayer,core etc.) + // This is a queue of responses comming from the memory side. The phase of these transactions is BEGIN_RESP. + vector> receivedResponses; + + // Initiated by dram side + // This function is called when an arbiter's initiator socket receives a transaction from a memory controller + tlm_sync_enum nb_transport_bw(__attribute__((unused)) int id, tlm_generic_payload& payload, tlm_phase& phase, sc_time& bwDelay) + { + TlmRecorder::getInstance().recordPhase(payload, phase, bwDelay + sc_time_stamp()); + payloadEventQueue.notify(payload, phase, bwDelay); + return TLM_ACCEPTED; + } + + // TODO: check this id. How the payload extension propagates and is used... + // TODO: check the index mechanism for initiator and target sockets. Assert the index to be valid. + + // Initiated by initiator side + // This function is called when an arbiter's target socket receives a transaction from a device + tlm_sync_enum nb_transport_fw(int id, tlm_generic_payload& payload, tlm_phase& phase, sc_time& fwDelay) + { + if (phase == BEGIN_REQ) { + // In the begin request phase the socket ID is appended to the payload. + // It will extracted from the payload and used later. + appendDramExtension(id, payload); + payload.acquire(); + } else if (phase == END_RESP) { + payload.release(); + } + + payloadEventQueue.notify(payload, phase, fwDelay); + return TLM_ACCEPTED; + } + + void peqCallback(tlm_generic_payload& payload, const tlm_phase& phase) + { + unsigned int initiatorSocket = DramExtension::getExtension(payload).getThread().ID()-1; + unsigned int channelId = DramExtension::getExtension(payload).getChannel().ID(); + + // TODO: here check if the channel and the initiatorSocket ID are valid. If not, the payload extension was corrupted. + + // Phases initiated by the intiator side from arbiter's point of view (devices performing memory requests to the arbiter) + if (phase == BEGIN_REQ) { + if (channelIsFree[channelId]) { + // This channel was available. Forward the new transaction to the memory controller. + channelIsFree[channelId] = false; + sendToChannel(channelId, payload, phase, SC_ZERO_TIME); + } else { + // This channel is busy. Enqueue the new transaction which phase is BEGIN_REQ. + pendingRequests[channelId].push(&payload); + } + } else if (phase == END_RESP) { + // Send the END_RESP message to the memory + sendToChannel(channelId, payload, phase, SC_ZERO_TIME); + // Drop one element of the queue of BEGIN_RESP from memory to this device + receivedResponses[initiatorSocket].pop(); + + // Check if there are queued transactoins with phase BEGIN_RESP from memory to this device + if (!receivedResponses[initiatorSocket].empty()) { + // The queue is not empty. + tlm_generic_payload *payloadToSend = receivedResponses[initiatorSocket].front(); + // Send ONE extra BEGIN_RESP to the device + sendToInitiator(initiatorSocket, *payloadToSend, BEGIN_RESP, SC_ZERO_TIME); + } + } + + // Phases initiated by the target side from arbiter's point of view (memory side) + else if (phase == END_REQ) { + channelIsFree[channelId] = true; + // The arbiter receives a transaction which phase is END_REQ from memory controller and forwards it to the requester device. + sendToInitiator(initiatorSocket, payload, phase, SC_ZERO_TIME); + + // This channel is now free! Dispatch a new transaction (phase is BEGIN_REQ) from the queue, if any. Send it to the memory controller. + if (!pendingRequests[channelId].empty()) { + tlm_generic_payload *payloadToSend = pendingRequests[channelId].front(); + pendingRequests[channelId].pop(); + // Send ONE of the enqueued new transactions (phase is BEGIN_REQ) through this channel. + sendToChannel(channelId, *payloadToSend, BEGIN_REQ, SC_ZERO_TIME); + // Mark the channel as busy again. + channelIsFree[channelId] = false; + } + } else if (phase == BEGIN_RESP) { + // The arbiter receives a transaction in BEGIN_RESP phase (that came from the memory side) and forwards it to the requester device + if (receivedResponses[initiatorSocket].empty()) + sendToInitiator(initiatorSocket, payload, phase, SC_ZERO_TIME); + // Enqueue the transaction in BEGIN_RESP phase until the initiator device acknowledge it (phase changes to END_RESP). + receivedResponses[initiatorSocket].push(&payload); + } else { + SC_REPORT_FATAL(0, "Payload event queue in arbiter was triggered with unknown phase"); + } + } + + void sendToChannel(unsigned int channelId, tlm_generic_payload& payload, const tlm_phase& phase, const sc_time& delay) + { + tlm_phase TPhase = phase; + sc_time TDelay = delay; + iSocket[channelId]->nb_transport_fw(payload, TPhase, TDelay); + } + + void sendToInitiator(unsigned int id, tlm_generic_payload& payload, const tlm_phase& phase, const sc_time& delay) + { + tlm_phase TPhase = phase; + sc_time TDelay = delay; + tSocket[id]->nb_transport_bw(payload, TPhase, TDelay); + } + + void appendDramExtension(int socketId, tlm_generic_payload& payload) + { + // TODO: check if channel valid before appending. + // TODO: check if all parts of the decodedAddress are inside the valid range (devices should not perform invalid requests to the arbiter, right?). + unsigned int burstlength = payload.get_streaming_width(); + DecodedAddress decodedAddress = xmlAddressDecoder::getInstance().decodeAddress(payload.get_address()); + DramExtension* extension = new DramExtension(Thread(socketId+1), Channel(decodedAddress.channel), Bank(decodedAddress.bank), BankGroup(decodedAddress.bankgroup), Row(decodedAddress.row), Column(decodedAddress.column),burstlength); + payload.set_auto_extension(extension); + } +}; + +#endif /* ARBITER_H_ */ + diff --git a/dram/src/simulation/Dram.h b/DRAMSys/dram/src/simulation/Dram.h similarity index 98% rename from dram/src/simulation/Dram.h rename to DRAMSys/dram/src/simulation/Dram.h index 87fdd72c..44b3d84f 100644 --- a/dram/src/simulation/Dram.h +++ b/DRAMSys/dram/src/simulation/Dram.h @@ -32,6 +32,8 @@ * Authors: * Robert Gernhardt * Matthias Jung + * Peter Ehses + * Eder F. Zulian */ #ifndef DRAM_H_ @@ -161,7 +163,7 @@ struct Dram: sc_module DRAMPower = new libDRAMPower( memSpec, 0 ); } - cout << "ErrorStorageMode: " << EnumToString(ErrorStoreMode) << endl; + printDebugMessage(string("ErrorStorageMode: ") + EnumToString(ErrorStoreMode)); if(ErrorStoreMode == ErrorStorageMode::ErrorModel) { @@ -175,8 +177,8 @@ struct Dram: sc_module { DRAMPower->updateCounters(true); DRAMPower->calcEnergy(); - cout << endl << endl << "Total Energy" << "\t" << DRAMPower->getEnergy().total_energy << endl; - cout << "Average Power" << "\t" << DRAMPower->getPower().average_power << endl; + cout << name() << string("\tTotal Energy: \t") + to_string(DRAMPower->getEnergy().total_energy) << endl; + cout << name() << string("\tAverage Power: \t") + to_string(DRAMPower->getPower().average_power) << endl; } if(ErrorStoreMode == ErrorStorageMode::ErrorModel) { @@ -438,3 +440,4 @@ struct Dram: sc_module }; #endif /* DRAM_H_ */ + diff --git a/dram/src/simulation/MemoryManager.cpp b/DRAMSys/dram/src/simulation/MemoryManager.cpp similarity index 100% rename from dram/src/simulation/MemoryManager.cpp rename to DRAMSys/dram/src/simulation/MemoryManager.cpp diff --git a/dram/src/simulation/MemoryManager.h b/DRAMSys/dram/src/simulation/MemoryManager.h similarity index 100% rename from dram/src/simulation/MemoryManager.h rename to DRAMSys/dram/src/simulation/MemoryManager.h diff --git a/dram/src/simulation/ReorderBuffer.h b/DRAMSys/dram/src/simulation/ReorderBuffer.h similarity index 100% rename from dram/src/simulation/ReorderBuffer.h rename to DRAMSys/dram/src/simulation/ReorderBuffer.h diff --git a/dram/src/simulation/Simulation.cpp b/DRAMSys/dram/src/simulation/Simulation.cpp similarity index 73% rename from dram/src/simulation/Simulation.cpp rename to DRAMSys/dram/src/simulation/Simulation.cpp index 139dd5dc..efd4c1ee 100644 --- a/dram/src/simulation/Simulation.cpp +++ b/DRAMSys/dram/src/simulation/Simulation.cpp @@ -32,21 +32,22 @@ * Authors: * Janik Schlemminger * Matthias Jung + * Eder F. Zulian */ +#include +#include +#include +#include + #include "Simulation.h" #include "../common/TlmRecorder.h" #include "../common/DebugManager.h" #include "../common/xmlAddressdecoder.h" #include "../controller/core/ControllerCore.h" #include "../controller/core/configuration/ConfigurationLoader.h" -#include -#include -#include -#include #include "../common/Utils.h" #include "../error/flip_memory.h" -#include "StlPlayer.h" using namespace std; @@ -89,7 +90,14 @@ void Simulation::setupTlmRecorder(const string &traceName, const string &pathToR TlmRecorder::sqlScriptURI = pathToResources + string("scripts/createTraceDB.sql"); TlmRecorder::getInstance().recordMemconfig(Configuration::getInstance().memconfigUri); TlmRecorder::getInstance().recordMemspec(Configuration::getInstance().memspecUri); - TlmRecorder::getInstance().recordTracenames(devices[0].trace + "," + devices[1].trace + "," + devices[2].trace + "," + devices[3].trace); + std::string traceNames; + for (size_t i = 0; i < devices.size(); i++) { + traceNames.append(devices[i].trace); + if (i == devices.size() - 1) + continue; + traceNames.append(","); + } + TlmRecorder::getInstance().recordTracenames(traceNames); } else { @@ -99,35 +107,52 @@ void Simulation::setupTlmRecorder(const string &traceName, const string &pathToR void Simulation::instantiateModules(const string &pathToResources, const std::vector& devices) { - dram = new Dram<>("dram"); - arbiter = new Arbiter("arbiter"); - controller = new Controller<>("controller"); + for (size_t i = 0; i < Configuration::getInstance().NumberOfTracePlayers; i++) { + std::string playerStr = "player" + std::to_string(i); + TracePlayer<> *player = new StlPlayer<>(playerStr.c_str(), pathToResources + string("traces/") + devices[i].trace, devices[i].clkMhz, this); + players.push_back(player); + } - player1 = new StlPlayer<>("player1", pathToResources + string("traces/") + devices[0].trace, devices[0].clkMhz, this); - player2 = new StlPlayer<>("player2", pathToResources + string("traces/") + devices[1].trace, devices[1].clkMhz, this); - player3 = new StlPlayer<>("player3", pathToResources + string("traces/") + devices[2].trace, devices[2].clkMhz, this); - player4 = new StlPlayer<>("player4", pathToResources + string("traces/") + devices[3].trace, devices[3].clkMhz, this); + arbiter = new Arbiter<128>("arbiter"); + + for (size_t i = 0; i < Configuration::getInstance().NumberOfMemChannels; i++) { + std::string str = "controller" + std::to_string(i); + Controller<> *controller = new Controller<>(str.c_str()); + controllers.push_back(controller); + + str = "dram" + std::to_string(i); + Dram<> *dram = new Dram<>(str.c_str()); + drams.push_back(dram); + } } void Simulation::bindSockets() { - player1->iSocket.bind(arbiter->tSockets[0]); - player2->iSocket.bind(arbiter->tSockets[1]); - player3->iSocket.bind(arbiter->tSockets[2]); - player4->iSocket.bind(arbiter->tSockets[3]); - arbiter->iSocket.bind(controller->tSocket); - controller->iSocket.bind(dram->tSocket); + for (auto player : players) { + player->iSocket.bind(arbiter->tSocket); + } + + for (size_t i = 0; i < Configuration::getInstance().NumberOfMemChannels; i++) { + arbiter->iSocket.bind(controllers[i]->tSocket); + controllers[i]->iSocket.bind(drams[i]->tSocket); + } } Simulation::~Simulation() { - delete dram; + for (auto player : players) { + delete player; + } + delete arbiter; - delete controller; - delete player1; - delete player2; - delete player3; - delete player4; + + for (auto controller : controllers) { + delete controller; + } + + for (auto dram : drams) { + delete dram; + } } void Simulation::start() @@ -138,10 +163,11 @@ void Simulation::start() report(" -> memspec: \t\t" + Configuration::getInstance().memSpec.MemoryId); cout << endl; simulationStartTime = clock(); - player1->nextPayload(); - player2->nextPayload(); - player3->nextPayload(); - player4->nextPayload(); + + for (auto player : players) { + player->nextPayload(); + } + sc_set_stop_mode(SC_STOP_FINISH_DELTA); sc_start(); } @@ -151,16 +177,17 @@ void inline Simulation::tracePlayerTerminates() static unsigned int finishedTracePlayers = 0; finishedTracePlayers++; - if (finishedTracePlayers == NumberOfTracePlayers) - { + if (finishedTracePlayers == Configuration::getInstance().NumberOfTracePlayers) terminateSimulation.notify(); - } } + void Simulation::stop() { wait(terminateSimulation); report("\nTerminating simulation"); - controller->terminateSimulation(); + for (auto controller : controllers) { + controller->terminateSimulation(); + } wait(sc_time(200, SC_NS)); TlmRecorder::getInstance().closeConnection(); sc_stop(); @@ -174,3 +201,4 @@ void Simulation::report(string message) DebugManager::getInstance().printDebugMessage(this->name(), message); cout << message << endl; } + diff --git a/dram/src/simulation/Simulation.h b/DRAMSys/dram/src/simulation/Simulation.h similarity index 88% rename from dram/src/simulation/Simulation.h rename to DRAMSys/dram/src/simulation/Simulation.h index 1458d201..09b14ad5 100644 --- a/dram/src/simulation/Simulation.h +++ b/DRAMSys/dram/src/simulation/Simulation.h @@ -32,20 +32,23 @@ * Authors: * Janik Schlemminger * Matthias Jung + * Eder F. Zulian */ #ifndef SIMULATION_H_ #define SIMULATION_H_ +#include +#include + #include "Dram.h" #include "Arbiter.h" #include "TracePlayer.h" #include "TraceGenerator.h" #include "ReorderBuffer.h" -#include "../controller/Controller.h" -#include -#include #include "TracePlayerListener.h" +#include "StlPlayer.h" +#include "../controller/Controller.h" #include "../common/third_party/tinyxml2/tinyxml2.h" #include "../error/flip_memory.h" @@ -75,7 +78,6 @@ class Simulation: public sc_module, public TracePlayerListener { public: SC_HAS_PROCESS(Simulation); - //Simulation(sc_module_name name, string pathToResources, string traceName, std::vector devices); Simulation(sc_module_name name, string pathToResources, string traceName, DramSetup setup, std::vector devices); ~Simulation(); @@ -84,7 +86,6 @@ public: void stop(); virtual void tracePlayerTerminates() override; - constexpr static unsigned int NumberOfTracePlayers = 4; private: std::string traceName; @@ -92,15 +93,17 @@ private: sc_event terminateSimulation; - Dram<> *dram; - Arbiter *arbiter; - Controller<> *controller; + // A vector of pointers to all trace player (devices which acquire the bus + // and initiate transactions targeting the memory) + std::vector*> players; + // All transactions pass through the same arbiter + Arbiter<> *arbiter; + // Each DRAM unit has a controller + std::vector*> controllers; + // TODO: Each DRAM has a reorder buffer (check this!) ReorderBuffer<> *reorder; - - TracePlayer<> *player1; - TracePlayer<> *player2; - TracePlayer<> *player3; - TracePlayer<> *player4; + // DRAM units + std::vector*> drams; clock_t simulationStartTime; void report(std::string message); diff --git a/dram/src/simulation/SimulationManager.cpp b/DRAMSys/dram/src/simulation/SimulationManager.cpp similarity index 80% rename from dram/src/simulation/SimulationManager.cpp rename to DRAMSys/dram/src/simulation/SimulationManager.cpp index 396619ad..5e971c19 100644 --- a/dram/src/simulation/SimulationManager.cpp +++ b/DRAMSys/dram/src/simulation/SimulationManager.cpp @@ -32,16 +32,18 @@ * Authors: * Janik Schlemminger * Matthias Jung + * Eder F. Zulian */ #include #include + #include "SimulationManager.h" #include "../common/Utils.h" + using namespace std; using namespace tinyxml2; - SimulationManager::SimulationManager(string resources) : resources(resources) { } @@ -123,17 +125,9 @@ void SimulationManager::parseSimulationBatch(XMLElement* simulation) } } - XMLElement* tracesetups = simulation->FirstChildElement("tracesetups"); - if(tracesetups == NULL) tracesetups = simulation; - - for (XMLElement* tracesetup = tracesetups->FirstChildElement("tracesetup"); tracesetup != NULL; - tracesetup = tracesetup->NextSiblingElement("tracesetup")) - { - addTraceSetup(batch, tracesetup); - } + addTraceSetups(batch, simulation); simulationBatches.push_back(batch); - } void SimulationManager::runSimulation(string traceName, DramSetup dramSetup, vector traceSetup) @@ -159,19 +153,30 @@ void SimulationManager::startTraceAnalyzer() system(run_tpr.c_str()); } -void SimulationManager::addTraceSetup(SimulationBatch& batch, tinyxml2::XMLElement* element) +void SimulationManager::addTraceSetups(SimulationBatch &batch, tinyxml2::XMLElement *simulation) { vector devices; - for (XMLElement* device = element->FirstChildElement("device"); device != NULL; device = device->NextSiblingElement("device")) - { - devices.push_back(Device(device->GetText(), device->IntAttribute("clkMhz"), device->IntAttribute("bl"))); - } - while (devices.size() < Simulation::NumberOfTracePlayers) - { - devices.push_back(Device()); - } + XMLElement *tracesetups = simulation->FirstChildElement("tracesetups"); + XMLElement *simconfig = simulation->FirstChildElement("simconfig"); + unsigned int numberOfTracePlayers = 1; + XMLElement *ntp = simconfig->FirstChildElement("NumberOfTracePlayers"); + if (ntp != NULL) + ntp->QueryUnsignedAttribute("value", &numberOfTracePlayers); - batch.traceSetups.emplace(element->Attribute("id"), devices); + for (XMLElement *tracesetup = tracesetups->FirstChildElement("tracesetup"); tracesetup != NULL; tracesetup = tracesetup->NextSiblingElement("tracesetup")) { + + // TODO: check device's "bl" argument. + for (XMLElement *device = tracesetup->FirstChildElement("device"); device != NULL; device = device->NextSiblingElement("device")) { + devices.push_back(Device(device->GetText(), device->IntAttribute("clkMhz"), device->IntAttribute("bl"))); + } + + // This step is done here to add a default device in case the user haven't specified a trace file to be executed by one or more trace players. + while (devices.size() < numberOfTracePlayers) { + devices.push_back(Device()); + } + + batch.traceSetups.emplace(tracesetup->Attribute("id"), devices); + } } void SimulationManager::report(string message) diff --git a/dram/src/simulation/SimulationManager.h b/DRAMSys/dram/src/simulation/SimulationManager.h similarity index 96% rename from dram/src/simulation/SimulationManager.h rename to DRAMSys/dram/src/simulation/SimulationManager.h index cff6d97f..c95a96f2 100644 --- a/dram/src/simulation/SimulationManager.h +++ b/DRAMSys/dram/src/simulation/SimulationManager.h @@ -32,6 +32,7 @@ * Authors: * Janik Schlemminger * Matthias Jung + * Eder F. Zulian */ #ifndef SIMULATIONMANAGER_H_ @@ -72,7 +73,7 @@ private: void runSimulation(std::string traceName, DramSetup dramSetup, std::vector traceSetup); void parseSimulationBatch(tinyxml2::XMLElement* simulation); - void addTraceSetup(SimulationBatch& batch, tinyxml2::XMLElement* element); + void addTraceSetups(SimulationBatch &batch, tinyxml2::XMLElement *element); void report(std::string message); }; diff --git a/dram/src/simulation/StlPlayer.h b/DRAMSys/dram/src/simulation/StlPlayer.h similarity index 100% rename from dram/src/simulation/StlPlayer.h rename to DRAMSys/dram/src/simulation/StlPlayer.h diff --git a/dram/src/simulation/TraceGenerator.h b/DRAMSys/dram/src/simulation/TraceGenerator.h similarity index 100% rename from dram/src/simulation/TraceGenerator.h rename to DRAMSys/dram/src/simulation/TraceGenerator.h diff --git a/dram/src/simulation/TracePlayer.h b/DRAMSys/dram/src/simulation/TracePlayer.h similarity index 100% rename from dram/src/simulation/TracePlayer.h rename to DRAMSys/dram/src/simulation/TracePlayer.h diff --git a/dram/src/simulation/TracePlayerListener.h b/DRAMSys/dram/src/simulation/TracePlayerListener.h similarity index 100% rename from dram/src/simulation/TracePlayerListener.h rename to DRAMSys/dram/src/simulation/TracePlayerListener.h diff --git a/dram/src/simulation/main.cpp b/DRAMSys/dram/src/simulation/main.cpp similarity index 93% rename from dram/src/simulation/main.cpp rename to DRAMSys/dram/src/simulation/main.cpp index 0c160654..7acd8a98 100644 --- a/dram/src/simulation/main.cpp +++ b/DRAMSys/dram/src/simulation/main.cpp @@ -59,14 +59,14 @@ int main(int argc, char **argv) int sc_main(int argc, char **argv) { sc_set_time_resolution(1, SC_PS); - resources = pathOfFile(argv[0]) + string("/../resources/"); + resources = pathOfFile(argv[0]) + string("/../../../DRAMSys/dram/resources/"); cout< 1) simulationToRun = argv[1]; else - simulationToRun = resources + "/simulations/sim-batch.xml"; + simulationToRun = resources + "simulations/sim-batch.xml"; SimulationManager manager(resources); manager.loadSimulationsFromXML(simulationToRun); diff --git a/README.md b/README.md index 751aff48..e64cca57 100644 --- a/README.md +++ b/README.md @@ -5,18 +5,13 @@ Generic DRAM controller simulator **DRAMSys** [1] and related tools. ## Basic Setup -In a terminal window execute the commands that follow. - -Go to your home directory. +Open a terminal window, go to your home directory, create a directory for your +projects and change to it. ``` bash $ cd -``` - -Create a directory for your projects. - -``` bash $ mkdir projects +$ cd projects ``` Clone the repository. @@ -29,32 +24,39 @@ The *--recursive* flag tells git to initialize all submodules within the repository. **DRAMPower** [2] and **tinyxml** are examples third party repositories that were embedded within the source tree as submodules. -It is possible to work with a copy of the official codebase. The copy is -called **fork**. In that case, after pushing changes into your fork you should -create a **pull request** in order to your supervisor check and possibly bring -your changes to the official codebase. +It is possible to work with a **fork** of the official codebase. In that case, +after pushing changes into your fork you should create a **pull request** in +order to get your changes merged into to the official codebase. ``` bash $ git clone --recursive https://@git.rhrk.uni-kl.de//dram.vp.system.git ``` -After a pull request being accepted and merged into the official repository -you should get your fork updated. - -``` bash -$ git fetch upstream -$ git checkout master -$ git merge upstream/master -$ git push origin HEAD -``` - After cloning go to the project directory. ``` bash $ cd dram.vp.system ``` -### With QTCreator +When working with a fork, the official repository must be added as a remote for +your fork. + +``` bash +$ git remote add upstream https://@git.rhrk.uni-kl.de/EIT-Wehn/dram.vp.system.git +$ git remote -v +``` + +Also, after a pull request being accepted and merged into the official +repository you should get your fork updated. + +``` bash +$ git fetch upstream +$ git checkout master +$ git merge upstream/master +$ git push origin HEAD +``` + +### Buiding with QTCreator Execute the *QTCreator*. ``` bash @@ -63,15 +65,11 @@ $ qtcreator & Use the menu bar and open the DRAMSys project. -**File -> Open Project -> dram.vp.sys/dram/dramSys/dramSys.pro** +**File -> Open Project -> dram.vp.system/DRAMSys/dram.vp.system.pro** When you open the project for the first time a configuration window pops-up. Then click in **Configure Project** and after that **Build** the project. -Repeat the procedure above and build the trace analyser project. - -**File -> Open Project -> dram.vp.sys/analyser/analyser/traceAnalizer.pro** - To speedup the building process one can use the additional **make** option **-j[jobs]**. The command line below returns a good number to be passed to make as the number of jobs that can run simultaneously to improve the building @@ -85,19 +83,35 @@ In the left bar go to **Projects -> Build & Run -> Build Steps -> Make**. Click in **Details** then **Make arguments** and add **-j** followed by the number you got. -### Without QTCreator +### Building without QTCreator In case you prefer a command line interface to the QTCreator GUI you can also use **qmake** to generate a Makefile and then compile the project. ``` bash -$ cd dram $ mkdir build $ cd build -$ qmake ../dramSys/dramSys.pro +$ qmake ../DRAMSys/dram.vp.system.pro $ make ``` +The compilation generates executable binary files **dramSys** and +**traceAnalyzer** that can be found inside sub-directories. + +From the build directory use the commands below to execute DRAMSys. + +``` bash +$ cd dram/dramSys +$ ./dramSys +``` + +From the build directory use the commands below to execute the traceAnalyzer. + +``` bash +$ cd analyzer/analyzer +$ ./traceAnalyzer +``` + ### DRAMSys Configuration The **dramSys** executable supports one argument which is a XML file that @@ -109,26 +123,42 @@ The XML code below shows a typic configuration: ``` xml + - - - + + + + + + - + + - + + - + + + + + voco2.stl + voco2.stl voco2.stl @@ -144,6 +174,36 @@ The XML configuration files are parsed by the program and the configuration details extracted are assigned to the correspondent attributes of the internal configuration structure. +#### Simulation Setups + +Every possible combination of memory specification, address mapping and memory +configuration corresponds to a **simulation setup**. + +DRAMSys executes all the **trace setups** listed in the configuration file for +each of the simulation setups. + +A single **trace setup** is composed of an id string and one or more +**devices**. + +The **device** configuration consists of two configuration fields - clkMhz +(operation frequency for this device) and bl (burst length) - and a +**trace file**. + +A **trace file** is a pre-recorded file containing memory transactions. Each +memory transaction has a timestamp that tells the simulator when it shall +happen, a transaction type (e.g. read, write) and a memory address. + +A **trace player** is **equivalent** to a bus master **device** (i.e. a device +that locks a bus and generates memory transactions). By adding device elements +into the trace setup section one can specify the operation frequency, the +burst length and the trace file to be used by trace players. + +Trace players without a corresponding device configuration do not generate +transactions. + +**DRAMSys** executes all the simulation setups within the configuration file +providing **flexibility** for **exhaustive explorations.** + #### Configuration File Sections The main configuration file is divided into self-contained sections, each of @@ -162,6 +222,10 @@ Below are listed the configuration sections and configuration fields. - *PowerAnalysis* (boolean) - "1": enables live power analysis with the DRAMPower tool - "0": disables power analysis + - *NumberOfTracePlayers* (unsigned int) + - Number of trace players + - *NumberOfMemChannels* (unsigned int) + - Number of memory channels - **Memory specification** @@ -172,7 +236,7 @@ Below are listed the configuration sections and configuration fields. XML files describe the address mapping to be used in the simulation. - The file [am_wideio.xml](dram/resources/configs/amconfigs/am_wideio.xml) is + The file [am_wideio.xml](DRAMSys/dram/resources/configs/amconfigs/am_wideio.xml) is a good example. ``` xml @@ -185,7 +249,7 @@ Below are listed the configuration sections and configuration fields. ``` - ![Address Mapping Sample 1](docs/images/am_sample1.png) + ![Address Mapping Sample 1](DRAMSys/docs/images/am_sample1.png) ``` xml @@ -197,11 +261,11 @@ Below are listed the configuration sections and configuration fields. ``` - ![Address Mapping Sample 2](docs/images/am_sample2.png) + ![Address Mapping Sample 2](DRAMSys/docs/images/am_sample2.png) - **Memory Configuration** - The content of [fifo.xml](dram/resources/configs/memconfigs/fifo.xml) is + The content of [fifo.xml](DRAMSys/dram/resources/configs/memconfigs/fifo.xml) is presented below as an example. ``` xml @@ -257,19 +321,26 @@ Below are listed the configuration sections and configuration fields. - "ErrorModel": store data with error model [6] - **Trace setups** - - *id* - - trace setup id - - *clkMhz* - - speed of the trace player + - *id* (string) + - Trace setup id. Two files are generated by DRAMSys: an SQLite database + file (.tdb) and a text file (.txt) containing the program output. The + name of these files comes from this field. + - *clkMhz* (unsigned int) + - Speed of the trace player + - *bl* (unsigned int) + - Burst length + - *trace file* + - A pre-recorded file containing memory transactions to be executed by a + trace player. Some attributes are self-explanatory while others require some previous -knowhow of memory technologies or some knowledge of the simulator source code. +knowhow of memory technologies. -Resources of the simulator are available in the **resources** directory its -sub-directories. +Resources of the simulator are available inside of the **resources** directory +and its sub-directories. ``` bash -$ cd /projects/dram.vp.system/dram/resources +$ cd DRAMSys/dram/resources ``` A description of the content each directory follows. @@ -279,7 +350,6 @@ A description of the content each directory follows. - am_configs: address mapping configuration - memconfigs: memory configuration - memspecs: configuration related to the memory technology - - simconfigs: simulator configuration - **scripts**: useful tools like address scrambler, trace analyser, database creator, etc. - **simulations**: global configuration diff --git a/analyzer/.gitignore b/analyzer/.gitignore deleted file mode 100644 index 30d388a1..00000000 --- a/analyzer/.gitignore +++ /dev/null @@ -1 +0,0 @@ -build* \ No newline at end of file diff --git a/analyzer/analyzer/.gitignore b/analyzer/analyzer/.gitignore deleted file mode 100644 index 8705455d..00000000 --- a/analyzer/analyzer/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -traceAnalyzer.pro.user -traceAnalyzer.pro.user.* diff --git a/dram/clean b/dram/clean deleted file mode 100755 index 0e2d6764..00000000 --- a/dram/clean +++ /dev/null @@ -1,7 +0,0 @@ -echo "Cleaning Up:" -echo " -->remove *.txt" -rm *.txt -echo " -->remove *.tdb" -rm *.tdb -echo " -->remove *.tdb-journal" -rm *.tdb-journal \ No newline at end of file diff --git a/dram/dramSys/.gitignore b/dram/dramSys/.gitignore deleted file mode 100644 index 119b4ee5..00000000 --- a/dram/dramSys/.gitignore +++ /dev/null @@ -1 +0,0 @@ -dramSys.pro.user diff --git a/dram/resources/configs/simconfigs/simple.xml b/dram/resources/configs/simconfigs/simple.xml deleted file mode 100644 index 4b3322c8..00000000 --- a/dram/resources/configs/simconfigs/simple.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/dram/resources/simulations/sim-batch.xml b/dram/resources/simulations/sim-batch.xml deleted file mode 100644 index 43e20eed..00000000 --- a/dram/resources/simulations/sim-batch.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - - - - - - - - - chstone-adpcm_32.stl - - - - diff --git a/dram/src/common/third_party/tinyxml2 b/dram/src/common/third_party/tinyxml2 deleted file mode 160000 index e5e5541a..00000000 --- a/dram/src/common/third_party/tinyxml2 +++ /dev/null @@ -1 +0,0 @@ -Subproject commit e5e5541af6c22abb6122e82d636c1f92d33d98c5 diff --git a/dram/src/simulation/Arbiter.h b/dram/src/simulation/Arbiter.h deleted file mode 100644 index 41e187be..00000000 --- a/dram/src/simulation/Arbiter.h +++ /dev/null @@ -1,192 +0,0 @@ -/* - * Copyright (c) 2015, University of Kaiserslautern - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * 3. Neither the name of the copyright holder nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER - * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * Authors: - * Robert Gernhardt - * Matthias Jung - */ - -#ifndef ARBITER_H_ -#define ARBITER_H_ - - -#include -#include -#include -#include -#include -#include -#include "../common/xmlAddressdecoder.h" -#include "../common/dramExtension.h" -#include "../controller/core/TimingCalculation.h" -#include - - -using namespace std; -using namespace tlm; - -template -struct Arbiter: public sc_module -{ -public: - tlm_utils::simple_initiator_socket iSocket; - tlm_utils::simple_target_socket_tagged tSockets[NUMBER_OF_THREADS]; - - SC_CTOR(Arbiter) : - payloadEventQueue(this, &Arbiter::peqCallback), channelIsFree(true) - { - iSocket.register_nb_transport_bw(this, &Arbiter::nb_transport_bw); - - for (unsigned int i = 0; i < NUMBER_OF_THREADS; ++i) - { - tSockets[i].register_nb_transport_fw(this, &Arbiter::nb_transport_fw, i); - } - } - -private: - tlm_utils::peq_with_cb_and_phase payloadEventQueue; - bool channelIsFree; - //used to account for the request_accept_delay in the dram controllers - deque pendingRequests; - //used to account for the response_accept_delay in the initiators (traceplayer,core etc.) - deque receivedResponses[NUMBER_OF_THREADS]; - - // Initiated by dram side - tlm_sync_enum nb_transport_bw(tlm_generic_payload& payload, tlm_phase& phase, sc_time& bwDelay) - { - TlmRecorder::getInstance().recordPhase(payload, phase, bwDelay + sc_time_stamp()); - payloadEventQueue.notify(payload, phase, bwDelay); - return TLM_ACCEPTED; - } - - // Initiated by initiator side - tlm_sync_enum nb_transport_fw(int socketId, tlm_generic_payload& payload, tlm_phase& phase, - sc_time& fwDelay) - { - if(phase == BEGIN_REQ) - { - appendDramExtension(socketId, payload); - payload.acquire(); - } - else if(phase == END_RESP) - { - payload.release(); - } - - payloadEventQueue.notify(payload, phase, fwDelay); - return TLM_ACCEPTED; - } - - void peqCallback(tlm_generic_payload& payload, const tlm_phase& phase) - { - unsigned int initiatorSocket = DramExtension::getExtension(payload).getThread().ID()-1; - - - //Phases initiated by intiator side - if (phase == BEGIN_REQ) - { - if(channelIsFree) - { - channelIsFree = false; - sendToChannel(payload, phase, SC_ZERO_TIME ); - } - else - { - pendingRequests.push_back(&payload); - } - } - - else if (phase == END_RESP) - { - sendToChannel(payload, phase, SC_ZERO_TIME); - receivedResponses[initiatorSocket].pop_front(); - if(!receivedResponses[initiatorSocket].empty()) - { - tlm_generic_payload* payloadToSend = receivedResponses[initiatorSocket].front(); - sendToInitiator(initiatorSocket,*payloadToSend,BEGIN_RESP,SC_ZERO_TIME); - } - } - - //Phases initiated by dram side - else if (phase == END_REQ) - { - channelIsFree = true; - sendToInitiator(initiatorSocket, payload, phase, SC_ZERO_TIME); - - if(!pendingRequests.empty()) - { - tlm_generic_payload* payloadToSend = pendingRequests.front(); - pendingRequests.pop_front(); - sendToChannel(*payloadToSend, BEGIN_REQ, SC_ZERO_TIME ); - channelIsFree = false; - } - } - else if (phase == BEGIN_RESP) - { - if(receivedResponses[initiatorSocket].empty()) - sendToInitiator(initiatorSocket, payload, phase, SC_ZERO_TIME); - receivedResponses[initiatorSocket].push_back(&payload); - } - - else - { - SC_REPORT_FATAL(0, "Payload event queue in arbiter was triggered with unknown phase"); - } - } - - void sendToChannel(tlm_generic_payload& payload, const tlm_phase& phase, const sc_time& delay) - { - tlm_phase TPhase = phase; - sc_time TDelay = delay; - iSocket->nb_transport_fw(payload, TPhase, TDelay); - } - - void sendToInitiator(unsigned int id, tlm_generic_payload& payload, const tlm_phase& phase, const sc_time& delay) - { - tlm_phase TPhase = phase; - sc_time TDelay = delay; - tSockets[id]->nb_transport_bw(payload, TPhase, TDelay); - } - - void appendDramExtension(int socketId, tlm_generic_payload& payload) - { - unsigned int burstlength = payload.get_streaming_width(); - DecodedAddress decodedAddress = xmlAddressDecoder::getInstance().decodeAddress(payload.get_address()); - DramExtension* extension = new DramExtension(Thread(socketId+1), Channel(0), Bank(decodedAddress.bank), - BankGroup(decodedAddress.bankgroup), Row(decodedAddress.row), Column(decodedAddress.column),burstlength); - payload.set_auto_extension(extension); - } -}; - - - - -#endif /* ARBITER_H_ */