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

Subversion Repositories openarty

[/] [openarty/] [trunk/] [sw/] [host/] [manping.cpp] - Diff between revs 30 and 33

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

Rev 30 Rev 33
Line 385... Line 385...
 
 
                // Load the packet into the hardware buffer
                // Load the packet into the hardware buffer
                m_fpga->writei(R_NET_TXBUF, ln, packet);
                m_fpga->writei(R_NET_TXBUF, ln, packet);
 
 
                // And give it the transmit command.
                // And give it the transmit command.
                m_fpga->writeio(R_NET_TXCMD, TXGO|(ln<<2)|((config_hw_crc)?0:NOHWCRC));
                { unsigned cmd;
 
                cmd = TXGO|(ln<<2)|((config_hw_crc)?0:NOHWCRC);
 
                m_fpga->writeio(R_NET_TXCMD, cmd);
 
                printf("Sent TX command: 0x%x\n", cmd);
 
                }
 
 
        } else {
        } else {
                int     ln;
                int     ln;
 
 
                ln = (config_hw_crc)?11:12;
                ln = (config_hw_crc)?11:12;
Line 422... Line 426...
                        buf = new unsigned[rxlen];
                        buf = new unsigned[rxlen];
                        m_fpga->readi(R_NET_RXBUF, rxlen, buf);
                        m_fpga->readi(R_NET_RXBUF, rxlen, buf);
                        for(int i=0; i<rxlen; i++)
                        for(int i=0; i<rxlen; i++)
                                printf("\tRX[%2d]: 0x%08x\n", i, buf[i]);
                                printf("\tRX[%2d]: 0x%08x\n", i, buf[i]);
                        delete[] buf;
                        delete[] buf;
                        m_fpga->writeio(R_NET_RXCMD, 0xffffff);
                        // m_fpga->writeio(R_NET_RXCMD, 0xffffff);
                        break;
                        break;
                }
                }
        } while(((rxstat & 0x04000)==0)&&(errcount++ < 50));
        } while(((rxstat & 0x04000)==0)&&(errcount++ < 500));
 
 
        rxstat = m_fpga->readio(R_NET_RXCMD);
        rxstat = m_fpga->readio(R_NET_RXCMD);
        printf("Final Rx Status = %08x\n", rxstat);
        printf("Final Rx Status = %08x\n", rxstat);
 
 
 
 

powered by: WebSVN 2.1.0

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