= GIET-VM / NIC Driver = [[PageOutline]] The [source:soft/giet_vm/giet_drivers/nic_driver.c nic_driver.c] and [source:soft/giet_vm/giet_drivers/nic_driver.h nic_driver.h] files define the NIC driver. This component is a multi-channels, giga-bit Ethernet network controller. It is an ''external'', non replicated peripheral. * The ''_nic_sync_write()'' and ''_nic_sync_read()'' functions use a ''memcpy'' strategy to transfer a flow of packets between a chained buffer in kernel space and the NIC internal chained buffer. They are blocking until completion of the transfer. * The ''_nic_cma_start()'' and ''_nic_cma_stop()'' functions use the ''vci_chbuf_dma'' component to transfer a flow of packets between a chained buffer in kernel space and the NIC internal chained buffer. They are non blocking. In this case, one NIC channel and two CMA channels must be allocated to the task in the mapping_info data structure. The SEG_NIC_BASE address must be defined in the hard_config.h file. The addressable registers map is defined [source:soft/giet_vm/giet_drivers/nic_driver.h here]. WARNING : All these functions are not completely specified yet. === unsigned int '''_nic_sync_write'''( ) === To be defined... === unsigned int '''_nic_sync_read'''( ) === To be defined... === unsigned int '''_nic_cma_start'''( ) === To be defined... === unsigned int '''_nic_cma_stop'''( ) === To be defined... === void '''_nic_rx_isr'''( unsigned int irq_type, unsigned int irq_id, unsigned int channel ) === This interrupt Service Routine handles IRQs from a NIC_RX channel. === void '''_nic_tx_isr'''( unsigned int irq_type, unsigned int irq_id, unsigned int channel ) === This interrupt Service Routine handles IRQs from a NIC_TX channel.