Changes between Version 1 and Version 2 of mnc_driver


Ignore:
Timestamp:
Dec 3, 2016, 2:54:57 PM (7 years ago)
Author:
alain
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • mnc_driver

    v1 v2  
    1515The 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.
    1616The 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]                ||
    2121NB_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.
    2222
     
    3838
    3939 === 1) void '''_mnc_init'''( ) ===
    40 This function allocates memory for the RX_CHBUF and TX_CHBUF, using a round-robin policy to have one CHBUF
     40This 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
    4141per 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.
     42and the hardware NIC registers.
    4343
    4444 === 2) unsigned int '''_mnc_writable'''( unsigned int channel,  unsigned int length ) ===