Line 81... |
Line 81... |
m_core->o_ddr_addr,
|
m_core->o_ddr_addr,
|
m_core->o_ddr_ba,
|
m_core->o_ddr_ba,
|
m_core->o_ddr_data);
|
m_core->o_ddr_data);
|
|
|
bool writeout = (!m_core->v__DOT__reset_override);
|
bool writeout = (!m_core->v__DOT__reset_override);
|
|
writeout = true;
|
|
|
if (writeout) {
|
if (writeout) {
|
int cmd;
|
int cmd;
|
cmd = (m_core->o_ddr_reset_n?0:32)
|
cmd = (m_core->o_ddr_reset_n?0:32)
|
|(m_core->o_ddr_cke?0:16)
|
|(m_core->o_ddr_cke?0:16)
|
Line 120... |
Line 121... |
(m_core->o_ddr_ba),
|
(m_core->o_ddr_ba),
|
(m_core->o_ddr_addr),
|
(m_core->o_ddr_addr),
|
(m_core->i_ddr_data),
|
(m_core->i_ddr_data),
|
(m_core->o_ddr_data));
|
(m_core->o_ddr_data));
|
|
|
/*
|
printf(" FIFO[%x,%x](%d,%d,%08x-%08x-%08x)",
|
// Reset logic
|
m_core->v__DOT__bus_fifo_head,
|
printf(" RST(%06x%s[%d] - %08x->%08x)",
|
m_core->v__DOT__bus_fifo_tail,
|
m_core->v__DOT__reset_timer,
|
m_core->v__DOT__bus_fifo_new[m_core->v__DOT__bus_fifo_tail],
|
(m_core->v__DOT__reset_ztimer)?"Z":" ",
|
m_core->v__DOT__bus_fifo_sub[m_core->v__DOT__bus_fifo_tail],
|
(m_core->v__DOT__reset_address),
|
m_core->v__DOT__r_data,
|
(m_core->v__DOT__reset_instruction),
|
m_core->v__DOT__bus_fifo_data[(m_core->v__DOT__bus_fifo_head-1)&15],
|
(m_core->v__DOT__reset_cmd));
|
m_core->v__DOT__bus_fifo_data[m_core->v__DOT__bus_fifo_tail]);
|
*/
|
|
|
printf(" BUS[%03x/%03x/%03x/%d]",
|
|
(m_core->v__DOT__bus_active),
|
|
(m_core->v__DOT__bus_read),
|
|
(m_core->v__DOT__bus_new),
|
|
(m_core->v__DOT__bus_subaddr[8]));
|
|
|
|
// Reset logic
|
|
printf(" RST(%06x%s[%d] - %08x->%08x)",
|
|
m_core->v__DOT__reset_timer,
|
|
(m_core->v__DOT__reset_ztimer)?"Z":" ",
|
|
(m_core->v__DOT__reset_address),
|
|
(m_core->v__DOT__reset_instruction),
|
|
(m_core->v__DOT__reset_cmd));
|
|
|
printf(" %s%03x[%d]%04x:%d",
|
printf(" %s%03x[%d]%04x:%d",
|
(m_core->v__DOT__r_pending)?"R":" ",
|
(m_core->v__DOT__r_pending)?"R":" ",
|
(m_core->v__DOT__r_row),
|
(m_core->v__DOT__r_row),
|
(m_core->v__DOT__r_bank),
|
(m_core->v__DOT__r_bank),
|
(m_core->v__DOT__r_col),0);
|
(m_core->v__DOT__r_col),0);
|
// (m_core->v__DOT__r_sub));
|
// (m_core->v__DOT__r_sub));
|
printf(" %s%s%s",
|
printf(" %s%s%s",
|
(m_core->v__DOT__all_banks_closed)?"b":"B",
|
"B",
|
|
// (m_core->v__DOT__all_banks_closed)?"b":"B",
|
(m_core->v__DOT__need_close_bank)?"C":"N",
|
(m_core->v__DOT__need_close_bank)?"C":"N",
|
//:(m_core->v__DOT__maybe_close_next_bank)?"c":"N",
|
//:(m_core->v__DOT__maybe_close_next_bank)?"c":"N",
|
(m_core->v__DOT__need_open_bank)?"O":"K");
|
(m_core->v__DOT__need_open_bank)?"O":"K");
|
// :(m_core->v__DOT__maybe_open_next_bank)?"o":"K");
|
// :(m_core->v__DOT__maybe_open_next_bank)?"o":"K");
|
for(int i=0; i<8; i++) {
|
for(int i=0; i<8; i++) {
|
printf("%s%x@%05x%s",
|
printf("%s%x@%x%s",
|
(m_core->v__DOT__r_bank==i)?"R":"[",
|
(m_core->v__DOT__r_bank==i)?"R":"[",
|
m_core->v__DOT__bank_status[i],
|
m_core->v__DOT__bank_status[i],
|
m_core->v__DOT__bank_address[i],
|
m_core->v__DOT__bank_address[i],
|
(m_core->v__DOT__r_nxt_bank==i)?"N":"]");
|
(m_core->v__DOT__r_nxt_bank==i)?"N":"]");
|
}
|
}
|
|
|
|
|
extern int gbl_state, gbl_counts;
|
extern int gbl_state, gbl_counts;
|
printf(" %2d:%08x ", gbl_state, gbl_counts);
|
printf(" %2d:%08x ", gbl_state, gbl_counts);
|
|
|
printf(" %s%s%s%s%s:%08x:%08x",
|
printf(" %s%s%s%s%s%s%s:%08x:%08x",
|
(m_core->v__DOT__reset_override)?"R":" ",
|
(m_core->v__DOT__reset_override)?"R":" ",
|
(m_core->v__DOT__need_refresh)?"N":" ",
|
(m_core->v__DOT__need_refresh)?"N":" ",
|
(m_core->v__DOT__need_close_bank)?"C":" ",
|
(m_core->v__DOT__need_close_bank)?"C":" ",
|
(m_core->v__DOT__need_open_bank)?"O":" ",
|
(m_core->v__DOT__need_open_bank)?"O":" ",
|
(m_core->v__DOT__valid_bank)?"V":" ",
|
(m_core->v__DOT__valid_bank)?"V":" ",
|
|
(m_core->v__DOT__r_move)?"R":" ",
|
|
(m_core->v__DOT__m_move)?"M":" ",
|
m_core->v__DOT__activate_bank_cmd,
|
m_core->v__DOT__activate_bank_cmd,
|
m_core->v__DOT__cmd);
|
m_core->v__DOT__cmd);
|
|
|
printf(" F%05x:%d%d%d:%d:%08x",
|
printf(" F%s%05x:%x/%s",
|
m_core->v__DOT__refresh_clk,
|
(m_core->v__DOT__refresh_ztimer)?"Z":" ",
|
m_core->v__DOT__need_refresh,
|
m_core->v__DOT__refresh_counter,
|
m_core->v__DOT__midrefresh,
|
m_core->v__DOT__refresh_addr,
|
m_core->v__DOT__endrefresh,
|
(m_core->v__DOT__need_refresh)?"N":" ");
|
m_core->v__DOT__midrefresh_hctr,
|
|
m_core->v__DOT__midrefresh_lctr);
|
|
|
|
if (m_core->v__DOT__reset_override)
|
if (m_core->v__DOT__reset_override)
|
printf(" OVERRIDE");
|
printf(" OVERRIDE");
|
//if(m_core->v__DOT__last_open_bank)printf(" LST-OPEN");
|
//if(m_core->v__DOT__last_open_bank)printf(" LST-OPEN");
|
switch(cmd) {
|
switch(cmd) {
|
Line 411... |
Line 426... |
unsigned mlen = (1<<(LGMEMSIZE-2));
|
unsigned mlen = (1<<(LGMEMSIZE-2));
|
|
|
printf("Giving the core 140k cycles to start up\n");
|
printf("Giving the core 140k cycles to start up\n");
|
// Before testing, let's give the unit time enough to warm up
|
// Before testing, let's give the unit time enough to warm up
|
tb->reset();
|
tb->reset();
|
for(int i=0; i<140850; i++)
|
for(int i=0; i<141195; i++)
|
tb->wb_tick();
|
tb->wb_tick();
|
|
|
printf("Getting some memory ...\n");
|
printf("Getting some memory ...\n");
|
rdbuf = new unsigned[mlen];
|
rdbuf = new unsigned[mlen];
|
mbuf = new unsigned[mlen]; // Match buffer
|
mbuf = new unsigned[mlen]; // Match buffer
|