URL
https://opencores.org/ocsvn/xulalx25soc/xulalx25soc/trunk
Subversion Repositories xulalx25soc
Compare Revisions
- This comparison shows the changes necessary to convert path
/xulalx25soc/trunk/bench/cpp
- from Rev 95 to Rev 96
- ↔ Reverse comparison
Rev 95 → Rev 96
/busmaster_tb.cpp
84,6 → 84,8
|
void setsdcard(const char *fn) { |
m_sdcard.load(fn); |
|
printf("LOADING SDCARD FROM: \'%s\'\n", fn); |
} |
|
void tick(void) { |
156,11 → 158,13
&&(m_core->v__DOT__wb_cyc)) |
writeout = true; |
|
/* |
writeout = (writeout)||(m_core->i_rx_stb) |
||((m_core->o_tx_stb)&&(!m_core->i_tx_busy)); |
writeout = (writeout)||(m_core->v__DOT____Vcellinp__genbus____pinNumber9); |
writeout = (writeout)||(m_core->v__DOT__wb_stb); |
writeout = (writeout)||(m_core->v__DOT__wb_err); |
*/ |
|
if ((writeout)||(m_last_writeout)) { |
printf("%08lx:", m_tickcount); |
193,7 → 197,6
(m_core->v__DOT____Vcellinp__genbus____pinNumber10)?'s':' ', |
(m_core->v__DOT__wb_err)?'E':'.'); |
|
/* |
printf(" RUNWB %d@0x%08x %3x %3x %d %d/%d %d:%09lx", |
m_core->v__DOT__genbus__DOT__runwb__DOT__wb_state, |
m_core->v__DOT__wbu_addr, |
204,7 → 207,6
m_core->v__DOT__genbus__DOT__runwb__DOT__zero_acks, |
m_core->v__DOT__genbus__DOT__exec_stb, |
m_core->v__DOT__genbus__DOT__exec_word); |
*/ |
|
/* |
printf("%c[%d%d%d%d,%d:%04x%c]@%06x(%d) ->%06x%c", |
247,7 → 249,7
*/ |
|
/* |
printf("%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%2x %s%s %2d %2d", |
printf("%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%2x %s%s %2d %2d", |
// (m_core->v__DOT__zippy__DOT__dbg_ack)?"A":"-", |
// (m_core->v__DOT__zippy__DOT__dbg_stall)?"S":"-", |
// (m_core->v__DOT__zippy__DOT__sys_dbg_cyc)?"D":"-", |
262,6 → 264,8
(m_core->v__DOT__zippy__DOT__thecpu__DOT__dcd_ce)?"d":"-", |
(m_core->v__DOT__zippy__DOT__thecpu__DOT__opvalid)?"O":"-", |
(m_core->v__DOT__zippy__DOT__thecpu__DOT__op_ce)?"k":"-", |
(m_core->v__DOT__zippy__DOT__thecpu__DOT__opvalid_alu)?"A":"-", |
(m_core->v__DOT__zippy__DOT__thecpu__DOT__alu_ce)?"a":"-", |
(m_core->v__DOT__zippy__DOT__thecpu__DOT__opvalid_mem)?"M":"-", |
(m_core->v__DOT__zippy__DOT__thecpu__DOT__mem_ce)?"m":"-", |
(m_core->v__DOT__zippy__DOT__thecpu__DOT__new_pc)?"N":"-", |
280,15 → 284,22
(m_core->v__DOT__zippy__DOT__thecpu__DOT__instruction_decoder__DOT__genblk3__DOT__r_early_branch)?"EB":" ", |
m_core->v__DOT__zippy__DOT__thecpu__DOT__instruction_decoder__DOT__genblk3__DOT__r_branch_pc |
); |
|
printf(" %s[%02x]=%08x(%08x)", |
m_core->v__DOT__zippy__DOT__thecpu__DOT__wr_reg_ce?"WR":"--", |
m_core->v__DOT__zippy__DOT__thecpu__DOT__wr_reg_id, |
m_core->v__DOT__zippy__DOT__thecpu__DOT__wr_gpreg_vl, |
m_core->v__DOT__zippy__DOT__thecpu__DOT__wr_spreg_vl); |
*/ |
|
|
/* |
printf("SDSPI[%d,%d(%d),(%d)] ", |
/* |
printf(" SDSPI[%d,%d(%d),(%d)]", |
m_core->v__DOT__sdcard_controller__DOT__r_cmd_busy, |
m_core->v__DOT__sdcard_controller__DOT__r_sdspi_clk, |
m_core->v__DOT__sdcard_controller__DOT__r_cmd_state, |
m_core->v__DOT__sdcard_controller__DOT__r_rsp_state); |
printf("LL[%d,%2x->CK=%d/%2x,%s,ST=%2d,TX=%2x,RX=%2x->%d,%2x] ", |
printf(" LL[%d,%2x->CK=%d/%2x,%s,ST=%2d,TX=%2x,RX=%2x->%d,%2x] ", |
m_core->v__DOT__sdcard_controller__DOT__ll_cmd_stb, |
m_core->v__DOT__sdcard_controller__DOT__ll_cmd_dat, |
m_core->v__DOT__sdcard_controller__DOT__lowlevel__DOT__r_z_counter, |
301,7 → 312,7
m_core->v__DOT__sdcard_controller__DOT__ll_out_stb, |
m_core->v__DOT__sdcard_controller__DOT__ll_out_dat |
); |
printf(" CRC=%02x/%d", |
printf(" CRC=%02x/%2d", |
m_core->v__DOT__sdcard_controller__DOT__r_cmd_crc, |
m_core->v__DOT__sdcard_controller__DOT__r_cmd_crc_cnt); |
printf(" SPI(%d,%d,%d/%d,%d)->?", |
309,21 → 320,27
m_core->o_sd_cs_n, |
m_core->o_spi_sck, m_core->v__DOT__sdcard_sck, |
m_core->o_spi_mosi); |
*/ |
|
/* |
printf(" CK=%d,LN=%d", |
m_core->v__DOT__sdcard_controller__DOT__r_sdspi_clk, |
m_core->v__DOT__sdcard_controller__DOT__r_lgblklen); |
*/ |
|
/* |
|
if (m_core->v__DOT__sdcard_controller__DOT__r_use_fifo){ |
printf(" FIFO"); |
if (m_core->v__DOT__sdcard_controller__DOT__r_fifo_wr) |
printf("-WR"); |
printf("-WR(%04x,%d,%d,%d)", |
m_core->v__DOT__sdcard_controller__DOT__fifo_rd_crc_reg, |
m_core->v__DOT__sdcard_controller__DOT__fifo_rd_crc_stb, |
m_core->v__DOT__sdcard_controller__DOT__ll_fifo_pkt_state, |
m_core->v__DOT__sdcard_controller__DOT__r_have_data_response_token); |
else |
printf("-RD"); |
printf("-RD(%04x,%d,%d,%d)", |
m_core->v__DOT__sdcard_controller__DOT__fifo_wr_crc_reg, |
m_core->v__DOT__sdcard_controller__DOT__fifo_wr_crc_stb, |
m_core->v__DOT__sdcard_controller__DOT__ll_fifo_wr_state, |
m_core->v__DOT__sdcard_controller__DOT__ll_fifo_wr_complete |
); |
} |
|
if (m_core->v__DOT__sdcard_controller__DOT__ll_fifo_rd) |
332,9 → 349,12
printf(" LL-WR"); |
if (m_core->v__DOT__sdcard_controller__DOT__r_have_start_token) |
printf(" START-TOK"); |
printf(" %3d", m_core->v__DOT__sdcard_controller__DOT__ll_fifo_addr); |
*/ |
printf(" %3d/%02x", |
m_core->v__DOT__sdcard_controller__DOT__ll_fifo_addr, |
m_core->v__DOT__sdcard_controller__DOT__fifo_byte&0x0ff); |
*/ |
|
|
/* |
printf(" DMAC[%d]: %08x/%08x/%08x(%03x) -- (%d,%d,%c)%c%c:@%08x-[%4d,%4d/%4d,%4d-#%4d]%08x", |
m_core->v__DOT__zippy__DOT__dma_controller__DOT__dma_state, |
387,7 → 407,10
// signal(SIGINT, busmaster_kill); |
|
tb->reset(); |
tb->setsdcard("/dev/zero"); |
if (argc > 1) |
tb->setsdcard(argv[1]); |
else |
tb->setsdcard("/dev/zero"); |
|
while(1) |
tb->tick(); |