Merge branch 'feat/new_checkers' into 'develop'
Use new timing checkers See merge request ems/astdm/modeling.dram/dram.sys.5!95
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2020, RPTU Kaiserslautern-Landau
|
||||
* Copyright (c) 2024, RPTU Kaiserslautern-Landau
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -29,20 +29,20 @@
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* Author: Lukas Steiner
|
||||
* Authors:
|
||||
* Lukas Steiner
|
||||
* Derek Christ
|
||||
*/
|
||||
|
||||
#ifndef CHECKERDDR5_H
|
||||
#define CHECKERDDR5_H
|
||||
|
||||
#include "DRAMSys/controller/checker/CheckerIF.h"
|
||||
#include "DRAMSys/configuration/memspec/MemSpecDDR5.h"
|
||||
|
||||
#include <queue>
|
||||
#include <vector>
|
||||
|
||||
#include <DRAMSys/controller/checker/CheckerIF.h>
|
||||
|
||||
#include <DRAMSys/common/utils.h>
|
||||
#include <DRAMSys/configuration/memspec/MemSpecDDR5.h>
|
||||
|
||||
namespace DRAMSys
|
||||
{
|
||||
|
||||
@@ -50,42 +50,12 @@ class CheckerDDR5 final : public CheckerIF
|
||||
{
|
||||
public:
|
||||
explicit CheckerDDR5(const MemSpecDDR5& memSpec);
|
||||
sc_core::sc_time
|
||||
timeToSatisfyConstraints(Command command,
|
||||
const tlm::tlm_generic_payload& payload) const override;
|
||||
[[nodiscard]] sc_core::sc_time timeToSatisfyConstraints(Command command, const tlm::tlm_generic_payload& payload) const override;
|
||||
void insert(Command command, const tlm::tlm_generic_payload& payload) override;
|
||||
|
||||
private:
|
||||
const MemSpecDDR5& memSpec;
|
||||
|
||||
std::vector<ControllerVector<DimmRank, sc_core::sc_time>> lastScheduledByCommandAndDimmRank;
|
||||
std::vector<ControllerVector<PhysicalRank, sc_core::sc_time>>
|
||||
lastScheduledByCommandAndPhysicalRank;
|
||||
std::vector<ControllerVector<LogicalRank, sc_core::sc_time>>
|
||||
lastScheduledByCommandAndLogicalRank;
|
||||
std::vector<ControllerVector<BankGroup, sc_core::sc_time>> lastScheduledByCommandAndBankGroup;
|
||||
std::vector<ControllerVector<Bank, sc_core::sc_time>> lastScheduledByCommandAndBank;
|
||||
std::vector<sc_core::sc_time> lastScheduledByCommand;
|
||||
sc_core::sc_time lastCommandOnBus;
|
||||
TimeInterval dummyCommandOnBus;
|
||||
|
||||
std::vector<ControllerVector<Bank, sc_core::sc_time>> lastScheduledByCommandAndBankInGroup;
|
||||
|
||||
ControllerVector<PhysicalRank, std::queue<sc_core::sc_time>> last4ActivatesPhysical;
|
||||
ControllerVector<LogicalRank, std::queue<sc_core::sc_time>> last4ActivatesLogical;
|
||||
|
||||
std::vector<ControllerVector<DimmRank, uint8_t>> lastBurstLengthByCommandAndDimmRank;
|
||||
std::vector<ControllerVector<PhysicalRank, uint8_t>> lastBurstLengthByCommandAndPhysicalRank;
|
||||
std::vector<ControllerVector<LogicalRank, uint8_t>> lastBurstLengthByCommandAndLogicalRank;
|
||||
std::vector<ControllerVector<BankGroup, uint8_t>> lastBurstLengthByCommandAndBankGroup;
|
||||
std::vector<ControllerVector<Bank, uint8_t>> lastBurstLengthByCommandAndBank;
|
||||
std::vector<uint8_t> lastBurstLengthByCommand;
|
||||
|
||||
std::vector<ControllerVector<Bank, uint8_t>> lastBurstLengthByCommandAndBankInGroup;
|
||||
|
||||
// TODO: store BL of last RD and WR globally or for each hierarchy?
|
||||
|
||||
const sc_core::sc_time scMaxTime = sc_core::sc_max_time();
|
||||
sc_core::sc_time cmdLengthDiff;
|
||||
sc_core::sc_time tBURST16;
|
||||
sc_core::sc_time tBURST32;
|
||||
@@ -112,8 +82,31 @@ private:
|
||||
sc_core::sc_time tRDPDEN;
|
||||
sc_core::sc_time tWRPDEN;
|
||||
sc_core::sc_time tWRAPDEN;
|
||||
template<typename T>
|
||||
using CommandArray = std::array<T, Command::END_ENUM>;
|
||||
template<typename T>
|
||||
using BankVector = ControllerVector<Bank, T>;
|
||||
template<typename T>
|
||||
using BankGroupVector = ControllerVector<BankGroup, T>;
|
||||
template<typename T>
|
||||
using LogicalRankVector = ControllerVector<LogicalRank, T>;
|
||||
template<typename T>
|
||||
using PhysicalRankVector = ControllerVector<PhysicalRank, T>;
|
||||
template<typename T>
|
||||
using DimmRankVector = ControllerVector<DimmRank, T>;
|
||||
|
||||
|
||||
CommandArray<BankVector<sc_core::sc_time>> nextCommandByBank;
|
||||
CommandArray<BankGroupVector<sc_core::sc_time>> nextCommandByBankGroup;
|
||||
CommandArray<LogicalRankVector<sc_core::sc_time>> nextCommandByLogicalRank;
|
||||
CommandArray<PhysicalRankVector<sc_core::sc_time>> nextCommandByPhysicalRank;
|
||||
CommandArray<DimmRankVector<sc_core::sc_time>> nextCommandByDimmRank;
|
||||
|
||||
LogicalRankVector<std::queue<sc_core::sc_time>> last4ActivatesOnLogicalRank;
|
||||
PhysicalRankVector<std::queue<sc_core::sc_time>> last4ActivatesOnPhysicalRank;
|
||||
sc_core::sc_time nextCommandOnBus = sc_core::SC_ZERO_TIME;
|
||||
};
|
||||
|
||||
} // namespace DRAMSys
|
||||
|
||||
#endif // CHECKERDDR5_H
|
||||
#endif // CHECKERDDR5_H
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2019, RPTU Kaiserslautern-Landau
|
||||
* Copyright (c) 2024, RPTU Kaiserslautern-Landau
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -29,20 +29,20 @@
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* Author: Lukas Steiner
|
||||
* Authors:
|
||||
* Lukas Steiner
|
||||
* Derek Christ
|
||||
*/
|
||||
|
||||
#ifndef CHECKERHBM3_H
|
||||
#define CHECKERHBM3_H
|
||||
|
||||
#include "DRAMSys/controller/checker/CheckerIF.h"
|
||||
#include "DRAMSys/configuration/memspec/MemSpecHBM3.h"
|
||||
|
||||
#include <queue>
|
||||
#include <vector>
|
||||
|
||||
#include <DRAMSys/controller/checker/CheckerIF.h>
|
||||
|
||||
#include <DRAMSys/common/utils.h>
|
||||
#include <DRAMSys/configuration/memspec/MemSpecHBM3.h>
|
||||
|
||||
namespace DRAMSys
|
||||
{
|
||||
|
||||
@@ -50,29 +50,12 @@ class CheckerHBM3 final : public CheckerIF
|
||||
{
|
||||
public:
|
||||
explicit CheckerHBM3(const MemSpecHBM3& memSpec);
|
||||
sc_core::sc_time
|
||||
timeToSatisfyConstraints(Command command,
|
||||
const tlm::tlm_generic_payload& payload) const override;
|
||||
[[nodiscard]] sc_core::sc_time timeToSatisfyConstraints(Command command, const tlm::tlm_generic_payload& payload) const override;
|
||||
void insert(Command command, const tlm::tlm_generic_payload& payload) override;
|
||||
|
||||
private:
|
||||
bool isFullCycle(const sc_core::sc_time& time) const;
|
||||
|
||||
const MemSpecHBM3& memSpec;
|
||||
|
||||
std::vector<ControllerVector<Bank, sc_core::sc_time>> lastScheduledByCommandAndBank;
|
||||
std::vector<ControllerVector<BankGroup, sc_core::sc_time>> lastScheduledByCommandAndBankGroup;
|
||||
std::vector<ControllerVector<Rank, sc_core::sc_time>> lastScheduledByCommandAndRank;
|
||||
std::vector<sc_core::sc_time> lastScheduledByCommand;
|
||||
|
||||
sc_core::sc_time lastCommandOnRasBus;
|
||||
sc_core::sc_time lastCommandOnCasBus;
|
||||
|
||||
// Four activate window
|
||||
ControllerVector<Rank, std::queue<sc_core::sc_time>> last4Activates;
|
||||
ControllerVector<Rank, unsigned> bankwiseRefreshCounter;
|
||||
|
||||
const sc_core::sc_time scMaxTime = sc_core::sc_max_time();
|
||||
sc_core::sc_time tRDPDE;
|
||||
sc_core::sc_time tRDSRE;
|
||||
sc_core::sc_time tWRPRE;
|
||||
@@ -80,8 +63,26 @@ private:
|
||||
sc_core::sc_time tWRAPDE;
|
||||
sc_core::sc_time tWRRDS;
|
||||
sc_core::sc_time tWRRDL;
|
||||
template<typename T>
|
||||
using CommandArray = std::array<T, Command::END_ENUM>;
|
||||
template<typename T>
|
||||
using BankVector = ControllerVector<Bank, T>;
|
||||
template<typename T>
|
||||
using BankGroupVector = ControllerVector<BankGroup, T>;
|
||||
template<typename T>
|
||||
using RankVector = ControllerVector<Rank, T>;
|
||||
|
||||
|
||||
CommandArray<BankVector<sc_core::sc_time>> nextCommandByBank;
|
||||
CommandArray<BankGroupVector<sc_core::sc_time>> nextCommandByBankGroup;
|
||||
CommandArray<RankVector<sc_core::sc_time>> nextCommandByRank;
|
||||
|
||||
RankVector<std::queue<sc_core::sc_time>> last4ActivatesOnRank;
|
||||
ControllerVector<Rank, unsigned> bankwiseRefreshCounter;
|
||||
sc_core::sc_time nextCommandOnRasBus = sc_core::SC_ZERO_TIME;
|
||||
sc_core::sc_time nextCommandOnCasBus = sc_core::SC_ZERO_TIME;
|
||||
};
|
||||
|
||||
} // namespace DRAMSys
|
||||
|
||||
#endif // CHECKERHBM3_H
|
||||
#endif // CHECKERHBM3_H
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2021, RPTU Kaiserslautern-Landau
|
||||
* Copyright (c) 2024, RPTU Kaiserslautern-Landau
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -29,20 +29,20 @@
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* Author: Lukas Steiner
|
||||
* Authors:
|
||||
* Lukas Steiner
|
||||
* Derek Christ
|
||||
*/
|
||||
|
||||
#ifndef CHECKERLPDDR5_H
|
||||
#define CHECKERLPDDR5_H
|
||||
|
||||
#include "DRAMSys/controller/checker/CheckerIF.h"
|
||||
#include "DRAMSys/configuration/memspec/MemSpecLPDDR5.h"
|
||||
|
||||
#include <queue>
|
||||
#include <vector>
|
||||
|
||||
#include <DRAMSys/controller/checker/CheckerIF.h>
|
||||
|
||||
#include <DRAMSys/common/utils.h>
|
||||
#include <DRAMSys/configuration/memspec/MemSpecLPDDR5.h>
|
||||
|
||||
namespace DRAMSys
|
||||
{
|
||||
|
||||
@@ -50,42 +50,30 @@ class CheckerLPDDR5 final : public CheckerIF
|
||||
{
|
||||
public:
|
||||
explicit CheckerLPDDR5(const MemSpecLPDDR5& memSpec);
|
||||
sc_core::sc_time
|
||||
timeToSatisfyConstraints(Command command,
|
||||
const tlm::tlm_generic_payload& payload) const override;
|
||||
[[nodiscard]] sc_core::sc_time timeToSatisfyConstraints(Command command, const tlm::tlm_generic_payload& payload) const override;
|
||||
void insert(Command command, const tlm::tlm_generic_payload& payload) override;
|
||||
|
||||
private:
|
||||
const MemSpecLPDDR5& memSpec;
|
||||
|
||||
std::vector<ControllerVector<Rank, sc_core::sc_time>> lastScheduledByCommandAndRank;
|
||||
std::vector<ControllerVector<BankGroup, sc_core::sc_time>> lastScheduledByCommandAndBankGroup;
|
||||
std::vector<ControllerVector<Bank, sc_core::sc_time>> lastScheduledByCommandAndBank;
|
||||
std::vector<sc_core::sc_time> lastScheduledByCommand;
|
||||
sc_core::sc_time lastCommandOnBus;
|
||||
ControllerVector<Rank, std::queue<sc_core::sc_time>> last4Activates;
|
||||
template<typename T>
|
||||
using CommandArray = std::array<T, Command::END_ENUM>;
|
||||
template<typename T>
|
||||
using BankVector = ControllerVector<Bank, T>;
|
||||
template<typename T>
|
||||
using BankGroupVector = ControllerVector<BankGroup, T>;
|
||||
template<typename T>
|
||||
using RankVector = ControllerVector<Rank, T>;
|
||||
|
||||
std::vector<ControllerVector<Rank, uint8_t>> lastBurstLengthByCommandAndRank;
|
||||
std::vector<ControllerVector<BankGroup, uint8_t>> lastBurstLengthByCommandAndBankGroup;
|
||||
std::vector<ControllerVector<Bank, uint8_t>> lastBurstLengthByCommandAndBank;
|
||||
std::vector<uint8_t> lastBurstLengthByCommand;
|
||||
|
||||
const sc_core::sc_time scMaxTime = sc_core::sc_max_time();
|
||||
sc_core::sc_time tBURST16;
|
||||
sc_core::sc_time tBURST32;
|
||||
sc_core::sc_time tRDWR;
|
||||
sc_core::sc_time tRDWR_R;
|
||||
sc_core::sc_time tWRRD_S;
|
||||
sc_core::sc_time tWRRD_L;
|
||||
sc_core::sc_time tWRRD_R;
|
||||
sc_core::sc_time tRDAACT;
|
||||
sc_core::sc_time tWRPRE;
|
||||
sc_core::sc_time tWRAACT;
|
||||
sc_core::sc_time tRDPDEN;
|
||||
sc_core::sc_time tWRPDEN;
|
||||
sc_core::sc_time tWRAPDEN;
|
||||
|
||||
CommandArray<BankVector<sc_core::sc_time>> nextCommandByBank;
|
||||
CommandArray<BankGroupVector<sc_core::sc_time>> nextCommandByBankGroup;
|
||||
CommandArray<RankVector<sc_core::sc_time>> nextCommandByRank;
|
||||
|
||||
RankVector<std::queue<sc_core::sc_time>> last4ActivatesOnRank;
|
||||
sc_core::sc_time nextCommandOnBus = sc_core::SC_ZERO_TIME;
|
||||
};
|
||||
|
||||
} // namespace DRAMSys
|
||||
|
||||
#endif // CHECKERLPDDR5_H
|
||||
#endif // CHECKERLPDDR5_H
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2019, RPTU Kaiserslautern-Landau
|
||||
* Copyright (c) 2024, RPTU Kaiserslautern-Landau
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -29,14 +29,16 @@
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* Author: Lukas Steiner
|
||||
* Authors:
|
||||
* Lukas Steiner
|
||||
* Derek Christ
|
||||
*/
|
||||
|
||||
#ifndef CHECKERDDR3_H
|
||||
#define CHECKERDDR3_H
|
||||
|
||||
#include "DRAMSys/configuration/memspec/MemSpecDDR3.h"
|
||||
#include "DRAMSys/controller/checker/CheckerIF.h"
|
||||
#include "DRAMSys/configuration/memspec/MemSpecDDR3.h"
|
||||
|
||||
#include <queue>
|
||||
#include <vector>
|
||||
@@ -47,35 +49,37 @@ namespace DRAMSys
|
||||
class CheckerDDR3 final : public CheckerIF
|
||||
{
|
||||
public:
|
||||
explicit CheckerDDR3(const MemSpecDDR3 &memSpec);
|
||||
[[nodiscard]] sc_core::sc_time
|
||||
timeToSatisfyConstraints(Command command,
|
||||
const tlm::tlm_generic_payload& payload) const override;
|
||||
explicit CheckerDDR3(const MemSpecDDR3& memSpec);
|
||||
[[nodiscard]] sc_core::sc_time timeToSatisfyConstraints(Command command, const tlm::tlm_generic_payload& payload) const override;
|
||||
void insert(Command command, const tlm::tlm_generic_payload& payload) override;
|
||||
|
||||
private:
|
||||
const MemSpecDDR3& memSpec;
|
||||
|
||||
std::vector<ControllerVector<Bank, sc_core::sc_time>> lastScheduledByCommandAndBank;
|
||||
std::vector<ControllerVector<Rank, sc_core::sc_time>> lastScheduledByCommandAndRank;
|
||||
std::vector<sc_core::sc_time> lastScheduledByCommand;
|
||||
sc_core::sc_time lastCommandOnBus;
|
||||
|
||||
// Four activate window
|
||||
ControllerVector<Rank, std::queue<sc_core::sc_time>> last4Activates;
|
||||
|
||||
const sc_core::sc_time scMaxTime = sc_core::sc_max_time();
|
||||
sc_core::sc_time tBURST;
|
||||
sc_core::sc_time tRDWR;
|
||||
sc_core::sc_time tRDWR_R;
|
||||
sc_core::sc_time tWRRD;
|
||||
sc_core::sc_time tWRPRE;
|
||||
sc_core::sc_time tWRRD_R;
|
||||
sc_core::sc_time tWRPRE;
|
||||
sc_core::sc_time tRDPDEN;
|
||||
sc_core::sc_time tWRPDEN;
|
||||
sc_core::sc_time tWRAPDEN;
|
||||
template<typename T>
|
||||
using CommandArray = std::array<T, Command::END_ENUM>;
|
||||
template<typename T>
|
||||
using BankVector = ControllerVector<Bank, T>;
|
||||
template<typename T>
|
||||
using RankVector = ControllerVector<Rank, T>;
|
||||
|
||||
|
||||
CommandArray<BankVector<sc_core::sc_time>> nextCommandByBank;
|
||||
CommandArray<RankVector<sc_core::sc_time>> nextCommandByRank;
|
||||
|
||||
RankVector<std::queue<sc_core::sc_time>> last4ActivatesOnRank;
|
||||
sc_core::sc_time nextCommandOnBus = sc_core::SC_ZERO_TIME;
|
||||
};
|
||||
|
||||
} // namespace DRAMSys
|
||||
|
||||
#endif // CHECKERDDR3_H
|
||||
#endif // CHECKERDDR3_H
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2019, RPTU Kaiserslautern-Landau
|
||||
* Copyright (c) 2024, RPTU Kaiserslautern-Landau
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -29,18 +29,18 @@
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* Author: Lukas Steiner
|
||||
* Authors:
|
||||
* Lukas Steiner
|
||||
* Derek Christ
|
||||
*/
|
||||
|
||||
#ifndef CHECKERDDR4_H
|
||||
#define CHECKERDDR4_H
|
||||
|
||||
#include "DRAMSys/configuration/memspec/MemSpecDDR4.h"
|
||||
#include "DRAMSys/controller/checker/CheckerIF.h"
|
||||
#include "DRAMSys/configuration/memspec/MemSpecDDR4.h"
|
||||
|
||||
#include <queue>
|
||||
#include <unordered_map>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
namespace DRAMSys
|
||||
@@ -50,24 +50,12 @@ class CheckerDDR4 final : public CheckerIF
|
||||
{
|
||||
public:
|
||||
explicit CheckerDDR4(const MemSpecDDR4& memSpec);
|
||||
[[nodiscard]] sc_core::sc_time
|
||||
timeToSatisfyConstraints(Command command,
|
||||
const tlm::tlm_generic_payload& payload) const override;
|
||||
[[nodiscard]] sc_core::sc_time timeToSatisfyConstraints(Command command, const tlm::tlm_generic_payload& payload) const override;
|
||||
void insert(Command command, const tlm::tlm_generic_payload& payload) override;
|
||||
|
||||
private:
|
||||
const MemSpecDDR4& memSpec;
|
||||
|
||||
std::vector<ControllerVector<Bank, sc_core::sc_time>> lastScheduledByCommandAndBank;
|
||||
std::vector<ControllerVector<BankGroup, sc_core::sc_time>> lastScheduledByCommandAndBankGroup;
|
||||
std::vector<ControllerVector<Rank, sc_core::sc_time>> lastScheduledByCommandAndRank;
|
||||
std::vector<sc_core::sc_time> lastScheduledByCommand;
|
||||
sc_core::sc_time lastCommandOnBus;
|
||||
|
||||
// Four activate window
|
||||
ControllerVector<Rank, std::queue<sc_core::sc_time>> last4Activates;
|
||||
|
||||
const sc_core::sc_time scMaxTime = sc_core::sc_max_time();
|
||||
sc_core::sc_time tBURST;
|
||||
sc_core::sc_time tRDWR;
|
||||
sc_core::sc_time tRDWR_R;
|
||||
@@ -80,8 +68,24 @@ private:
|
||||
sc_core::sc_time tRDPDEN;
|
||||
sc_core::sc_time tWRPDEN;
|
||||
sc_core::sc_time tWRAPDEN;
|
||||
template<typename T>
|
||||
using CommandArray = std::array<T, Command::END_ENUM>;
|
||||
template<typename T>
|
||||
using BankVector = ControllerVector<Bank, T>;
|
||||
template<typename T>
|
||||
using BankGroupVector = ControllerVector<BankGroup, T>;
|
||||
template<typename T>
|
||||
using RankVector = ControllerVector<Rank, T>;
|
||||
|
||||
|
||||
CommandArray<BankVector<sc_core::sc_time>> nextCommandByBank;
|
||||
CommandArray<BankGroupVector<sc_core::sc_time>> nextCommandByBankGroup;
|
||||
CommandArray<RankVector<sc_core::sc_time>> nextCommandByRank;
|
||||
|
||||
RankVector<std::queue<sc_core::sc_time>> last4ActivatesOnRank;
|
||||
sc_core::sc_time nextCommandOnBus = sc_core::SC_ZERO_TIME;
|
||||
};
|
||||
|
||||
} // namespace DRAMSys
|
||||
|
||||
#endif // CHECKERDDR4_H
|
||||
#endif // CHECKERDDR4_H
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2019, RPTU Kaiserslautern-Landau
|
||||
* Copyright (c) 2024, RPTU Kaiserslautern-Landau
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -29,14 +29,16 @@
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* Author: Lukas Steiner
|
||||
* Authors:
|
||||
* Lukas Steiner
|
||||
* Derek Christ
|
||||
*/
|
||||
|
||||
#ifndef CHECKERHBM2_H
|
||||
#define CHECKERHBM2_H
|
||||
|
||||
#include "DRAMSys/configuration/memspec/MemSpecHBM2.h"
|
||||
#include "DRAMSys/controller/checker/CheckerIF.h"
|
||||
#include "DRAMSys/configuration/memspec/MemSpecHBM2.h"
|
||||
|
||||
#include <queue>
|
||||
#include <vector>
|
||||
@@ -48,39 +50,40 @@ class CheckerHBM2 final : public CheckerIF
|
||||
{
|
||||
public:
|
||||
explicit CheckerHBM2(const MemSpecHBM2& memSpec);
|
||||
[[nodiscard]] sc_core::sc_time
|
||||
timeToSatisfyConstraints(Command command,
|
||||
const tlm::tlm_generic_payload& payload) const override;
|
||||
[[nodiscard]] sc_core::sc_time timeToSatisfyConstraints(Command command, const tlm::tlm_generic_payload& payload) const override;
|
||||
void insert(Command command, const tlm::tlm_generic_payload& payload) override;
|
||||
|
||||
private:
|
||||
const MemSpecHBM2& memSpec;
|
||||
|
||||
std::vector<ControllerVector<Bank, sc_core::sc_time>> lastScheduledByCommandAndBank;
|
||||
std::vector<ControllerVector<BankGroup, sc_core::sc_time>> lastScheduledByCommandAndBankGroup;
|
||||
std::vector<ControllerVector<Rank, sc_core::sc_time>> lastScheduledByCommandAndRank;
|
||||
std::vector<sc_core::sc_time> lastScheduledByCommand;
|
||||
|
||||
sc_core::sc_time lastCommandOnRasBus;
|
||||
sc_core::sc_time lastCommandOnCasBus;
|
||||
|
||||
// Four activate window
|
||||
ControllerVector<Rank, std::queue<sc_core::sc_time>> last4Activates;
|
||||
ControllerVector<Rank, unsigned> bankwiseRefreshCounter;
|
||||
|
||||
const sc_core::sc_time scMaxTime = sc_core::sc_max_time();
|
||||
sc_core::sc_time tBURST;
|
||||
sc_core::sc_time tRDPDE;
|
||||
sc_core::sc_time tRDSRE;
|
||||
sc_core::sc_time tWRPRE;
|
||||
sc_core::sc_time tWRPDE;
|
||||
sc_core::sc_time tWRAPDE;
|
||||
sc_core::sc_time tRTWR;
|
||||
sc_core::sc_time tWRRDS;
|
||||
sc_core::sc_time tWRRDL;
|
||||
sc_core::sc_time tWRRDR;
|
||||
template<typename T>
|
||||
using CommandArray = std::array<T, Command::END_ENUM>;
|
||||
template<typename T>
|
||||
using BankVector = ControllerVector<Bank, T>;
|
||||
template<typename T>
|
||||
using BankGroupVector = ControllerVector<BankGroup, T>;
|
||||
template<typename T>
|
||||
using RankVector = ControllerVector<Rank, T>;
|
||||
|
||||
|
||||
CommandArray<BankVector<sc_core::sc_time>> nextCommandByBank;
|
||||
CommandArray<BankGroupVector<sc_core::sc_time>> nextCommandByBankGroup;
|
||||
CommandArray<RankVector<sc_core::sc_time>> nextCommandByRank;
|
||||
|
||||
RankVector<std::queue<sc_core::sc_time>> last4ActivatesOnRank;
|
||||
ControllerVector<Rank, unsigned> bankwiseRefreshCounter;
|
||||
sc_core::sc_time nextCommandOnRasBus = sc_core::SC_ZERO_TIME;
|
||||
sc_core::sc_time nextCommandOnCasBus = sc_core::SC_ZERO_TIME;
|
||||
};
|
||||
|
||||
} // namespace DRAMSys
|
||||
|
||||
#endif // CHECKERHBM2_H
|
||||
#endif // CHECKERHBM2_H
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2019, RPTU Kaiserslautern-Landau
|
||||
* Copyright (c) 2024, RPTU Kaiserslautern-Landau
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -29,14 +29,16 @@
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* Author: Lukas Steiner
|
||||
* Authors:
|
||||
* Lukas Steiner
|
||||
* Derek Christ
|
||||
*/
|
||||
|
||||
#ifndef CHECKERLPDDR4_H
|
||||
#define CHECKERLPDDR4_H
|
||||
|
||||
#include "DRAMSys/configuration/memspec/MemSpecLPDDR4.h"
|
||||
#include "DRAMSys/controller/checker/CheckerIF.h"
|
||||
#include "DRAMSys/configuration/memspec/MemSpecLPDDR4.h"
|
||||
|
||||
#include <queue>
|
||||
#include <vector>
|
||||
@@ -48,35 +50,20 @@ class CheckerLPDDR4 final : public CheckerIF
|
||||
{
|
||||
public:
|
||||
explicit CheckerLPDDR4(const MemSpecLPDDR4& memSpec);
|
||||
[[nodiscard]] sc_core::sc_time
|
||||
timeToSatisfyConstraints(Command command,
|
||||
const tlm::tlm_generic_payload& payload) const override;
|
||||
[[nodiscard]] sc_core::sc_time timeToSatisfyConstraints(Command command, const tlm::tlm_generic_payload& payload) const override;
|
||||
void insert(Command command, const tlm::tlm_generic_payload& payload) override;
|
||||
|
||||
private:
|
||||
const MemSpecLPDDR4& memSpec;
|
||||
|
||||
std::vector<ControllerVector<Bank, sc_core::sc_time>> lastScheduledByCommandAndBank;
|
||||
std::vector<ControllerVector<Rank, sc_core::sc_time>> lastScheduledByCommandAndRank;
|
||||
std::vector<sc_core::sc_time> lastScheduledByCommand;
|
||||
sc_core::sc_time lastCommandOnBus;
|
||||
|
||||
ControllerVector<Command, ControllerVector<Bank, uint8_t>> lastBurstLengthByCommandAndBank;
|
||||
|
||||
// Four activate window
|
||||
ControllerVector<Rank, std::queue<sc_core::sc_time>> last4Activates;
|
||||
|
||||
const sc_core::sc_time scMaxTime = sc_core::sc_max_time();
|
||||
sc_core::sc_time tBURST;
|
||||
sc_core::sc_time tRDWR;
|
||||
sc_core::sc_time tRDWR_R;
|
||||
sc_core::sc_time tWRRD;
|
||||
sc_core::sc_time tWRRD_R;
|
||||
sc_core::sc_time tRDPRE;
|
||||
sc_core::sc_time tRDAPRE;
|
||||
sc_core::sc_time tRDAACT;
|
||||
sc_core::sc_time tWRPRE;
|
||||
sc_core::sc_time tWRAPRE;
|
||||
sc_core::sc_time tWRAACT;
|
||||
sc_core::sc_time tACTPDEN;
|
||||
sc_core::sc_time tPRPDEN;
|
||||
@@ -84,8 +71,21 @@ private:
|
||||
sc_core::sc_time tWRPDEN;
|
||||
sc_core::sc_time tWRAPDEN;
|
||||
sc_core::sc_time tREFPDEN;
|
||||
template<typename T>
|
||||
using CommandArray = std::array<T, Command::END_ENUM>;
|
||||
template<typename T>
|
||||
using BankVector = ControllerVector<Bank, T>;
|
||||
template<typename T>
|
||||
using RankVector = ControllerVector<Rank, T>;
|
||||
|
||||
|
||||
CommandArray<BankVector<sc_core::sc_time>> nextCommandByBank;
|
||||
CommandArray<RankVector<sc_core::sc_time>> nextCommandByRank;
|
||||
|
||||
RankVector<std::queue<sc_core::sc_time>> last4ActivatesOnRank;
|
||||
sc_core::sc_time nextCommandOnBus = sc_core::SC_ZERO_TIME;
|
||||
};
|
||||
|
||||
} // namespace DRAMSys
|
||||
|
||||
#endif // CHECKERLPDDR4_H
|
||||
#endif // CHECKERLPDDR4_H
|
||||
Binary file not shown.
@@ -45,7 +45,7 @@
|
||||
]
|
||||
},
|
||||
"mcconfig": {
|
||||
"PagePolicy": "Closed",
|
||||
"PagePolicy": "Open",
|
||||
"Scheduler": "Fifo",
|
||||
"RequestBufferSize": 8,
|
||||
"CmdMux": "Strict",
|
||||
|
||||
Reference in New Issue
Block a user