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

Subversion Repositories or1k

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /
    from Rev 840 to Rev 841
    Reverse comparison

Rev 840 → Rev 841

/trunk/or1ksim/peripheral/eth.c
354,18 → 354,17
break;
}
eth->rx.packet_length = nread;
eth->rx.bytes_left = nread;
eth->rx.bytes_read = 0;
debug (3, "RX - entering state WRITEFIFO\n");
eth->rx.state = ETH_RXSTATE_WRITEFIFO;
break;
}
 
eth->rx.packet_length = nread;
eth->rx.bytes_left = nread;
eth->rx.bytes_read = 0;
 
debug (3, "RX - entering state WRITEFIFO\n");
eth->rx.state = ETH_RXSTATE_WRITEFIFO;
break;
break;
case ETH_RXSTATE_WRITEFIFO:
#if 1
send_word = ((unsigned long)eth->rx_buff[eth->rx.bytes_read] << 24) |
475,10 → 474,8
if (!config.nethernets)
return;
if ( first_time ) {
if ( first_time )
memset( eths, 0, sizeof(eths) );
first_time = 0;
}
for ( i = 0; i < MAX_ETHERNETS; ++ i ) {
struct eth_device *eth = &(eths[i]);
485,8 → 482,14
eth->eth_number = i;
eth_reset_controller( eth );
if ( eth->baseaddr && first_time )
register_memoryarea( eth->baseaddr, ETH_ADDR_SPACE, 4, eth_read32, eth_write32 );
}
 
if ( first_time )
first_time = 0;
}
 
/* ========================================================================= */
 
 
594,9 → 597,6
memset( &(eth->tx), 0, sizeof(eth->tx) );
memset( &(eth->rx), 0, sizeof(eth->rx) );
eth->rx.bd_index = eth->regs.tx_bd_num;
/* Register memory range */
register_memoryarea( eth->baseaddr, ETH_ADDR_SPACE, 4, eth_read32, eth_write32 );
}
}
/* ========================================================================= */
718,7 → 718,7
}
switch( addr ) {
case ETH_MODER: eth->regs.moder = value; return;
case ETH_MODER: eth->regs.moder = value; if (TEST_FLAG(value, ETH_MODER, RST)) eth_reset(); return;
case ETH_INT_SOURCE: eth->regs.int_source &= ~value; return;
case ETH_INT_MASK: eth->regs.int_mask = value; return;
case ETH_IPGT: eth->regs.ipgt = value; return;

powered by: WebSVN 2.1.0

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