2013-11-24 13:50:17 -05:00
|
|
|
#include <generated/csr.h>
|
2013-05-19 13:44:00 -04:00
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include <id.h>
|
|
|
|
|
|
|
|
void get_sysid_formatted(char *sysid)
|
|
|
|
{
|
|
|
|
sysid[0] = identifier_sysid_read() >> 8;
|
|
|
|
sysid[1] = identifier_sysid_read();
|
|
|
|
sysid[2] = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
void id_print(void)
|
|
|
|
{
|
|
|
|
char sysid[3];
|
|
|
|
|
|
|
|
get_sysid_formatted(sysid);
|
2015-09-28 08:33:37 -04:00
|
|
|
printf("Running on MiSoC (sysid:%s) at %dMHz\n", sysid, identifier_frequency_read()/1000000);
|
2013-05-19 13:44:00 -04:00
|
|
|
}
|