URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Show entire file |
Details |
Blame |
View Log
Rev 418 |
Rev 483 |
Line 189... |
Line 189... |
switch (mem->type)
|
switch (mem->type)
|
{
|
{
|
case MT_RANDOM:
|
case MT_RANDOM:
|
if (mem->random_seed == -1)
|
if (mem->random_seed == -1)
|
{
|
{
|
seed = time (NULL);
|
/* seed = time (NULL); */
|
/* Print out the seed just in case we ever need to debug */
|
/* srandom (seed); */
|
PRINTF ("Seeding random generator with value %d\n", seed);
|
/* /\* Print out the seed just in case we ever need to debug *\/ */
|
|
/* PRINTF ("Seeding random generator with value %d\n", seed); */
|
}
|
}
|
else
|
else
|
|
{
|
seed = mem->random_seed;
|
seed = mem->random_seed;
|
srandom (seed);
|
srandom (seed);
|
|
}
|
|
|
for (i = 0; i < mem->size; i++, mem_area++)
|
for (i = 0; i < mem->size; i++, mem_area++)
|
*mem_area = random () & 0xFF;
|
*mem_area = random () & 0xFF;
|
break;
|
break;
|
case MT_PATTERN:
|
case MT_PATTERN:
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.