Does FPGA need CPU for processing a packet/frame

I would like to know if an FPGA needs CPU for processing a packet/ frame that it receives.

For example an FPGA is capable of processing a frame based on its destination Address (similar to layer 2 ethernet device). Does the FPGA takes help of CPU in actually moving the frame from one port to another port? Or does it do on its own.

My understanding of an FPGA is that during the start up time we need to register the FPGA with the processor. We also register the actions that we perform, interrupts. We configure the FPGA to do specific job during the FPGA initialization. After that FPGA does not use CPU for any of the internal work it has to do. It can talk to the CPU in case of exceptions, so that CPU can look at the packet and do more application level processing.

Thanks.

Reply to
NewToFPGA
Loading thread data ...

I have an FPGA for taking a packet/frame/data from one port and transfer it to a different port based on the header information (say a Layer 2 Switch). Does it involve the CPU for for processing this frame at all?

Reply to
NewToFPGA

I would like to know if an FPGA needs CPU for processing a packet/ frame that it receives.

For example an FPGA is capable of processing a frame based on its destination Address (similar to layer 2 ethernet device). Does the FPGA takes help of CPU in actually moving the frame from one port to another port? Or does it do on its own.

My understanding of an FPGA is that during the start up time we need to register the FPGA with the processor. We also register the actions that we perform, interrupts. We configure the FPGA to do specific job during the FPGA initialization. After that FPGA does not use CPU for any of the internal work it has to do. It can talk to the CPU in case of exceptions, so that CPU can look at the packet and do more application level processing.

Thanks.

Reply to
NewToFPGA

An FPGA can do what the designer dictates. If the FPGA is designed to handle packets, it will do so. The FPGA can contain a processor within itself to handle protocol stacks that are typically too complex to handle in a simple hardware state machine. If the FPGA is designed to handle the packet/frame then the external CPU isn't needed. If the FPGA is designed to have the CPU process the packet/frame then the CPU is needed.

The need to register the FPGA with the processor and the actions and interrupts thereof are application specific. The system is designed with these needs so the FPGA is designed to support them.

If you're designing an FPGA limited to layer-2 processing, you probably don't need to design an internal or external CPU control for your needs. The buffers and address processing can all be internal to the FPGA.

Reply to
John_H

No, but it is common that some CPU collects packet data and statistics for presentation to some user interface.

If the CPU were fast enough to to handle the line rate, I wouldn't need an FPGA in the first place. If I need an FPGA, I probably need it for all of the packet processing.

The CPU clock and the line clock are usually different. I write a design entity for each clock domain with explicit synchronization between the entities using handshaking, fifos, sampling etc.

That sounds reasonable.

-- Mike Treseler

Reply to
Mike Treseler

You can implement a general purpose CPU inside an FPGA, therefore you can do anything inside an FPGA that a CPU can do.

For packet inspection implementing a general purpose CPU inside an FPGA might be a good way to go, or it might not. I don't know. (Someone once said: "special purpose hardware is always better than general purpose hardware except for general cases ;-)

Kolja

Reply to
comp.arch.fpga

Does Operating System need to provide an FPGA a device driver?

If no application needs the additional services from an FPGA, all we do is initialize and start an FPGA... right? Anything else that need to be done?

Reply to
NewToFPGA

Does Operating System need to provide an FPGA a device driver?

If no application needs the additional services from an FPGA, all we do is initialize and start an FPGA... right? Anything else that need to be done?

Reply to
NewToFPGA

Does Operating System need to provide an FPGA a device driver?

If no application needs the additional services from an FPGA, all we do is initialize and start an FPGA... right? Anything else that need to be done?

Reply to
NewToFPGA

You are persistent with your questions, aren't you?

In applications where you want to define the functionality of an FPGA that doesn't need any other interaction with the central CPU, you don't even NEED a CPU to program and run the FPGA. External configuration memories can be used. It's often convenient in a processor-based system to update the FPGA from system memory but the programming interface (often implemented through GPIO) has no FPGA requirements beyond programming.

The FPGA itself has plenty that needs to be done. If you're doing an ethernet packet switch, the FPGA should be tolerant to the ethernet cable being removed and reinserted, for instance, which might put reset requirements on a Digital Clock Manager (DCM) block as a for-instance.

Are you going to be responsible for the FPGA design? Is your duty restricted to the system software/hardware side?

- John_H

Reply to
John_H

Thanks for ur response. I never worked with FPGAs before. I always worked on the layers above the Device Drivers. Now I am getting chance to work with the hardware. I will be configuring the FPGAs and dealing with the exception handling, etc. Just want to brush up on these topics. I have been reading some general documents. Thought of clarifying my questions with experienced people here.

Reply to
NewToFPGA

Let me ask back: Does a graphics card require a device driver? No, it does not. It's the operating system that requires a devices driver to provide abstracted graphics card features to other programs.

It's the same for FPGAs. If you want to provide FPGA based services to user space programs you need a device driver in most operating systems. In other operating systems you just read or write memory mapped registers directly from user space. If the FPGA is operating stand alone or is only used in kernel space there is no device driver required.

Kolja Sulimma

Reply to
comp.arch.fpga

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.