Commit 6fc605be authored by Wesley W. Terpstra's avatar Wesley W. Terpstra

Return to 62.5MHz; packet loss was the filter not the frequency.

Update Etherbone config space with correct IP address.
parent 469df055
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
/* Board-specific parameters */ /* Board-specific parameters */
/* WR Core system/CPU clock frequency in Hz */ /* WR Core system/CPU clock frequency in Hz */
#define CPU_CLOCK 125000000ULL #define CPU_CLOCK 62500000ULL
/* WR Reference clock period (picoseconds) and frequency (Hz) */ /* WR Reference clock period (picoseconds) and frequency (Hz) */
#define REF_CLOCK_PERIOD_PS 8000 #define REF_CLOCK_PERIOD_PS 8000
......
...@@ -124,7 +124,10 @@ int send_bootp(uint8_t* buf, int retry) { ...@@ -124,7 +124,10 @@ int send_bootp(uint8_t* buf, int retry) {
int process_bootp(uint8_t* buf, int len) int process_bootp(uint8_t* buf, int len)
{ {
volatile unsigned int *eb_ip = (unsigned int*)0x20718;
unsigned int ip;
uint8_t mac[6]; uint8_t mac[6];
get_mac_addr(mac); get_mac_addr(mac);
if (len != BOOTP_END) return 0; if (len != BOOTP_END) return 0;
...@@ -139,5 +142,13 @@ int process_bootp(uint8_t* buf, int len) ...@@ -139,5 +142,13 @@ int process_bootp(uint8_t* buf, int len)
mprintf("Discovered IP address!\n"); mprintf("Discovered IP address!\n");
memcpy(myIP, buf+BOOTP_YIADDR, 4); memcpy(myIP, buf+BOOTP_YIADDR, 4);
ip =
(buf[BOOTP_YIADDR+0] << 24) |
(buf[BOOTP_YIADDR+1] << 16) |
(buf[BOOTP_YIADDR+2] << 8) |
(buf[BOOTP_YIADDR+3]);
while (*eb_ip != ip) *eb_ip = ip;
return 1; return 1;
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment