Altera_Forum
Honored Contributor
9 years agoNios to Avalon signals
Hi,
My background is VHDL and I am now working with the NIOS processor. I have a Modified simple socket server design witch the IP address and MAC address are written in hard code. I would like to export these signal to the avalon world or out of QSYS so I can store a value in either FPGA registers or and external EEPROM. could some one lead me into the right direction with how this is done. My knowledge of C code is very minimal. the files I m editing are the Simple_socket_server.H and Network_utilities.C fileserror_t get_board_mac_addr(unsigned char mac_addr)
{
error_t error = 0;
alt_u32 signature;
/* This last_flash_sector region of flash is examined to see if
* valid network settings are present, indicated by a signature of 0x00005afe at
* the first address of the last flash sector. This hex value is chosen as the
* signature since it looks like the english word "SAFE", meaning that it is
* safe to use these network address values.
*/
mac_addr = 0x00;
mac_addr = 0x07;
mac_addr = 0xed;
mac_addr = 0x12;
mac_addr = 0x8f;
mac_addr = 0xff;
if (!error)
{
printf("Your Ethernet MAC address is %02x:%02x:%02x:%02x:%02x:%02x\n",
mac_addr,
mac_addr,
mac_addr,
mac_addr,
mac_addr,
mac_addr);
}
return error; #define IPADDR0 192# define IPADDR1 168# define IPADDR2 1# define IPADDR3 234
# define GWADDR0 192# define GWADDR1 168# define GWADDR2 1# define GWADDR3 1# define MSKADDR0 255# define MSKADDR1 255# define MSKADDR2 255# define MSKADDR3 0