现在的位置: 首页 > 综合 > 正文

Network Driver Basics about EtherCAT(关于EtherCAT的网络驱动的基础知识)

2013年02月19日 ⁄ 综合 ⁄ 共 1516字 ⁄ 字号 评论关闭

EtherCAT relies on Ethernet hardware and the master needs a physical Ethernet
device to communicate with the bus. Therefore it is necessary to understand how
Linux handles network devices and their drivers, respectively.

不仅EtherCAT依赖于网络的硬件,而且主站需要一个物理的网络设备以用来和总线相通信。

所以,我们有必要认识linux是怎么样处理相应的网络设备和它们的驱动。

 

Tasks of a Network Driver Network device drivers usually handle the lower two
layers of the OSI model, that is the physical layer and the data-link layer. A network
device itself natively handles the physical layer issues: It represents the hardware to
connect to the medium and to send and receive data in the way, the physical layer
protocol describes. The network device driver is responsible for getting data from the

kernel's networking stack and forwarding it to the hardware, that does the physical
transmission. If data is received by the hardware respectively, the driver is notified
(usually by means of interrupt) and has to read the data from the hardware memory
and forward it to the network stack. There are a few more tasks, a network device
driver has to handle, including queue control, statistics and device dependent features.

网络驱动或者网络设备的驱动任务常常处在于osi模型的最后两层,也就是物理层和数据链路层。

一个网络设备自己本身处理物理层的数据;它作为设备用来连接媒体,以用来发送和接受数据,

以物理层协议描述的那样,一个网络设备的驱动是用来接受来自内核的网络协议数据,并将它通

过物理上的传送送到相应的硬件。如果数据是通过硬件自己单独得接受,那么驱动就常常以中断

的形式被激活,而且它必须是在硬件内存里面读取数据,并把它传送到网络协议上去。进一步的

一些任务,网络驱动必须执行的,包括,队列控制,统计,和设备单独的形式。

注:(这里面有个关键词:usually by means of interrupt)很多工业以太网都有提供这种机制。

上次跟诺信的项目就是这种情况,上位机是Dsp6000系列,做了一个EtherCAT的主站网卡,

为了,就通过中断的形式,通知上位机定期下来接受数据。感觉,诺信设备无论在上位机的操作

系统上面做得有点简单。据说是用到TI的Bios。

可惜,这样子坐下来的EtherCAT根本就体现不到它的on the fly技术。

这样子的EtherCAT就相当于一个完完全全的网络标准了。

这里引发了一个问题,如果是主站与主站通信的话,是不是都用不到EtherCAT的on the fly技术呢?

希望大侠能解答一下?

抱歉!评论已关闭.