URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Go to most recent revision |
Only display areas with differences |
Details |
Blame |
View Log
Rev 149 |
Rev 154 |
int giop_tx_big_endian;
|
int giop_tx_big_endian;
|
|
|
inline
|
inline
|
void
|
void
|
giop_encode_ulong (unsigned long i, char *buf)
|
giop_encode_ulong (unsigned long i, char *buf)
|
{
|
{
|
if (giop_tx_big_endian)
|
if (giop_tx_big_endian)
|
{
|
{
|
*(unsigned long *) buf = i;
|
*(unsigned long *) buf = i;
|
}
|
}
|
else
|
else
|
{
|
{
|
*buf++ = i & 0xff;
|
*buf++ = i & 0xff;
|
*buf++ = (i >> 8) & 0xff;
|
*buf++ = (i >> 8) & 0xff;
|
*buf++ = (i >> 16) & 0xff;
|
*buf++ = (i >> 16) & 0xff;
|
*buf = (i >> 24) & 0xff;
|
*buf = (i >> 24) & 0xff;
|
}
|
}
|
}
|
}
|
|
|
|
|
|
|
static
|
static
|
double
|
double
|
time_giop_encode (unsigned long l)
|
time_giop_encode (unsigned long l)
|
{
|
{
|
int c;
|
int c;
|
char buf[4];
|
char buf[4];
|
|
|
for (c = 0; c < (512 * 1024 * 1024); ++c)
|
for (c = 0; c < (512 * 1024 * 1024); ++c)
|
{
|
{
|
giop_encode_ulong (l, buf);
|
giop_encode_ulong (l, buf);
|
}
|
}
|
}
|
}
|
|
|
int
|
int
|
main (int ac, char *av[])
|
main (int ac, char *av[])
|
{
|
{
|
giop_tx_big_endian = 1;
|
giop_tx_big_endian = 1;
|
time_giop_encode (0);
|
time_giop_encode (0);
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.