--- Quote Start ---
originally posted by nir@Jan 4 2005, 04:49 PM
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 --- Quote End ---
Hi Nir,
I have few things to ask you for Opencores Ethernet Hal Driver
1) In case of ucosII is not there I think you one more file is missing that is "alt_ethernet_dev.h". This is defined in file "OpenCores_Ethernet_MAC.h"
Here is the code excerpt from file "OpenCores_Ethernet_MAC.h"
# ifndef __ucosii__
# include <stdlib.h># include <stdio.h># include "alt_types.h"# include "system.h"# include "alt_ethernet_dev.h"
.
.
.
.
2) In case of ucosII is there, I couldn't understand from dev structure is initialized. in following macro. Also how routines for initializing Ethernet Ip and Recive Data from interface are initialized if this dev structure is not initialized?
# else
# define OPENCORES_ETHERNET_MAC_INIT(name, dev)
# define OPENCORES_ETHERNET_MAC_INSTANCE(name, dev)
# endif /* __ucosii__ */