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

Subversion Repositories or1k

[/] [or1k/] [branches/] [stable_0_2_x/] [or1ksim/] [peripheral/] [ethernet_i.h] - Diff between revs 418 and 695

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

Rev 418 Rev 695
Line 79... Line 79...
 
 
 
 
/*
/*
 * Implementatino of Ethernet MAC Registers and State
 * Implementatino of Ethernet MAC Registers and State
 */
 */
 
#define ETH_TXSTATE_IDLE        0
 
#define ETH_TXSTATE_WAIT4BD     10
 
#define ETH_TXSTATE_READFIFO    20
 
#define ETH_TXSTATE_TRANSMIT    30
 
 
 
#define ETH_RXSTATE_IDLE        0
 
#define ETH_RXSTATE_WAIT4BD     10
 
#define ETH_RXSTATE_RECV        20
 
#define ETH_RXSTATE_WRITEFIFO   30
struct eth_device
struct eth_device
{
{
  /* Base address in memory */
  /* Base address in memory */
  unsigned long baseaddr;
  unsigned long baseaddr;
 
 
Line 104... Line 113...
        off_t loopback_offset;
        off_t loopback_offset;
 
 
        /* Current TX state */
        /* Current TX state */
        struct
        struct
        {
        {
 
            unsigned long state;
                unsigned long bd_index;
                unsigned long bd_index;
                unsigned long bd;
                unsigned long bd;
 
            unsigned long bd_addr;
                unsigned working, waiting_for_dma, error;
                unsigned working, waiting_for_dma, error;
                unsigned packet_length;
                unsigned packet_length;
                unsigned minimum_length, maximum_length;
                unsigned minimum_length, maximum_length;
                unsigned add_crc;
                unsigned add_crc;
                unsigned long crc_value;
                unsigned long crc_value;
Line 117... Line 128...
        } tx;
        } tx;
 
 
        /* Current RX state */
        /* Current RX state */
        struct
        struct
        {
        {
 
            unsigned long state;
                unsigned long bd_index;
                unsigned long bd_index;
                unsigned long bd;
                unsigned long bd;
                int fd;
                int fd;
                off_t *offset;
                off_t *offset;
                unsigned working, error, waiting_for_dma;
                unsigned working, error, waiting_for_dma;
Line 148... Line 160...
    unsigned long miistatus;
    unsigned long miistatus;
 
 
                /* Buffer descriptors */
                /* Buffer descriptors */
                unsigned long bd_ram[ETH_BD_SPACE / 4];
                unsigned long bd_ram[ETH_BD_SPACE / 4];
  } regs;
  } regs;
 
 
 
    unsigned long rx_buff[0x10000];
 
    unsigned long tx_buff[0x10000];
 
    unsigned long lo_buff[0x10000];
};
};
 
 
 
 
 
 
 
 

powered by: WebSVN 2.1.0

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