Added DDR3 time dependencies code manually.

This commit is contained in:
Iron Prando da Silva
2021-12-10 11:07:21 +01:00
parent 527f7fb492
commit da46440f2f

View File

@@ -59,22 +59,206 @@ DependencyMap DDR3TimeDependencies::mSpecializedGetDependencies() const {
std::forward_as_tuple("ACT"),
std::forward_as_tuple(
std::initializer_list<TimeDependency>{
TimeDependency{tRC, "ACT", DependencyType::IntraBank, "tRC"},
TimeDependency{tAL + tRTP + tRP, "RDA", DependencyType::IntraBank, "tAL + tRTP + tRP"},
TimeDependency{tWRPRE + tRP, "WRA", DependencyType::IntraBank, "tWRPRE + tRP"},
TimeDependency{tRP, "PRE", DependencyType::IntraBank, "tRP"},
TimeDependency{tRRD, "ACT", DependencyType::IntraRank, "tRRD"},
TimeDependency{tRP, "PREA", DependencyType::IntraRank, "tRP"},
TimeDependency{tXP, "PDXA", DependencyType::IntraRank, "tXP"},
TimeDependency{tXP, "PDXP", DependencyType::IntraRank, "tXP"},
TimeDependency{tRFC, "REFA", DependencyType::IntraRank, "tRFC"},
TimeDependency{tXS, "SREFEX", DependencyType::IntraRank, "tXS"},
TimeDependency{tNAW, "NAW", DependencyType::IntraRank, "tNAW"}
{tRC, "ACT", DependencyType::IntraBank, "tRC"},
{tAL + tRTP + tRP, "RDA", DependencyType::IntraBank, "tAL + tRTP + tRP"},
{tWRPRE + tRP, "WRA", DependencyType::IntraBank, "tWRPRE + tRP"},
{tRP, "PREPB", DependencyType::IntraBank, "tRP"},
{tRRD, "ACT", DependencyType::IntraRank, "tRRD"},
{tRP, "PREAB", DependencyType::IntraRank, "tRP"},
{tXP, "PDXA", DependencyType::IntraRank, "tXP"},
{tXP, "PDXP", DependencyType::IntraRank, "tXP"},
{tRFC, "REFAB", DependencyType::IntraRank, "tRFC"},
{tXS, "SREFEX", DependencyType::IntraRank, "tXS"},
{tNAW, "NAW", DependencyType::IntraRank, "tNAW"}
}
)
);
// TODO add all the rest
dmap.emplace(
std::piecewise_construct,
std::forward_as_tuple("RD"),
std::forward_as_tuple(
std::initializer_list<TimeDependency>{
{tRCD - tAL, "ACT", DependencyType::IntraBank, "tRCD - tAL"},
{tCCD, "RD", DependencyType::IntraRank, "tCCD"},
{tCCD, "RDA", DependencyType::IntraRank, "tCCD"},
{tWRRD, "WR", DependencyType::IntraRank, "tWRRD"},
{tWRRD, "WRA", DependencyType::IntraRank, "tWRRD"},
{tXP, "PDXA", DependencyType::IntraRank, "tXP"},
{tXSDLL, "SREFEX", DependencyType::IntraRank, "tXSDLL"},
{tBURST + tRTRS, "RD", DependencyType::InterRank, "tBURST + tRTRS"},
{tBURST + tRTRS, "RDA", DependencyType::InterRank, "tBURST + tRTRS"},
{tWRRD_R, "WR", DependencyType::InterRank, "tWRRD_R"},
{tWRRD_R, "WRA", DependencyType::InterRank, "tWRRD_R"}
}
)
);
dmap.emplace(
std::piecewise_construct,
std::forward_as_tuple("RDA"),
std::forward_as_tuple(
std::initializer_list<TimeDependency>{
{tRCD - tAL, "ACT", DependencyType::IntraBank, "tRCD - tAL"},
{tWRPRE - tRTP, "WR", DependencyType::IntraBank, "tWRPRE - tRTP"},
{tCCD, "RD", DependencyType::IntraRank, "tCCD"},
{tCCD, "RDA", DependencyType::IntraRank, "tCCD"},
{tWRRD, "WR", DependencyType::IntraRank, "tWRRD"},
{tWRRD, "WRA", DependencyType::IntraRank, "tWRRD"},
{tXP, "PDXA", DependencyType::IntraRank, "tXP"},
{tXSDLL, "SREFEX", DependencyType::IntraRank, "tXSDLL"},
{tBURST + tRTRS, "RD", DependencyType::InterRank, "tBURST + tRTRS"},
{tBURST + tRTRS, "RDA", DependencyType::InterRank, "tBURST + tRTRS"},
{tWRRD_R, "WR", DependencyType::InterRank, "tWRRD_R"},
{tWRRD_R, "WRA", DependencyType::InterRank, "tWRRD_R"}
}
)
);
dmap.emplace(
std::piecewise_construct,
std::forward_as_tuple("WR"),
std::forward_as_tuple(
std::initializer_list<TimeDependency>{
{tRCD - tAL, "ACT", DependencyType::IntraBank, "tRCD - tAL"},
{tRDWR, "RD", DependencyType::IntraRank, "tRDWR"},
{tRDWR, "RDA", DependencyType::IntraRank, "tRDWR"},
{tCCD, "WR", DependencyType::IntraRank, "tCCD"},
{tCCD, "WRA", DependencyType::IntraRank, "tCCD"},
{tXP, "PDXA", DependencyType::IntraRank, "tXP"},
{tXSDLL, "SREFEX", DependencyType::IntraRank, "tXSDLL"},
{tRDWR_R, "RD", DependencyType::InterRank, "tRDWR_R"},
{tRDWR_R, "RDA", DependencyType::InterRank, "tRDWR_R"},
{tBURST + tRTRS, "WR", DependencyType::InterRank, "tBURST + tRTRS"},
{tBURST + tRTRS, "WRA", DependencyType::InterRank, "tBURST + tRTRS"}
}
)
);
dmap.emplace(
std::piecewise_construct,
std::forward_as_tuple("PREPB"),
std::forward_as_tuple(
std::initializer_list<TimeDependency>{
{tRAS, "ACT", DependencyType::IntraBank, "tRAS"},
{tAL + tRTP, "RD", DependencyType::IntraBank, "tAL + tRTP"},
{tWRPRE, "WR", DependencyType::IntraBank, "tWRPRE"},
{tXP, "PDXA", DependencyType::IntraRank, "tXP"}
}
)
);
dmap.emplace(
std::piecewise_construct,
std::forward_as_tuple("PREAB"),
std::forward_as_tuple(
std::initializer_list<TimeDependency>{
{tRAS, "ACT", DependencyType::IntraRank, "tRAS"},
{tAL + tRTP, "RD", DependencyType::IntraRank, "tAL + tRTP"},
{tAL + tRTP, "RDA", DependencyType::IntraRank, "tAL + tRTP"},
{tWRPRE, "WR", DependencyType::IntraRank, "tWRPRE"},
{tWRPRE, "WRA", DependencyType::IntraRank, "tWRPRE"},
{tXP, "PDXA", DependencyType::IntraRank, "tXP"}
}
)
);
dmap.emplace(
std::piecewise_construct,
std::forward_as_tuple("REFAB"),
std::forward_as_tuple(
std::initializer_list<TimeDependency>{
{tRC, "ACT", DependencyType::IntraRank, "tRC"},
{tAL + tRTP + tRP, "RDA", DependencyType::IntraRank, "tAL + tRTP + tRP"},
{tWRPRE + tRP, "WRA", DependencyType::IntraRank, "tWRPRE + tRP"},
{tRP, "PREPB", DependencyType::IntraRank, "tRP"},
{tRP, "PREAB", DependencyType::IntraRank, "tRP"},
{tXP, "PDXP", DependencyType::IntraRank, "tXP"},
{tRFC, "REFAB", DependencyType::IntraRank, "tRFC"},
{tXS, "SREFEX", DependencyType::IntraRank, "tXS"}
}
)
);
dmap.emplace(
std::piecewise_construct,
std::forward_as_tuple("REFAB"),
std::forward_as_tuple(
std::initializer_list<TimeDependency>{
{tACTPDEN, "ACT", DependencyType::IntraRank, "tACTPDEN"},
{tRDPDEN, "RD", DependencyType::IntraRank, "tRDPDEN"},
{tRDPDEN, "RDA", DependencyType::IntraRank, "tRDPDEN"},
{tWRPDEN, "WR", DependencyType::IntraRank, "tWRPDEN"},
{tWRAPDEN, "WRA", DependencyType::IntraRank, "tWRAPDEN"},
{tPRPDEN, "PREPB", DependencyType::IntraRank, "tPRPDEN"},
{tCKE, "PDXA", DependencyType::IntraRank, "tCKE"}
}
)
);
dmap.emplace(
std::piecewise_construct,
std::forward_as_tuple("PDXA"),
std::forward_as_tuple(
std::initializer_list<TimeDependency>{
{tPD, "PDEA", DependencyType::IntraRank, "tPD"}
}
)
);
dmap.emplace(
std::piecewise_construct,
std::forward_as_tuple("PDEP"),
std::forward_as_tuple(
std::initializer_list<TimeDependency>{
{tRDPDEN, "RD", DependencyType::IntraRank, "tRDPDEN"},
{tRDPDEN, "RDA", DependencyType::IntraRank, "tRDPDEN"},
{tWRAPDEN, "WRA", DependencyType::IntraRank, "tWRAPDEN"},
{tPRPDEN, "PREPB", DependencyType::IntraRank, "tPRPDEN"},
{tPRPDEN, "PREAB", DependencyType::IntraRank, "tPRPDEN"},
{tCKE, "PDXP", DependencyType::IntraRank, "tCKE"},
{tREFPDEN, "REFAB", DependencyType::IntraRank, "tREFPDEN"},
{tXS, "SREFEX", DependencyType::IntraRank, "tXS"}
}
)
);
dmap.emplace(
std::piecewise_construct,
std::forward_as_tuple("PDXP"),
std::forward_as_tuple(
std::initializer_list<TimeDependency>{
{tPD, "PDEP", DependencyType::IntraRank, "tPD"}
}
)
);
dmap.emplace(
std::piecewise_construct,
std::forward_as_tuple("SREFEN"),
std::forward_as_tuple(
std::initializer_list<TimeDependency>{
{tRC, "ACT", DependencyType::IntraRank, "tRC"},
{std::max({tRDPDEN, tAL + tRTP + tRP}), "RDA", DependencyType::IntraRank, "max(tRDPDEN, tAL + tRTP + tRP)"},
{std::max({tWRAPDEN, tWRPRE + tRP}), "WRA", DependencyType::IntraRank, "max(tWRAPDEN, tWRPRE + tRP)"},
{tRP, "PREPB", DependencyType::IntraRank, "tRP"},
{tRP, "PREAB", DependencyType::IntraRank, "tRP"},
{tXP, "PDXP", DependencyType::IntraRank, "tXP"},
{tRFC, "REFAB", DependencyType::IntraRank, "tRFC"},
{tXS, "SREFEX", DependencyType::IntraRank, "tXS"}
}
)
);
dmap.emplace(
std::piecewise_construct,
std::forward_as_tuple("SREFEX"),
std::forward_as_tuple(
std::initializer_list<TimeDependency>{
{tCKESR, "SREFEN", DependencyType::IntraRank, "tCKESR"}
}
)
);
return dmap;
}
}