Changes between Version 1 and Version 2 of mnc_driver
- Timestamp:
- Dec 3, 2016, 2:54:57 PM (8 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
mnc_driver
v1 v2 15 15 The data transfer unit between software and the NIC is a 4 Kbytes "container", containing an integer number of variable size packets. The max number of packets in a container is 66 packets. 16 16 The first 34 words of a container are the container header : 17 | word0 | NB_WORDS | NB_PACKETS|18 | word1 | PLEN[0] | PLEN[1]|19 | ... | ....... | ........|20 | word33 | PLEN[64] | PLEN[65]|17 || word0 || NB_WORDS || NB_PACKETS || 18 || word1 || PLEN[0] || PLEN[1] || 19 || ... || ....... || ........ || 20 || word33 || PLEN[64] || PLEN[65] || 21 21 NB_PACKETS is the actual number of packets in the container, NB_WORDS is the number of useful words in the container, PLEN[i] is the number of bytes for packet[i]. Packets are stored in the (1024 - 34) following words, and are word-aligned. 22 22 … … 38 38 39 39 === 1) void '''_mnc_init'''( ) === 40 This function allocates memory for the RX_CHBUF and TX_CHBUF , using a round-robin policy to have one CHBUF40 This function allocates memory for the RX_CHBUF and TX_CHBUF implementing the RX and TX queues for all channels. It uses a round-robin policy, to distribute one CHBUF 41 41 per cluster if the number of clusters is larger than 2 * NB_NIC_CHANNELS. It initialises both the CHBUF descriptors, 42 and the hardware NIC registers. returns the value contained in a channel register.42 and the hardware NIC registers. 43 43 44 44 === 2) unsigned int '''_mnc_writable'''( unsigned int channel, unsigned int length ) ===