URL
https://opencores.org/ocsvn/or1k/or1k/trunk
Go to most recent revision |
Show entire file |
Details |
Blame |
View Log
Rev 819 |
Rev 848 |
Line 102... |
Line 102... |
r = (char *)malloc (strlen (s) + 1);
|
r = (char *)malloc (strlen (s) + 1);
|
strcpy (r, s);
|
strcpy (r, s);
|
return (r);
|
return (r);
|
}
|
}
|
|
|
|
/* Parses string line and puts up to maxparam parameters into argv[]; number of parameters is returned */
|
|
int tokenize_line (char *str, char *argv[], int maxparam)
|
|
{
|
|
int i, param = 0;
|
|
str = stripwhite (str);
|
|
while (*str) {
|
|
char *p;
|
|
argv[param] = str;
|
|
while (*str && !isblank (*str)) str++;
|
|
param++;
|
|
p = str;
|
|
if (param >= maxparam) break;
|
|
while (*str && isblank (*str)) str++;
|
|
*p = 0;
|
|
}
|
|
for (i = 0; i < param; i++) argv[i] = stripwhite (argv[i]);
|
|
return param;
|
|
}
|
|
|
/* Used only by the simulator loader to translate logical addresses into physical.
|
/* Used only by the simulator loader to translate logical addresses into physical.
|
If loadcode() is called with valid virtphy_transl pointer to a table of
|
If loadcode() is called with valid virtphy_transl pointer to a table of
|
translations then translate() performs translation otherwise phy address is
|
translations then translate() performs translation otherwise phy address is
|
equal to logical. */
|
equal to logical. */
|
static unsigned int translate(unsigned int laddr,int* breakpoint)
|
static unsigned int translate(unsigned int laddr,int* breakpoint)
|
© copyright 1999-2025
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.