Fixed obdly
This commit is contained in:
@@ -38,7 +38,6 @@ namespace ams::ldr::oc::pcv::mariko {
|
|||||||
void CalculateMiscTimings() {
|
void CalculateMiscTimings() {
|
||||||
tW2P = 0x2d;
|
tW2P = 0x2d;
|
||||||
rdv = 0x39 + C.mem_burst_read_latency;
|
rdv = 0x39 + C.mem_burst_read_latency;
|
||||||
obdly = 0x10000002 + C.mem_burst_write_latency;
|
|
||||||
einput_duration = 0x1C;
|
einput_duration = 0x1C;
|
||||||
quse_width = 0x8;
|
quse_width = 0x8;
|
||||||
|
|
||||||
@@ -48,7 +47,6 @@ namespace ams::ldr::oc::pcv::mariko {
|
|||||||
rdv += e.rdv_inc;
|
rdv += e.rdv_inc;
|
||||||
if (e.einput) einput_duration = e.einput;
|
if (e.einput) einput_duration = e.einput;
|
||||||
if (e.quse_width) quse_width = e.quse_width;
|
if (e.quse_width) quse_width = e.quse_width;
|
||||||
obdly += e.obdly_delta;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -69,6 +67,14 @@ namespace ams::ldr::oc::pcv::mariko {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CalculateObdly() {
|
||||||
|
obdly = 0x10000002 + C.mem_burst_write_latency;
|
||||||
|
|
||||||
|
if (auto patch = FindObdlyPatch()) {
|
||||||
|
obdly += patch->adjust;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void CalculateTWTPDEN() {
|
void CalculateTWTPDEN() {
|
||||||
tWTPDEN = tW2P + 1 + CEIL(tDQSS_max / tCK_avg) + CEIL(tDQS2DQ_max / tCK_avg) + 6;
|
tWTPDEN = tW2P + 1 + CEIL(tDQSS_max / tCK_avg) + CEIL(tDQS2DQ_max / tCK_avg) + 6;
|
||||||
if (C.marikoEmcMaxClock >= 2'233'000 && C.marikoEmcMaxClock < 2'533'000) tWTPDEN++;
|
if (C.marikoEmcMaxClock >= 2'233'000 && C.marikoEmcMaxClock < 2'533'000) tWTPDEN++;
|
||||||
@@ -165,6 +171,7 @@ namespace ams::ldr::oc::pcv::mariko {
|
|||||||
void CalculateTimings() {
|
void CalculateTimings() {
|
||||||
CalculateMiscTimings();
|
CalculateMiscTimings();
|
||||||
CalculateIbdly();
|
CalculateIbdly();
|
||||||
|
CalculateObdly();
|
||||||
CalculateTWTPDEN();
|
CalculateTWTPDEN();
|
||||||
CalculateTR2W();
|
CalculateTR2W();
|
||||||
CalculateTW2R();
|
CalculateTW2R();
|
||||||
|
|||||||
@@ -146,6 +146,37 @@ namespace ams::ldr::oc::pcv::mariko {
|
|||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const AdjustPatch g_obdly_patches[] = {
|
||||||
|
{2'533'000, -2},
|
||||||
|
{2'566'000, -2},
|
||||||
|
{2'600'000, -2},
|
||||||
|
{2'633'000, -2},
|
||||||
|
{2'666'000, -2},
|
||||||
|
{2'700'000, -2},
|
||||||
|
{2'733'000, -2},
|
||||||
|
{2'766'000, -2},
|
||||||
|
{2'800'000, -2},
|
||||||
|
{2'833'000, -4},
|
||||||
|
{2'866'000, -2},
|
||||||
|
{2'900'000, -4},
|
||||||
|
{2'933'000, -2},
|
||||||
|
{2'966'000, -2},
|
||||||
|
{3'000'000, -2},
|
||||||
|
{3'033'000, -2},
|
||||||
|
{3'066'000, -2},
|
||||||
|
{3'100'000, -4},
|
||||||
|
{3'133'000, -4},
|
||||||
|
};
|
||||||
|
|
||||||
|
const u32 g_obdly_table_size = sizeof(g_obdly_patches) / sizeof(g_obdly_patches[0]);
|
||||||
|
|
||||||
|
const AdjustPatch *FindObdlyPatch() {
|
||||||
|
for (u32 i = 0; i < g_obdly_table_size; i++)
|
||||||
|
if (g_obdly_patches[i].freq == C.marikoEmcMaxClock)
|
||||||
|
return &g_obdly_patches[i];
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
const AdjustPatch g_tr2w_patches[] = {
|
const AdjustPatch g_tr2w_patches[] = {
|
||||||
{2'500'000, 1},
|
{2'500'000, 1},
|
||||||
{2'533'000, 1},
|
{2'533'000, 1},
|
||||||
|
|||||||
@@ -41,6 +41,10 @@ namespace ams::ldr::oc::pcv::mariko {
|
|||||||
extern const u32 g_ibdly_table_size;
|
extern const u32 g_ibdly_table_size;
|
||||||
const AdjustPatch *FindIbdlyPatch();
|
const AdjustPatch *FindIbdlyPatch();
|
||||||
|
|
||||||
|
extern const AdjustPatch g_obdly_patches[];
|
||||||
|
extern const u32 g_obdly_table_size;
|
||||||
|
const AdjustPatch *FindObdlyPatch();
|
||||||
|
|
||||||
extern const AdjustPatch g_tr2w_patches[];
|
extern const AdjustPatch g_tr2w_patches[];
|
||||||
extern const u32 g_tr2w_table_size;
|
extern const u32 g_tr2w_table_size;
|
||||||
const AdjustPatch *FindTR2WPatch();
|
const AdjustPatch *FindTR2WPatch();
|
||||||
|
|||||||
Reference in New Issue
Block a user