Nios® II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
Intel Support hours are Monday-Fridays, 8am-5pm PST, except Holidays. Thanks to our community members who provide support during our down time or before we get to your questions. We appreciate you!

Need Forum Guidance? Click here
Search our FPGA Knowledge Articles here.
12453 Discussions

NicheStack MAC Drivers Question

Honored Contributor II

I was wondering if anyone could give me a couple of pointers on how to get NicheStack to interface to a non-standard TSE MAC architecture. 


I've got a custom board with an external PHY controller and a C-IV device. I've developed a Qsys system which uses the Altera TSE MAC to interface to the PHY device; however I've used dedicated tightly coupled RAM blocks as the memory from which the SGDMA controllers read/write to. I know that this all works as I've implemented a custom IPv4 UDP (with ARP) protocol which allows me to send a receive UDP packets to a socket application on a PC. However I'd like to use NicheStack for the final application but I can't find much literature on how the stack interfaces with the MAC drivers (chapter 11 of the s/w developer's handbook has been particularly useless on this occasion....).  


Am I correct in assuming that the 'standard' NicheStack examples will not work with my design? If so I assume that I can simply modify the TSE drivers which the reference design requires? Or failing that is there any literature on the function calls which NicheStack requires so that I can write my own drivers? 


Thanks in advance
0 Kudos
2 Replies
Honored Contributor II

I think you'll find some answers in this document: 

There is a chapter called "Using Faster Packet Memory" starting on the bottom of page 9 that explains how to change the functions used by the NicheStack to allocate memory for the packet data. You don't need to change the driver itself, just some macros in ipport.h. Be careful though, as (at least in the old IDE) Eclipse sometimes re-generates ipport.h on top of your modified file, so keep a backup somewhere, just in case. 

The example project they talk about can be downloaded here:
Honored Contributor II

Brilliant! Thanks very much, that's exactly what I was looking for. I knew there would be an answer out there somewhere!