Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
16 years ago

OpenCores MAC

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?

10 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    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?
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    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
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    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?
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    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
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    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
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

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

    Bye Bye!
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    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
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    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!