Make Trace Analyzer run again.
This commit is contained in:
@@ -34,23 +34,28 @@
|
||||
# Derek Christ
|
||||
# Iron Prando da Silva
|
||||
|
||||
cmake_minimum_required(VERSION 3.12)
|
||||
########################################
|
||||
### TraceAnalyzer ###
|
||||
########################################
|
||||
|
||||
# Project Name:
|
||||
project(TraceAnalyzer)
|
||||
|
||||
file(GLOB_RECURSE SOURCE_FILES CONFIGURE_DEPENDS *.cpp)
|
||||
file(GLOB_RECURSE HEADER_FILES CONFIGURE_DEPENDS *.h;*.hpp)
|
||||
#file(GLOB_RECURSE UI_FILES CONFIGURE_DEPENDS *.ui)
|
||||
|
||||
# Add Python3 Dependency:
|
||||
find_package(Python3 COMPONENTS Development)
|
||||
|
||||
# Add QWT Dependency:
|
||||
find_library(QWT_LIBRARY NAMES "qwt-qt5" "qwt" PATHS
|
||||
find_library(QWT_LIBRARY NAMES "qwt" "qwt-qt5" PATHS
|
||||
"$ENV{QWT_HOME}/lib"
|
||||
"/opt/homebrew/opt/qwt-qt5/lib"
|
||||
)
|
||||
find_path(QWT_INCLUDE_DIRS NAMES "qwt_plot.h" PATHS
|
||||
"$ENV{QWT_HOME}/include"
|
||||
"/usr/include/qwt-qt5"
|
||||
"/usr/include/qwt"
|
||||
"$ENV{QWT_HOME}/include"
|
||||
"/opt/homebrew/opt/qwt-qt5/include"
|
||||
"/opt/homebrew/opt/qwt-qt5/lib/qwt.framework/Headers"
|
||||
)
|
||||
@@ -65,114 +70,22 @@ set(CMAKE_AUTOUIC ON)
|
||||
set(CMAKE_AUTORCC ON)
|
||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
|
||||
# Configure:
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
set(DCMAKE_SH="CMAKE_SH-NOTFOUND")
|
||||
|
||||
add_executable(TraceAnalyzer
|
||||
main.cpp
|
||||
businessObjects/transaction.cpp
|
||||
businessObjects/timespan.cpp
|
||||
data/tracedb.cpp
|
||||
presentation/tracenavigator.cpp
|
||||
presentation/util/colorgenerator.cpp
|
||||
presentation/util/colorobject.cpp
|
||||
presentation/tracedrawing.cpp
|
||||
presentation/traceplotitem.cpp
|
||||
gototimedialog.cpp
|
||||
presentation/traceplot.cpp
|
||||
tracefiletab.cpp
|
||||
presentation/tracescroller.cpp
|
||||
traceanalyzer.cpp
|
||||
presentation/transactiontreewidget.cpp
|
||||
presentation/util/clkgrid.cpp
|
||||
queryeditor.cpp
|
||||
presentation/selectedtransactiontreewidget.cpp
|
||||
businessObjects/phases/phasefactory.cpp
|
||||
presentation/debugmessagetreewidget.cpp
|
||||
presentation/tracePlotMouseLabel.cpp
|
||||
evaluationtool.cpp
|
||||
selectmetrics.cpp
|
||||
presentation/util/testlight.cpp
|
||||
presentation/util/togglecollapsedaction.cpp
|
||||
businessObjects/pythoncaller.cpp
|
||||
presentation/tracemetrictreewidget.cpp
|
||||
businessObjects/phases/phase.cpp
|
||||
businessObjects/phases/phasedependency.cpp
|
||||
businessObjects/phases/dependencyinfos.cpp
|
||||
presentation/tracedrawingproperties.cpp
|
||||
presentation/util/customlabelscaledraw.cpp
|
||||
businessObjects/configmodels.cpp
|
||||
businessObjects/commentmodel.cpp
|
||||
businessObjects/traceplotlinemodel.cpp
|
||||
simulationdialog.cpp
|
||||
businessObjects/dependencymodels.cpp
|
||||
|
||||
businessObjects/dramTimeDependencies/common/QStringComparator.cpp
|
||||
businessObjects/dramTimeDependencies/common/StringMapper.cpp
|
||||
businessObjects/dramTimeDependencies/deviceDependencies/poolcontroller.cpp
|
||||
businessObjects/dramTimeDependencies/deviceDependencies/poolcontrollermap.cpp
|
||||
businessObjects/dramTimeDependencies/deviceDependencies/dramtimedependenciesbase.cpp
|
||||
businessObjects/dramTimeDependencies/configurations/configurationBase.cpp
|
||||
|
||||
businessObjects/dramTimeDependencies/dbEntries/specialized/DDR3dbphaseentry.cpp
|
||||
# businessObjects/dramTimeDependencies/deviceDependencies/specialized/DDR3TimeDependencies.cpp
|
||||
businessObjects/dramTimeDependencies/deviceDependencies/specialized/TimeDependenciesInfoDDR3.cpp
|
||||
businessObjects/dramTimeDependencies/configurations/specialized/DDR3Configuration.cpp
|
||||
|
||||
businessObjects/dramTimeDependencies/dbEntries/specialized/DDR4dbphaseentry.cpp
|
||||
businessObjects/dramTimeDependencies/deviceDependencies/specialized/TimeDependenciesInfoDDR4.cpp
|
||||
businessObjects/dramTimeDependencies/configurations/specialized/DDR4Configuration.cpp
|
||||
|
||||
businessObjects/dramTimeDependencies/dbEntries/specialized/HBM2dbphaseentry.cpp
|
||||
businessObjects/dramTimeDependencies/deviceDependencies/specialized/TimeDependenciesInfoHBM2.cpp
|
||||
businessObjects/dramTimeDependencies/configurations/specialized/HBM2Configuration.cpp
|
||||
|
||||
businessObjects/dramTimeDependencies/dbEntries/specialized/LPDDR4dbphaseentry.cpp
|
||||
businessObjects/dramTimeDependencies/deviceDependencies/specialized/TimeDependenciesInfoLPDDR4.cpp
|
||||
businessObjects/dramTimeDependencies/configurations/specialized/LPDDR4Configuration.cpp
|
||||
|
||||
businessObjects/dramTimeDependencies/dbEntries/specialized/DDR5dbphaseentry.cpp
|
||||
businessObjects/dramTimeDependencies/deviceDependencies/specialized/TimeDependenciesInfoDDR5.cpp
|
||||
businessObjects/dramTimeDependencies/configurations/specialized/DDR5Configuration.cpp
|
||||
|
||||
businessObjects/dramTimeDependencies/dbEntries/specialized/LPDDR5dbphaseentry.cpp
|
||||
businessObjects/dramTimeDependencies/deviceDependencies/specialized/TimeDependenciesInfoLPDDR5.cpp
|
||||
businessObjects/dramTimeDependencies/configurations/specialized/LPDDR5Configuration.cpp
|
||||
|
||||
businessObjects/dramTimeDependencies/configurations/configurationfactory.cpp
|
||||
businessObjects/dramTimeDependencies/phasedependenciestracker.cpp
|
||||
|
||||
selectmetrics.ui
|
||||
preferences.ui
|
||||
evaluationtool.ui
|
||||
gototimedialog.ui
|
||||
tracefiletab.ui
|
||||
queryeditor.ui
|
||||
traceanalyzer.ui
|
||||
simulationdialog.ui
|
||||
|
||||
scripts/memUtil.py
|
||||
scripts/metrics.py
|
||||
scripts/tests.py
|
||||
scripts/plots.py
|
||||
scripts/vcdExport.py
|
||||
scripts/sonification.pl
|
||||
scripts/dataExtractForNN.pl
|
||||
|
||||
resources.qrc
|
||||
)
|
||||
add_executable(TraceAnalyzer ${SOURCE_FILES} ${HEADER_FILES})
|
||||
|
||||
target_include_directories(TraceAnalyzer
|
||||
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
PRIVATE ${QWT_INCLUDE_DIRS}
|
||||
PRIVATE ${Python3_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
# Build:
|
||||
target_link_libraries(TraceAnalyzer
|
||||
PRIVATE ${Python3_LIBRARIES}
|
||||
PRIVATE ${QWT_LIBRARY}
|
||||
PRIVATE Qt5::Widgets
|
||||
PRIVATE Qt5::Sql
|
||||
PRIVATE DRAMSysConfiguration
|
||||
PRIVATE DRAMSys::util
|
||||
PRIVATE DRAMSys::config
|
||||
)
|
||||
|
||||
build_source_group()
|
||||
diagnostics_print(${PROJECT_NAME})
|
||||
|
||||
@@ -57,7 +57,7 @@ PythonCaller::PythonCaller() :
|
||||
getMetricFunctionName("getMetrics"),
|
||||
|
||||
pathToScripts(QApplication::applicationDirPath().toStdString() +
|
||||
"/../../DRAMSys/traceAnalyzer/scripts/"),
|
||||
"/../../extensions/apps/traceAnalyzer/scripts/"),
|
||||
plotsModuleName("plots"),
|
||||
plotsFunctionName("generatePlots"),
|
||||
checkDependenciesModuleName("checkDependencies"),
|
||||
|
||||
@@ -1,82 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2015, Technische Universität 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:
|
||||
* Janik Schlemminger
|
||||
* Robert Gernhardt
|
||||
* Matthias Jung
|
||||
*/
|
||||
|
||||
#include "mainwindow.h"
|
||||
#include "ui_mainwindow.h"
|
||||
#include "traceDB.h"
|
||||
#include "xmldeserializer.h"
|
||||
#include <qwt_plot.h>
|
||||
|
||||
MainWindow::MainWindow(QWidget *parent) :
|
||||
QMainWindow(parent),
|
||||
ui(new Ui::MainWindow)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
// xmlDeserializer des("config.xml");
|
||||
// des.xmlToTraceDB("tpr.xml")
|
||||
|
||||
db = new TraceDB("tpr.tdb", true);
|
||||
traceNavigator = new TraceNavigator(db->getGeneralInfo(), this);
|
||||
ui->tracePlot->init(traceNavigator, db);
|
||||
ui->traceScroller->init(traceNavigator, db, ui->tracePlot);
|
||||
phases = db->getPhasesInTimespan(
|
||||
traceNavigator->GeneralTraceInfo().TraceSpan());
|
||||
transactions = db->getTransactionsInTimespan(
|
||||
traceNavigator->GeneralTraceInfo().TraceSpan());
|
||||
|
||||
ui->qwtPlot->setAxisScale(QwtPlot::xBottom,
|
||||
traceNavigator->GeneralTraceInfo().TraceSpan().Begin(),
|
||||
traceNavigator->GeneralTraceInfo().TraceSpan().End());
|
||||
unsigned int banksize = traceNavigator->GeneralTraceInfo().NumberOfBanks();
|
||||
ui->qwtPlot->setAxisScale(QwtPlot::yLeft, 0.0, banksize + 3, 1.0);
|
||||
|
||||
PhaseCollectionDrawingProperties *drawingProperties = new
|
||||
PhaseCollectionDrawingProperties(banksize, this);
|
||||
drawingProperties->setDrawText(false);
|
||||
drawingProperties->setDrawBorder(false);
|
||||
drawingProperties->setDrawPowerDownStates(false);
|
||||
phaseCollectionPlotItem *phaseCollectionPlot = new phaseCollectionPlotItem(
|
||||
phases, transactions, drawingProperties);
|
||||
phaseCollectionPlot->attach(ui->qwtPlot);
|
||||
|
||||
traceNavigator->navigateToTime(0);
|
||||
}
|
||||
|
||||
MainWindow::~MainWindow()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
@@ -1,72 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2015, Technische Universität 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:
|
||||
* Janik Schlemminger
|
||||
* Robert Gernhardt
|
||||
* Matthias Jung
|
||||
*/
|
||||
|
||||
#ifndef MAINWINDOW_H
|
||||
#define MAINWINDOW_H
|
||||
|
||||
#include <QMainWindow>
|
||||
#include <QHash>
|
||||
|
||||
#include "tracenavigator.h"
|
||||
|
||||
class TraceDB;
|
||||
|
||||
namespace Ui {
|
||||
class MainWindow;
|
||||
}
|
||||
|
||||
class MainWindow : public QMainWindow
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit MainWindow(QWidget *parent = 0);
|
||||
~MainWindow();
|
||||
|
||||
//private slots:
|
||||
// void on_horizontalScrollBar_valueChanged(int value);
|
||||
|
||||
private:
|
||||
Ui::MainWindow *ui;
|
||||
TraceNavigator *traceNavigator;
|
||||
TraceDB *db;
|
||||
QHash<ID, Phase> phases;
|
||||
QHash<ID, Transaction> transactions;
|
||||
|
||||
};
|
||||
|
||||
#endif // MAINWINDOW_H
|
||||
@@ -1,51 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2015, Technische Universität 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:
|
||||
* Janik Schlemminger
|
||||
* Robert Gernhardt
|
||||
* Matthias Jung
|
||||
*/
|
||||
|
||||
#include "markerplotitem.h"
|
||||
#include "tracedrawing.h"
|
||||
#include <qwt_scale_map.h>
|
||||
|
||||
int MarkerPlotItem::rtti() const
|
||||
{
|
||||
return QwtPlotItem::Rtti_PlotUserItem;
|
||||
}
|
||||
|
||||
void MarkerPlotItem::draw(QPainter *painter, const QwtScaleMap &xMap,
|
||||
const QwtScaleMap &yMap, const QRectF &canvasRect) const
|
||||
{
|
||||
drawVerticalLine(painter, xMap.transform(time), canvasRect, color, width);
|
||||
}
|
||||
@@ -1,74 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2015, Technische Universität 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:
|
||||
* Janik Schlemminger
|
||||
* Robert Gernhardt
|
||||
* Matthias Jung
|
||||
*/
|
||||
|
||||
#ifndef SCHEDULERWRAPPER_H
|
||||
#define SCHEDULERWRAPPER_H
|
||||
|
||||
#include <tlm.h>
|
||||
#include <systemc.h>
|
||||
#include <tlm_utils/simple_target_socket.h>
|
||||
#include <tlm_utils/simple_initiator_socket.h>
|
||||
#include <tlm_utils/peq_with_cb_and_phase.h>
|
||||
|
||||
struct SchedulerWrapper : public sc_module {
|
||||
tlm_utils::simple_initiator_socket<SchedulerWrapper> iSocket;
|
||||
tlm_utils::simple_target_socket<SchedulerWrapper> tSocket;
|
||||
|
||||
SC_HAS_PROCESS(SchedulerWrapper);
|
||||
|
||||
SchedulerWrapper(sc_module_name name);
|
||||
|
||||
private:
|
||||
tlm_utils::peq_with_cb_and_phase<SchedulerWrapper> payloadEventQueue;
|
||||
|
||||
tlm::tlm_sync_enum nb_transport_bw(tlm::tlm_generic_payload &payload,
|
||||
tlm::tlm_phase &phase, sc_time &bwDelay);
|
||||
tlm::tlm_sync_enum nb_transport_fw(tlm::tlm_generic_payload &payload,
|
||||
tlm::tlm_phase &phase, sc_time &fwDelay);
|
||||
|
||||
void peqCallback(tlm::tlm_generic_payload &payload,
|
||||
const tlm::tlm_phase &phase);
|
||||
void sendToTarget(tlm::tlm_generic_payload &payload,
|
||||
const tlm::tlm_phase &phase, const sc_time &delay);
|
||||
void sendToInitiator(tlm::tlm_generic_payload &payload,
|
||||
const tlm::tlm_phase &phase, const sc_time &delay);
|
||||
|
||||
};
|
||||
|
||||
#endif // SCHEDULERWRAPPER_H
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
*/
|
||||
|
||||
#include "simulationdialog.h"
|
||||
#include "TraceSetup.h"
|
||||
#include "DRAMSys/config/TraceSetup.h"
|
||||
|
||||
#include <QDateTime>
|
||||
#include <QDebug>
|
||||
@@ -217,7 +217,7 @@ void SimulationDialog::saveConfiguration(QFile &file)
|
||||
|
||||
loadConfigurationFromTextFields();
|
||||
|
||||
std::string dump = DRAMSysConfiguration::dump(configuration, 4);
|
||||
std::string dump = DRAMSys::Config::dump(configuration, 4);
|
||||
out << dump.c_str();
|
||||
}
|
||||
|
||||
@@ -239,14 +239,13 @@ void SimulationDialog::processMessage(const std::string &msg)
|
||||
|
||||
void SimulationDialog::loadConfigurationFromTextFields()
|
||||
{
|
||||
using namespace DRAMSysConfiguration;
|
||||
using namespace DRAMSys::Config;
|
||||
|
||||
AddressMapping addressMapping;
|
||||
McConfig mcConfig;
|
||||
MemSpec memSpec;
|
||||
SimConfig simConfig;
|
||||
std::string simulationId;
|
||||
ThermalConfig thermalConfig;
|
||||
TraceSetup traceSetup;
|
||||
|
||||
simulationId = ui->simulationIdLineEdit->text().toStdString();
|
||||
@@ -258,9 +257,6 @@ void SimulationDialog::loadConfigurationFromTextFields()
|
||||
from_dump(ui->memSpecTextEdit->toPlainText().toStdString(), memSpec);
|
||||
from_dump(ui->simConfigTextEdit->toPlainText().toStdString(), simConfig);
|
||||
|
||||
if (!ui->thermalConfigTextEdit->toPlainText().toStdString().empty())
|
||||
from_dump(ui->thermalConfigTextEdit->toPlainText().toStdString(), thermalConfig);
|
||||
|
||||
if (!ui->traceSetupTextEdit->toPlainText().toStdString().empty())
|
||||
from_dump(ui->traceSetupTextEdit->toPlainText().toStdString(), traceSetup);
|
||||
}
|
||||
@@ -270,12 +266,11 @@ void SimulationDialog::loadConfigurationFromTextFields()
|
||||
return;
|
||||
}
|
||||
|
||||
configuration = DRAMSysConfiguration::Configuration{addressMapping,
|
||||
configuration = DRAMSys::Config::Configuration{addressMapping,
|
||||
mcConfig,
|
||||
memSpec,
|
||||
simConfig,
|
||||
simulationId,
|
||||
std::make_optional<ThermalConfig>(std::move(thermalConfig)),
|
||||
std::make_optional<TraceSetup>(std::move(traceSetup))};
|
||||
|
||||
loadConfiguration();
|
||||
@@ -290,7 +285,7 @@ void SimulationDialog::loadConfigurationFromPath()
|
||||
|
||||
try
|
||||
{
|
||||
configuration = DRAMSysConfiguration::from_path(ui->jsonPath->text().toStdString());
|
||||
configuration = DRAMSys::Config::from_path(ui->jsonPath->text().toStdString());
|
||||
}
|
||||
catch (const std::exception &e)
|
||||
{
|
||||
@@ -313,7 +308,6 @@ void SimulationDialog::loadConfiguration()
|
||||
loadMcConfig();
|
||||
loadMemSpec();
|
||||
loadAddressMapping();
|
||||
loadThermalConfig();
|
||||
loadTraceSetup();
|
||||
loadPreview();
|
||||
}
|
||||
@@ -322,7 +316,7 @@ void SimulationDialog::loadSimConfig()
|
||||
{
|
||||
ui->simConfigTextEdit->clear();
|
||||
|
||||
std::string dump = DRAMSysConfiguration::dump(configuration.simConfig, 4);
|
||||
std::string dump = DRAMSys::Config::dump(configuration.simConfig, 4);
|
||||
ui->simConfigTextEdit->setText(dump.c_str());
|
||||
}
|
||||
|
||||
@@ -330,7 +324,7 @@ void SimulationDialog::loadMcConfig()
|
||||
{
|
||||
ui->mcConfigTextEdit->clear();
|
||||
|
||||
std::string dump = DRAMSysConfiguration::dump(configuration.mcConfig, 4);
|
||||
std::string dump = DRAMSys::Config::dump(configuration.mcConfig, 4);
|
||||
ui->mcConfigTextEdit->setText(dump.c_str());
|
||||
}
|
||||
|
||||
@@ -338,7 +332,7 @@ void SimulationDialog::loadMemSpec()
|
||||
{
|
||||
ui->memSpecTextEdit->clear();
|
||||
|
||||
std::string dump = DRAMSysConfiguration::dump(configuration.memSpec, 4);
|
||||
std::string dump = DRAMSys::Config::dump(configuration.memSpec, 4);
|
||||
ui->memSpecTextEdit->setText(dump.c_str());
|
||||
}
|
||||
|
||||
@@ -346,28 +340,17 @@ void SimulationDialog::loadAddressMapping()
|
||||
{
|
||||
ui->addressMappingTextEdit->clear();
|
||||
|
||||
std::string dump = DRAMSysConfiguration::dump(configuration.addressMapping, 4);
|
||||
std::string dump = DRAMSys::Config::dump(configuration.addressMapping, 4);
|
||||
ui->addressMappingTextEdit->setText(dump.c_str());
|
||||
}
|
||||
|
||||
void SimulationDialog::loadThermalConfig()
|
||||
{
|
||||
ui->thermalConfigTextEdit->clear();
|
||||
|
||||
if (const auto &thermalConfig = configuration.thermalConfig)
|
||||
{
|
||||
std::string dump = DRAMSysConfiguration::dump(*thermalConfig, 4);
|
||||
ui->thermalConfigTextEdit->setText(dump.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
void SimulationDialog::loadTraceSetup()
|
||||
{
|
||||
ui->traceSetupTextEdit->clear();
|
||||
|
||||
if (const auto &traceSetup = configuration.traceSetup)
|
||||
{
|
||||
std::string dump = DRAMSysConfiguration::dump(*traceSetup, 4);
|
||||
std::string dump = DRAMSys::Config::dump(*traceSetup, 4);
|
||||
ui->traceSetupTextEdit->setText(dump.c_str());
|
||||
}
|
||||
}
|
||||
@@ -376,7 +359,7 @@ void SimulationDialog::loadPreview()
|
||||
{
|
||||
ui->previewTextEdit->clear();
|
||||
|
||||
std::string dump = DRAMSysConfiguration::dump(configuration, 4);
|
||||
std::string dump = DRAMSys::Config::dump(configuration, 4);
|
||||
ui->previewTextEdit->setText(dump.c_str());
|
||||
}
|
||||
|
||||
|
||||
@@ -38,7 +38,8 @@
|
||||
|
||||
#include "ui_simulationdialog.h"
|
||||
|
||||
#include <DRAMSysConfiguration.h>
|
||||
#include "DRAMSys/config/DRAMSysConfiguration.h"
|
||||
|
||||
#include <QFileInfo>
|
||||
#include <QPointer>
|
||||
#include <QProcess>
|
||||
@@ -80,7 +81,6 @@ private:
|
||||
void loadMcConfig();
|
||||
void loadMemSpec();
|
||||
void loadAddressMapping();
|
||||
void loadThermalConfig();
|
||||
void loadTraceSetup();
|
||||
void loadPreview();
|
||||
|
||||
@@ -92,7 +92,7 @@ private:
|
||||
void openSimulationResults(const QFileInfoList &fileInfos);
|
||||
|
||||
QTemporaryFile temporaryConfigurationFile;
|
||||
DRAMSysConfiguration::Configuration configuration;
|
||||
DRAMSys::Config::Configuration configuration;
|
||||
|
||||
QPointer<QProcess> simulatorProcess;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user