Do you have a question? Post it now! No Registration Necessary
- Jesse Kempa
August 5, 2003, 12:04 am

Hi Simon,
A colleague and I tried this with the following results: With the
older CS8900 card (10-base, used in the original Nios Ethernet Kit),
everything worked without errors. However, in the newer daughter card
(LAN91C111) we saw the same behavior.
This is really due to how we reset the two chips. With the original
Ethernet Kit, we would boot the MAC into "promiscuous mode" to receive
all packets, whether they were intended for our Nios board or not.
Primarily for reasons of efficiency (fewer interrupts, less CPU
overhead), we disabled promiscuous mode during bootup in the LAN91C111
driver. For applications such as nedk_bridge (where we just blindly
pass packets between the two Ethernet MACs), this causes some of the
packets to be igored, leading to the behavior you saw.
To get around this, call "set promiscuous" routine that is built into
our low-level MAC driver (lan91c111.c). Here is the modification to
nedk_bridge.c:
int main(void)
{
int result;
globals g; // How polite we are, the globals aren't really
global!
int i;
// Snip: code to reset each Ethernet MAC & do error check
// Set promiscuous "on" for "lan91c111_0"
nr_lan91c111_set_promiscuous(na_lan91c111_0,0,1);
// Set promiscuous "on" for "lan91c111_1"
nr_lan91c111_set_promiscuous(na_lan91c111_1,0,1);
// Rest of the code un-changed....
...
}
Good luck with your project.
Jesse Kempa
Altera Corp.
jkempa at altera dot com

<snip>

A colleague and I tried this with the following results: With the
older CS8900 card (10-base, used in the original Nios Ethernet Kit),
everything worked without errors. However, in the newer daughter card
(LAN91C111) we saw the same behavior.
This is really due to how we reset the two chips. With the original
Ethernet Kit, we would boot the MAC into "promiscuous mode" to receive
all packets, whether they were intended for our Nios board or not.
Primarily for reasons of efficiency (fewer interrupts, less CPU
overhead), we disabled promiscuous mode during bootup in the LAN91C111
driver. For applications such as nedk_bridge (where we just blindly
pass packets between the two Ethernet MACs), this causes some of the
packets to be igored, leading to the behavior you saw.
To get around this, call "set promiscuous" routine that is built into
our low-level MAC driver (lan91c111.c). Here is the modification to
nedk_bridge.c:
int main(void)
{
int result;
globals g; // How polite we are, the globals aren't really
global!
int i;
// Snip: code to reset each Ethernet MAC & do error check
// Set promiscuous "on" for "lan91c111_0"
nr_lan91c111_set_promiscuous(na_lan91c111_0,0,1);
// Set promiscuous "on" for "lan91c111_1"
nr_lan91c111_set_promiscuous(na_lan91c111_1,0,1);
// Rest of the code un-changed....
...
}
Good luck with your project.
Jesse Kempa
Altera Corp.
jkempa at altera dot com

<snip>

Site Timeline
- » Multiple device configuration using local update over ethernet
- — Next thread in » Field-Programmable Gate Arrays
-
- » Patent granted for "system on a chip" framework?
- — Previous thread in » Field-Programmable Gate Arrays
-
- » Communist Chinese Military Companies
- — Newest thread in » Field-Programmable Gate Arrays
-
- » Gowin - This Just Got Real
- — Last Updated thread in » Field-Programmable Gate Arrays
-
- » La folie des mesures ?
- — The site's Newest Thread. Posted in » Electronics (French)
-