OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [or1ksim/] [peripheral/] [memory.c] - Diff between revs 418 and 486

Show entire file | Details | Blame | View Log

Rev 418 Rev 486
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:

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.