Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions configs/user.tltest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ cmo.start = 0x00000000
cmo.end = 0x00080000
cmo.parallel.depth = 0

error.hintInaccurate = 0

[tltest.sequence]
mode.0 = FUZZ_ARI
mode.1 = FUZZ_ARI
Expand Down
2 changes: 1 addition & 1 deletion dut/OpenLLC
3 changes: 3 additions & 0 deletions main/Base/TLGlobal.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,13 @@

struct TLGlobalConfiguration {

bool errorHintInaccurate;

bool verbose;
bool verbose_xact_fired;
bool verbose_xact_sequenced;
bool verbose_xact_data_complete;
bool verbose_l2tol1hint_accuracy;
bool verbose_memory_axi_write;
bool verbose_memory_axi_read;
bool verbose_memory_data_full;
Expand Down
27 changes: 27 additions & 0 deletions main/Sequencer/TLSequencer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,9 @@ void TLSequencer::Initialize(const TLLocalConfig& cfg) noexcept
mmioAgents = new MMIOAgent* [total_c_agents];
mmioFuzzers = new MMIOFuzzer* [total_c_agents];

//
l2ToL1Hint = new L2ToL1HintPort*[total_c_agents];

//
pmem = new uint8_t [cfg.memoryEnd - cfg.memoryStart];
memoryAXI = new MemoryAXIPort*[cfg.memoryPortCount];
Expand Down Expand Up @@ -282,8 +285,11 @@ void TLSequencer::Initialize(const TLLocalConfig& cfg) noexcept
{
//
io [i] = new IOPort;
l2ToL1Hint[j * cfg.masterCountPerCoreTLC + k] = new L2ToL1HintPort;

agents [i] = new CAgent(&this->config, memories[0], globalBoard, uncachedBoard, j, i, cfg.seed, &cycles);
agents [i]->connect(io[i]);
agents [i]->connect(l2ToL1Hint[j * cfg.masterCountPerCoreTLC + k]);

fuzzers [i] = new CFuzzer(static_cast<CAgent*>(agents[i]));
fuzzers [i]->set_cycles(&cycles);
Expand Down Expand Up @@ -396,6 +402,11 @@ void TLSequencer::Initialize(const TLLocalConfig& cfg) noexcept
mmio[i]->e.valid = 0;
}

for (size_t i = 0; i < total_c_agents; i++)
{
l2ToL1Hint[i]->valid = 0;
}

for (size_t i = 0; i < cfg.memoryPortCount; i++)
{
memoryAXI[i]->aw.ready = 0;
Expand Down Expand Up @@ -481,6 +492,12 @@ void TLSequencer::Finalize() noexcept
delete mmio[i];
mmio[i] = nullptr;
}

if (l2ToL1Hint[i])
{
delete l2ToL1Hint[i];
l2ToL1Hint[i] = nullptr;
}
}

for (size_t i = 0; i < config.memoryPortCount; i++)
Expand Down Expand Up @@ -613,6 +630,16 @@ TLSequencer::MMIOPort& TLSequencer::MMIO(int deviceId) noexcept
return *(mmio[deviceId]);
}

TLSequencer::L2ToL1HintPort* TLSequencer::L2ToL1Hint() noexcept
{
return *l2ToL1Hint;
}

TLSequencer::L2ToL1HintPort& TLSequencer::L2ToL1Hint(int deviceId) noexcept
{
return *(l2ToL1Hint[deviceId]);
}

