Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
21613 Discussions

OpenCores MAC

Altera_Forum
Honored Contributor II
1,996 Views

Hello! 

How the app (with Nios Software Tools) must be created to work with the open cores mac in superloop mode? do I need to use superloop_tse library? 

 

In the OCM doc says its's possible, but how?
0 Kudos
10 Replies
Altera_Forum
Honored Contributor II
1,328 Views

Running the NicheStack in superloop mode has little to do with the MAC itself. I wrote the OCM NicheStack driver to work in both superloop mode and with uC/OS-II. 

 

The NicheStack requires some modifications to run in superloop mode. See here for more info: 

http://www.nioswiki.com/user:admin/%22super_loop%22_nichestack 

http://www.nioswiki.com/exampledesigns/superloopsimplesocketserverplus 

 

Jake
0 Kudos
Altera_Forum
Honored Contributor II
1,328 Views

Does the BSP needs to be created with the option "--cmd set_driver none:none ocm \"? (I found tghis in the neek Superloop SSS sample for version 9.1) 

 

With ot without that option I0m getting the following error (when iniche was alrady compiled) running ./create-this-app: 

 

make[1]: *** No rule to make target '../bsp/drivers/inc/altera_avalon_sgdma.h', needed by 'obj/drivers/src/altera_avalon_tse.o' 

 

How should I use the ocm dirver correctly in the superloop mode?
0 Kudos
Altera_Forum
Honored Contributor II
1,328 Views

The error is confusing. Your BSP should not be compiling in the "altera_avalon_tse" driver if you are using the OpenCores MAC. Are you using someone else's BSP? I'm guessing that the Superloop SSS example used the TSE MAC instead of the OpenCores MAC. 

 

Jake
0 Kudos
Altera_Forum
Honored Contributor II
1,328 Views

no, it's my own bsp. but the bsp it' not compiling the altera_avalon_tse, it's my app. but... while compiling the bsp I can see "-DALTERA_TRIPLE_SPEED_MAC". 

So with the opencores mac i should't appende the library superloop_tse_lib to my app?
0 Kudos
Altera_Forum
Honored Contributor II
1,328 Views

The driver for the OpenCores MAC adds the "-DALTERA_TRIPLE_SPEED_MAC" macro to the compilation. The reason for this is because Altera's version of the NicheStack uses this macro to align parts of the IP packet on nice boundaries. I haven't looked at the Superloop SSS example but maybe you need to remove some TSE dependencies. 

 

Jake
0 Kudos
Altera_Forum
Honored Contributor II
1,328 Views

so how did you checked the OCM in superloop mode?

0 Kudos
Altera_Forum
Honored Contributor II
1,328 Views

I have a modified version of the NicheStack from the 7.1 days. We actually just made it a separate component so it gets compiled as part of my BSP. So I just add the "altera_iniche_sl" (the modified version) software component to my BSP when I want to use superloop. And when I want to use uC-OS/II, I use the regular "altera_iniche" component. The drivers for both the OCM and the TSE MACs are agnostic to which version I'm using. 

 

Jake
0 Kudos
Altera_Forum
Honored Contributor II
1,328 Views

Ok I get it. Well thank you so much for creating the OCM men :). Happy new year! 

Bye Bye!
0 Kudos
Altera_Forum
Honored Contributor II
1,328 Views

hello again... 

I have the 7.2 stack. Which modifications did you do on it? I've already compiled the program but it displays the message: 

prepped 0 interfaces, initialing... 

inet startup error: unable to find any networking interfaces
0 Kudos
Altera_Forum
Honored Contributor II
1,328 Views

Hello! 

The project it's working right now :). I have it working with NSBT 9.1 and the socket_server works correctly. There is something you could add to your documentation: You use the macro ALT_CPU_FREQ in the file ins_eth_ocm.c in, which must be modified to the module frequency when it's operating at a difefrent speed than the CPU. 

 

Oh and there are no so big hacks, just adding a few lines to create-this-bsp and create-this-app to make it work. I'm docuemnting this at, then will I post them. 

 

Thanks for the help! 

 

Bye!
0 Kudos
Reply