Forum Discussion

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

Opencores MAC 10/100 Driver

Hi Everyone

Please feel free to use these files and/or comment on them. I've written them as a driver for the opencores mac solution. I have been using them with the lwip web server example that comes with the nios II installation and they seems to work.

I've attached a zip file with three files in it:

OpenCores_Ethernet_MAC_regs.h - contains the definitions of the registers inside the opencores MAC component.

OpenCores_Ethernet_MAC.c and the matching h file is the actual driver.

I've used these files in conjuction with files that come with the Nios installation, which I can't post here for obvious reasons. What I did was to make a copy of the altera_avalon_lan91c111 directory, name it accordingly and replace the file in the HAL\inc and HAL\src as well as the regs file in the inc directory with the file I've attached. I hope this helps someone.

Nir

24 Replies

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

    Hi everyone,

    I'm using a Cyclone board with an Opencores MAC 10/100 IP ver. 2.0 and a National DP8847 PHY.

    I wrote the application using nir's driver, but when I run it the driver stucks when accessing the MAC MODE register: the sthio instruction does not return.

    Any idea about what could be wrong with my design ?

    Thanks a lot
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hi nir,

    I use Mtx Cyclone Dev.Board, and the OpenCores MAC 10/100 Core can be used on board.

    But I do not know clearly how to implement the simple_socket_server project by using the Mac and your driver under Nios II IDE.

    Can you give me some detailed information or guide?

    Thank you very much.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hi everyone

    Somebody braught to my attention that the zip file I've posted does not contain an STE100P.h file that one of the source files include. Initially It actually didn't include this file, since I used the STE100P phy chip in my project, but you can use different chips to do the same job. However, since there is no prevention for me to post this file as well, here is an ammended zip file with the STE100P.h file in it.

    Sorry for that

    Nir