TLSequencer::MemoryAXIPort* TLSequencer::MemoryAXI() noexcept
{
return *memoryAXI;
Expand Down
6 changes: 6 additions & 0 deletions main/Sequencer/TLSequencer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ class TLSequencer {
using MMIOPort = tl_agent::Bundle<ReqField, RespField, EchoField, DATASIZE_MMIO>;
using MMIOGlobalStatus = tl_agent::MMIOGlobalStatus;

using L2ToL1HintPort = tl_agent::BundleL2ToL1Hint;

using MemoryAgent = axi_agent::MemoryAgent;
using MemoryAXIPort = axi_agent::Bundle<BEATSIZE_MEMORY>;

Expand Down Expand Up @@ -86,6 +88,7 @@ class TLSequencer {

IOPort** io;
MMIOPort** mmio;
L2ToL1HintPort** l2ToL1Hint;
MemoryAXIPort** memoryAXI;

uint64_t cycles;
Expand Down Expand Up @@ -116,6 +119,9 @@ class TLSequencer {
MMIOPort* MMIO() noexcept;
MMIOPort& MMIO(int deviceId) noexcept;

L2ToL1HintPort* L2ToL1Hint() noexcept;
L2ToL1HintPort& L2ToL1Hint(int deviceId) noexcept;

MemoryAXIPort* MemoryAXI() noexcept;
MemoryAXIPort& MemoryAXI(int deviceId) noexcept;
};
Expand Down
5 changes: 5 additions & 0 deletions main/System/TLSystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,13 @@ void TLInitialize(TLSequencer** tltest, PluginManager** plugins, std::function<v

tlcfgInit(tlcfg);

glbl.cfg.errorHintInaccurate = false;

glbl.cfg.verbose = false;
glbl.cfg.verbose_xact_fired = false;
glbl.cfg.verbose_xact_sequenced = false;
glbl.cfg.verbose_xact_data_complete = false;
glbl.cfg.verbose_l2tol1hint_accuracy= true;
glbl.cfg.verbose_memory_axi_write = false;
glbl.cfg.verbose_memory_axi_read = false;
glbl.cfg.verbose_data_full = false;
Expand Down Expand Up @@ -164,6 +167,8 @@ void TLInitialize(TLSequencer** tltest, PluginManager** plugins, std::function<v
INI_OVERRIDE_INT("tltest.config", "cmo.end", tlcfg.cmoEnd);
INI_OVERRIDE_INT("tltest.config", "cmo.parallel.depth", tlcfg.cmoParallelDepth);

INI_OVERRIDE_INT("tltest.config", "error.hintInaccurate", glbl.cfg.errorHintInaccurate);

INI_OVERRIDE_INT("tltest.fuzzer", "seed", tlcfg.seed);
INI_OVERRIDE_INT("tltest.fuzzer", "ari.interval", tlcfg.fuzzARIInterval);
INI_OVERRIDE_INT("tltest.fuzzer", "ari.target", tlcfg.fuzzARITarget);
Expand Down
3 changes: 3 additions & 0 deletions main/TLAgent/BaseAgent.h
Original file line number Diff line number Diff line change
Expand Up @@ -200,12 +200,14 @@ namespace tl_agent {
class BaseAgent : public TLLocalContext {
public:
using tlport_t = Bundle<ReqField, RespField, EchoField, BeatSize>;
using l1hintport_t = BundleL2ToL1Hint;

protected:
TLLocalConfig* cfg;
const int core;
const int id;
tlport_t* port;
l1hintport_t* l2ToL1HintPort;
GlobalBoard<paddr_t>* globalBoard;
UncachedBoard<paddr_t>* uncachedBoards;
MemoryBackend* mem;
Expand Down Expand Up @@ -246,6 +248,7 @@ namespace tl_agent {
virtual ~BaseAgent() = default;

inline void connect(tlport_t* p){ this->port = p; }
inline void connect(l1hintport_t* p) { this->l2ToL1HintPort = p; }

inline uint64_t rand64() noexcept { return rand(); }
};
Expand Down
16 changes: 16 additions & 0 deletions main/TLAgent/Bundle.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,15 @@ namespace tl_agent {
}
};

class ValidBundle {
public:
uint8_t valid;

bool fire() const {
return valid;
}
};

//
template<class Usr, class Echo, std::size_t N>
class BundleChannelA : public DecoupledBundle {
Expand Down Expand Up @@ -123,6 +132,13 @@ namespace tl_agent {
BundleCMOReq req;
BundleCMOResp resp;
};

//
class BundleL2ToL1Hint : public ValidBundle {
public:
uint32_t sourceId;
uint8_t isKeyword;
};
}

#endif //TLC_TEST_BUNDLE_H
Loading