commit
162d32603d
|
@ -67,7 +67,7 @@ class WishboneStreamingBridge(Module):
|
||||||
]
|
]
|
||||||
|
|
||||||
fsm = ResetInserter()(FSM(reset_state="IDLE"))
|
fsm = ResetInserter()(FSM(reset_state="IDLE"))
|
||||||
timer = WaitTimer(clk_freq//10)
|
timer = WaitTimer(int(clk_freq//10))
|
||||||
self.submodules += fsm, timer
|
self.submodules += fsm, timer
|
||||||
self.comb += [
|
self.comb += [
|
||||||
fsm.reset.eq(timer.done),
|
fsm.reset.eq(timer.done),
|
||||||
|
|
|
@ -46,7 +46,7 @@ static inline long int labs(long int x)
|
||||||
return x > 0 ? x : -x;
|
return x > 0 ? x : -x;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned long strtoul(const char *nptr, char **endptr, int base);
|
unsigned long strtoul(const char *nptr, char **endptr, unsigned int base);
|
||||||
long strtol(const char *nptr, char **endptr, int base);
|
long strtol(const char *nptr, char **endptr, int base);
|
||||||
double strtod(const char *str, char **endptr);
|
double strtod(const char *str, char **endptr);
|
||||||
|
|
||||||
|
|
|
@ -374,7 +374,7 @@ void *memchr(const void *s, int c, size_t n)
|
||||||
* @endptr: A pointer to the end of the parsed string will be placed here
|
* @endptr: A pointer to the end of the parsed string will be placed here
|
||||||
* @base: The number base to use
|
* @base: The number base to use
|
||||||
*/
|
*/
|
||||||
unsigned long strtoul(const char *nptr, char **endptr, int base)
|
unsigned long strtoul(const char *nptr, char **endptr, unsigned int base)
|
||||||
{
|
{
|
||||||
unsigned long result = 0,value;
|
unsigned long result = 0,value;
|
||||||
|
|
||||||
|
@ -535,7 +535,7 @@ char *number(char *buf, char *end, unsigned long num, int base, int size, int pr
|
||||||
*/
|
*/
|
||||||
int vscnprintf(char *buf, size_t size, const char *fmt, va_list args)
|
int vscnprintf(char *buf, size_t size, const char *fmt, va_list args)
|
||||||
{
|
{
|
||||||
int i;
|
size_t i;
|
||||||
|
|
||||||
i=vsnprintf(buf,size,fmt,args);
|
i=vsnprintf(buf,size,fmt,args);
|
||||||
return (i >= size) ? (size - 1) : i;
|
return (i >= size) ? (size - 1) : i;
|
||||||
|
@ -579,7 +579,7 @@ int snprintf(char * buf, size_t size, const char *fmt, ...)
|
||||||
int scnprintf(char * buf, size_t size, const char *fmt, ...)
|
int scnprintf(char * buf, size_t size, const char *fmt, ...)
|
||||||
{
|
{
|
||||||
va_list args;
|
va_list args;
|
||||||
int i;
|
size_t i;
|
||||||
|
|
||||||
va_start(args, fmt);
|
va_start(args, fmt);
|
||||||
i = vsnprintf(buf, size, fmt, args);
|
i = vsnprintf(buf, size, fmt, args);
|
||||||
|
|
|
@ -196,15 +196,15 @@ loop:
|
||||||
pn = (char *) base + nmemb * size;
|
pn = (char *) base + nmemb * size;
|
||||||
r = min(pa - (char *)base, pb - pa);
|
r = min(pa - (char *)base, pb - pa);
|
||||||
vecswap(base, pb - r, r);
|
vecswap(base, pb - r, r);
|
||||||
r = min(pd - pc, pn - pd - size);
|
r = min(pd - pc, pn - pd - (int)size);
|
||||||
vecswap(pb, pn - r, r);
|
vecswap(pb, pn - r, r);
|
||||||
|
|
||||||
if ((r = pb - pa) > size)
|
if ((r = pb - pa) > (int)size)
|
||||||
{
|
{
|
||||||
qsort(base, r / size, size, compar);
|
qsort(base, r / size, size, compar);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((r = pd - pc) > size)
|
if ((r = pd - pc) > (int)size)
|
||||||
{
|
{
|
||||||
/* Iterate rather than recurse to save stack space */
|
/* Iterate rather than recurse to save stack space */
|
||||||
base = pn - r;
|
base = pn - r;
|
||||||
|
|
|
@ -107,7 +107,7 @@ double strtod(const char *str, char **endptr)
|
||||||
switch (*p)
|
switch (*p)
|
||||||
{
|
{
|
||||||
case '-':
|
case '-':
|
||||||
negative = 1; /* Fall through to increment position */
|
negative = 1; /* FALLTHRU */ /* to increment position */
|
||||||
case '+':
|
case '+':
|
||||||
p++;
|
p++;
|
||||||
}
|
}
|
||||||
|
@ -166,7 +166,7 @@ double strtod(const char *str, char **endptr)
|
||||||
switch(*++p)
|
switch(*++p)
|
||||||
{
|
{
|
||||||
case '-':
|
case '-':
|
||||||
negative = 1; /* Fall through to increment pos */
|
negative = 1; /* FALLTHRU */ /* to increment pos */
|
||||||
case '+':
|
case '+':
|
||||||
p++;
|
p++;
|
||||||
}
|
}
|
||||||
|
|
|
@ -262,6 +262,7 @@ int vsnprintf(char *buf, size_t size, const char *fmt, va_list args)
|
||||||
|
|
||||||
case 'X':
|
case 'X':
|
||||||
flags |= PRINTF_LARGE;
|
flags |= PRINTF_LARGE;
|
||||||
|
/* FALLTHRU */
|
||||||
case 'x':
|
case 'x':
|
||||||
base = 16;
|
base = 16;
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue