When you are communicating with the PC, you are sending IP packets, either TCP or UDP. Those protocols are in the Network and Transport layers.
To transmit IP packets from one system to another, you need a link that is on the Physical layer. Ethernet is the most popular today.
To implement an Ethernet link, you need 3 parts:
- the PHY chip, that contains the analog front end. It is usually outside of the FPGA on the PCB.
- the MAC, that implements the protocol. It can be either outside the FPGA or inside, as an IP. On the 3C120 kit you need to have it in the FPGA
- the driver, that takes an IP packet and adds the Ethernet header, to build an Ethernet frame ready for the MAC to transmit, or in the other direction that decodes an incoming frame to recover the IP packet.
In your case the PHY chip is already on the board. It is a Marvell 88E1111 chip. For the MAC you have two choices:
- Triple Speed Ethernet, provided by Altera
- Avalon Opencores Ethernet MAC, opensource
At last for the driver, it is easier to use a CPU. With the Nios drivers for both MACs can be found for several operating systems, including uC OS which is directly supported in the IDE.
It is the easiest solution, but the CPU will limit the actual bandwidth that you can expect from the system. You will need some optimisations to go over a few tens of Mbits/s.
If you need much more speed, you need to generate the Ethernet frames in hardware. This is what is demonstrated in the offload example. This hardware part replaces (or is placed in parallel of) the software driver, but you still need a MAC and a PHY. If you want to go in that direction, I recommend to use the Altera MAC. It is easier to interface directly with hardware, through the Avalon stream interfaces. The Opencores solution will be harder to connect to hardware due to its embedded DMA controller.
If you choose the hardware way, remember that you need to fill in the complete packet headers, including Ethernet, IP and UPD. Once you've filled in everything, you can just send the frame to the MAC and it will be transmitted.