URL
https://opencores.org/ocsvn/funbase_ip_library/funbase_ip_library/trunk
Show entire file |
Details |
Blame |
View Log
Rev 145 |
Rev 183 |
Line 8... |
Line 8... |
* History:
|
* History:
|
* 7.1.2010: created
|
* 7.1.2010: created
|
*/
|
*/
|
|
|
#include "udp2hibi.h"
|
#include "udp2hibi.h"
|
#include "tut_n2h_regs.h"
|
#include "system.h"
|
#include "N2H_registers_and_macros.h"
|
|
|
|
|
|
|
|
int udp2hibi_rx_conf( int ip_addr, int dest_port, int source_port, int receiving_haddr, int udp2hibi_haddr ) {
|
int udp2hibi_rx_conf( int ip_addr, int dest_port, int source_port, int receiving_haddr, int udp2hibi_haddr ) {
|
|
|
// todo: check that ip and ports are valid
|
// todo: check that ip and ports are valid
|
|
|
// wait tx to finish
|
// wait tx to finish
|
while ( !N2H_TX_DONE( (int*)N2H_REGISTERS_BASE_ADDRESS )) {}
|
while ( !HPD_TX_DONE( (int*)N2H_REGISTERS_BASE_ADDRESS )) {}
|
|
|
// set up n2h2 to receive ack/nack sent to receiving_haddr
|
// set up n2h2 to receive ack/nack sent to receiving_haddr
|
N2H_CHAN_CONF( 0, N2H_REGISTERS_RX_BUFFER_START, receiving_haddr, 1, N2H_REGISTERS_BASE_ADDRESS);
|
N2H_CHAN_CONF( 0, N2H_REGISTERS_RX_BUFFER_START, receiving_haddr, 1, N2H_REGISTERS_BASE_ADDRESS);
|
|
|
// set n2h2 to send udp2hibi's rx_conf command to addr 0x01000000, responding to 03000000
|
// set n2h2 to send udp2hibi's rx_conf command to addr 0x01000000, responding to 03000000
|
© copyright 1999-2025
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.