OpenCores
URL https://opencores.org/ocsvn/wbddr3/wbddr3/trunk

Subversion Repositories wbddr3

[/] [wbddr3/] [trunk/] [bench/] [cpp/] [ddrsdram_tb.cpp] - Diff between revs 12 and 13

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 12 Rev 13
Line 127... Line 127...
                                m_core->v__DOT__bus_fifo_tail,
                                m_core->v__DOT__bus_fifo_tail,
                                (m_core->v__DOT__bus_fifo_new[m_core->v__DOT__bus_fifo_tail])?"N":"o",
                                (m_core->v__DOT__bus_fifo_new[m_core->v__DOT__bus_fifo_tail])?"N":"o",
                                m_core->v__DOT__bus_fifo_sub[m_core->v__DOT__bus_fifo_tail],
                                m_core->v__DOT__bus_fifo_sub[m_core->v__DOT__bus_fifo_tail],
                                m_core->v__DOT__bus_fifo_data[m_core->v__DOT__bus_fifo_tail]);
                                m_core->v__DOT__bus_fifo_data[m_core->v__DOT__bus_fifo_tail]);
 
 
                        printf(" BUS[%03x/%03x/%03x/%d]",
                        printf(" BUS[A%03x/R%03x/N%03x/K%03x/%d]",
                                (m_core->v__DOT__bus_active),
                                (m_core->v__DOT__bus_active),
                                (m_core->v__DOT__bus_read),
                                (m_core->v__DOT__bus_read),
                                (m_core->v__DOT__bus_new),
                                (m_core->v__DOT__bus_new),
 
                                (m_core->v__DOT__bus_ack),
                                (m_core->v__DOT__bus_subaddr[8]));
                                (m_core->v__DOT__bus_subaddr[8]));
 
 
                        /*
                        /*
                        // Reset logic
                        // Reset logic
                        printf(" RST(%06x%s[%d] - %08x->%08x)",
                        printf(" RST(%06x%s[%d] - %08x->%08x)",
Line 495... Line 496...
        {
        {
                unsigned v, a;
                unsigned v, a;
                for(int i=0; i<8; i++) {
                for(int i=0; i<8; i++) {
                        a = 1109 + i*1024;
                        a = 1109 + i*1024;
                        tb->wb_write(a, rdbuf[a]);
                        tb->wb_write(a, rdbuf[a]);
 
                        if ((v=tb->wb_read(a)) != rdbuf[a]) {
 
                                printf("CASE-1, %08x -> MEM[%08x] -> %08x FAILED (R/W not equal)\n", rdbuf[a], a, v);
 
                                goto test_failure;
 
                        }
 
                }
 
        }
 
 
 
        // Same thing, but writing all first before reading
 
        {
 
                unsigned v, a;
 
                for(int i=0; i<8; i++) {
 
                        a = 1109 + i*1024;
 
                        tb->wb_write(a, rdbuf[a]);
                        if ((v=tb->wb_read(a)) != rdbuf[a]) {
                        if ((v=tb->wb_read(a)) != rdbuf[a]) {
                                printf("CASE-1, %08x -> MEM[%08x] -> %08x FAILED (R/W not equal)\n", rdbuf[a], a, v);
                                printf("CASE-1, %08x -> MEM[%08x] -> %08x FAILED (R/W not equal)\n", rdbuf[a], a, v);
                                goto test_failure;
                                goto test_failure;
                        }
                        }
                }
                }

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.