Changeset 295 for soft/giet_vm/giet_drivers/nic_driver.h
- Timestamp:
- Mar 26, 2014, 6:44:44 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
soft/giet_vm/giet_drivers/nic_driver.h
r258 r295 8 8 #ifndef _GIET_NIC_DRIVERS_H_ 9 9 #define _GIET_NIC_DRIVERS_H_ 10 11 /////////////////////////////////////////////////////////////////////////////////// 12 // NIC Registers (vci_multi_nic) 13 /////////////////////////////////////////////////////////////////////////////////// 14 15 enum SoclibMultiNicHyperviseurRegisters { 16 NIC_G_VIS = 0, // bitfield : bit N = 0 -> channel N disabled 17 NIC_G_ON = 1, // boolean : NIC component activated 18 NIC_G_NB_CHAN = 2, // Number of channels present in this NIC (read only) 19 NIC_G_BC_ENABLE = 3, // boolean : Enable Broadcast if non zero 20 NIC_G_TDM_ENABLE = 4, // boolean : TDM Scheduler if non zero 21 NIC_G_TDM_PERIOD = 5, // TDM time slot value 22 NIC_G_BYPASS_ENABLE = 6, // boolean : Enable bypass for TX packets 23 // alignment 24 NIC_G_MAC_4 = 8, // channel mac address 32 LSB bits array[8] 25 NIC_G_MAC_2 = 16, // channel mac address 16 MSB bits array[8] 26 // alignment 27 NIC_G_NPKT_RX_G2S_RECEIVED = 32, // number of packets received on GMII RX port 28 NIC_G_NPKT_RX_G2S_DISCARDED = 33, // number of RX packets discarded by RX_G2S FSM 29 30 NIC_G_NPKT_RX_DES_SUCCESS = 34, // number of RX packets transmited by RX_DES FSM 31 NIC_G_NPKT_RX_DES_TOO_SMALL = 35, // number of discarded too small RX packets (<60B) 32 NIC_G_NPKT_RX_DES_TOO_BIG = 36, // number of discarded too big RX packets (>1514B) 33 NIC_G_NPKT_RX_DES_MFIFO_FULL = 37, // number of discarded RX packets because fifo full 34 NIC_G_NPKT_RX_DES_CRC_FAIL = 38, // number of discarded RX packets because CRC32 failure 35 36 NIC_G_NPKT_RX_DISPATCH_RECEIVED = 39, // number of packets received by RX_DISPATCH FSM 37 NIC_G_NPKT_RX_DISPATCH_BROADCAST = 40, // number of broadcast RX packets received 38 NIC_G_NPKT_RX_DISPATCH_DST_FAIL = 41, // number of discarded RX packets for DST MAC not found 39 NIC_G_NPKT_RX_DISPATCH_CH_FULL = 42, // number of discarded RX packets for channel full 40 41 NIC_G_NPKT_TX_DISPATCH_RECEIVED = 43, // number of packets received by TX_DISPATCH FSM 42 NIC_G_NPKT_TX_DISPATCH_TOO_SMALL = 44, // number of discarded too small TX packets (<60B) 43 NIC_G_NPKT_TX_DISPATCH_TOO_BIG = 45, // number of discarded too big TX packets (>1514B) 44 NIC_G_NPKT_TX_DISPATCH_SRC_FAIL = 46, // number of discarded TX packets for SRC MAC failed 45 NIC_G_NPKT_TX_DISPATCH_BROADCAST = 47, // number of broadcast TX packets received 46 NIC_G_NPKT_TX_DISPATCH_BYPASS = 48, // number of bypassed TX->RX packets 47 NIC_G_NPKT_TX_DISPATCH_TRANSMIT = 49, // number of transmit TX packets 48 49 NIC_CHANNEL_SPAN = 0x2000, 50 }; 51 52 ///////////////////////////////////////////////////////////////////// 53 // A container descriptor has the following form: 54 // LOW WORD : Container LSB base address 55 // HIGH WORD: Container status (leftmost bit), '1' means full 56 // Base address MSB extension, if needed (right aligned) 57 ////////////////////////////////////////////////////////////////////// 58 enum SoclibMultiNicChannelRegisters 59 { 60 NIC_RX_DESC_LO_0 = 0, // RX_0 descriptor low word (Read/Write) 61 NIC_RX_DESC_HI_0 = 1, // RX_0 descriptor high word (Read/Write) 62 NIC_RX_DESC_LO_1 = 2, // RX_1 descriptor low word (Read/Write) 63 NIC_RX_DESC_HI_1 = 3, // RX_1 descriptor high word (Read/Write) 64 NIC_TX_DESC_LO_0 = 4, // TX_0 descriptor low word (Read/Write) 65 NIC_TX_DESC_HI_0 = 5, // TX_0 descriptor high word (Read/Write) 66 NIC_TX_DESC_LO_1 = 6, // TX_1 descriptor low word (Read/Write) 67 NIC_TX_DESC_HI_1 = 7, // TX_1 descriptor high word (Read/Write) 68 NIC_MAC_4 = 8, // channel mac address 32 LSB bits (Read Only) 69 NIC_MAC_2 = 9, // channel mac address 16 LSB bits (Read Only) 70 NIC_RX_RUN = 10, // RX packets can be received (write_only) 71 NIC_TX_RUN = 11, // TX packets can be transmitted (write_only) 72 }; 10 73 11 74 /////////////////////////////////////////////////////////////////////////////////// … … 23 86 extern unsigned int _nic_cma_stop(); 24 87 88 extern void _nic_rx_isr( unsigned int irq_type, 89 unsigned int irq_id, 90 unsigned int channel ); 91 92 extern void _nic_tx_isr( unsigned int irq_type, 93 unsigned int irq_id, 94 unsigned int channel ); 95 25 96 /////////////////////////////////////////////////////////////////////////////////// 26 97
Note: See TracChangeset
for help on using the changeset viewer.