FPGARelated.com
Forums

From whence the MAC on an Altera NIOS devel kit board?

Started by H. Peter Anvin September 21, 2004
Hi all,

I just noticed yesterday that according to the schematic there is no
configuration EEPROM for the NIC on the Altera Nios development kit
(Cyclone edition.)  Yet my board has a MAC which looks relatively
random (00:07:ed:0b:06:81).  00:07:ed is a prefix assigned to Altera.

So... where is this number stored or derived from, if there is no
EEPROM?  I'd like my own design to be compatible with the backup image
on the board, preferrably across multiple boards.

      -hpa
"H. Peter Anvin" <hpa@terminus.zytor.com> wrote in message
news:ciprog$b7n$1@terminus.zytor.com...
> Hi all, > > I just noticed yesterday that according to the schematic there is no > configuration EEPROM for the NIC on the Altera Nios development kit > (Cyclone edition.) Yet my board has a MAC which looks relatively > random (00:07:ed:0b:06:81). 00:07:ed is a prefix assigned to Altera. > > So... where is this number stored or derived from, if there is no > EEPROM? I'd like my own design to be compatible with the backup image > on the board, preferrably across multiple boards. > > -hpa
I think it's stored in Flash, and then programmed into the Ethernet chip at startup. I believe you can change the MAC address using the serial port and the terminal, the same way the IP address etc is setup. Jeroen
Followup to:  <4150a058$0$78279$e4fe514c@news.xs4all.nl>
By author:    "Jeroen" <jayjay.1974@xs4all.nl>
In newsgroup: comp.arch.fpga
> > I think it's stored in Flash, and then programmed into the Ethernet chip at > startup. I believe you can change the MAC address using the serial port and > the terminal, the same way the IP address etc is setup. >
Interesting... is it unique to each board (and if so does it mean that the flash image on the CD isn't the "real" flash image)? -hpa
>Interesting... is it unique to each board (and if so does it mean that the flash >image on the CD isn't the "real" flash image)?
I don't know about NIOS, but if you are pinching pennies (or tight for space), I think it's reasonably common to put the MAC address in a back corner of a flash or serial EPROM chip. Those chips often have sector protect schemes that help avoid bogus erasures. It can be a pain for the software/systems level. -- The suespammers.org mail server is located in California. So are all my other mailboxes. Please do not send unsolicited bulk e-mail or unsolicited commercial e-mail to my suespammers.org address or any of my other addresses. These are my opinions, not necessarily my employer's. I hate spam.
hpa@terminus.zytor.com (H. Peter Anvin) writes:

> I just noticed yesterday that according to the schematic there is no > configuration EEPROM for the NIC on the Altera Nios development kit > (Cyclone edition.) Yet my board has a MAC which looks relatively > random (00:07:ed:0b:06:81). 00:07:ed is a prefix assigned to Altera. > > So... where is this number stored or derived from, if there is no > EEPROM? I'd like my own design to be compatible with the backup image > on the board, preferrably across multiple boards.
I think it's stored in the FLASH, even though you can set it to whatever you like. The nr_plugs_initialize function has a pointer to a struct containing the MAC address. If you look at hello_plugs.c you will see something like: settings.ethernet_address.u32=0x11121314; settings.ethernet_address.l16=0x1516 + nr_timer_milliseconds(); Where one part is fixed and the other is simply a random (well, sort of) value. Petter -- A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing on usenet and in e-mail?