Ethernet Products
Determine ramifications of Intel® Ethernet products and technologies
4866 Discussions

DE2-115 generate serial number from ethernet MAC address (NIOS II)

Altera_Forum
Honored Contributor II
1,413 Views

What I'm trying to achieve is a serial number that does not get wiped when the DE2-115 is re-programmed or powered off. 

 

The on-board SDRAM and SRAM require a voltage, so the serial wouldn't persist after a power down, and the flash is used for the NIOS system so I can't use that (unless someone knows how to partition off a byte or two that wouldn't get overwritten when flashing the NIOS???). 

 

What I was wondering was: is there a way to read the mac address from one of the two marvell 88e1111 ethernet phy chips? This could then be used to generate a unique serial number within the NIOS. 

 

The ethernet connections are completely unused and unimplemented in the design, and if possible I don't really want to implement a whole ethernet interface just to get a MAC address. 

 

Is this possible? Or is there an easier way to achieve a persistent serial number on a DE2-115?
0 Kudos
3 Replies
Altera_Forum
Honored Contributor II
654 Views

 

--- Quote Start ---  

What I'm trying to achieve is a serial number that does not get wiped when the DE2-115 is re-programmed or powered off. 

 

--- Quote End ---  

 

There's multiple ways to save a serial number unique to a particular board. 

 

1. Use a generic on your top-level HDL. 

 

Pro: Simple. Con: You need to re-synthesize the design to provide unique serial numbers to each board. 

 

2. Use the configuration flash. 

 

Pro: Can be written after the board is configured. Con: Your design needs a flash controller (which is not too hard, just add one via a Qsys component). 

 

3. Use the I2C EEPROM. 

 

Pro: Can be written after the board is configured. Con: Your design needs an I2C controller (which is not too hard, the AlteraWiki has an OpenCores version). 

 

I wouldn't be surprised if the I2C EEPROM is intended for MAC storage. If that is the case, then you already have a unique serial number; the MAC. 

 

4. If you want to uniquely identify a board, and you are not using the switches, just set them to a unique value on each board. 

 

I use this to uniquely identify a master/slave setup for different hardware - mainly as confirmation that I have downloaded the correct image to the correct board. 

 

Cheers, 

Dave
0 Kudos
Altera_Forum
Honored Contributor II
654 Views

Thanks Dave for these suggestions. I'd completely overlooked the switches - so simple! If this ends up being insufficient (people changing them by accident!) then I'll look into the EEPROM or config flash. 

 

Cheers, 

James
0 Kudos
Altera_Forum
Honored Contributor II
654 Views

 

--- Quote Start ---  

I'd completely overlooked the switches - so simple! 

--- Quote End ---  

 

I'm glad the solution was such an easy one :) 

 

I've used a similar solution in hardware. With BGA devices you often cannot route to pins near the center of the device, but you can place 0402 resistors across pins in that location, so I place a few 0402 resistors over pairs of pins. Those resistors can be loaded (or not) to indicate board revision or board type (for two similar, but slightly different, board loads). 

 

Cheers, 

Dave
0 Kudos
Reply