Changeset 795


Ignore:
Timestamp:
Sep 9, 2014, 2:28:12 PM (7 years ago)
Author:
cfuguet
Message:

tsar_generic_leti: ramdisk file name is now automatically generated

  • It is generated through the concatenation of the disk name (the one used by disk controllers) and the SEG_RDK_BASE address
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/platforms/tsar_generic_leti/top.cpp

    r792 r795  
    241241   char     soft_name[256]    = "soft.elf";
    242242   char     disk_name[256]    = "disk.img";
    243    char     ramdisk_name[256] = "disk.img@0x02000000:";
    244243   struct   timeval t1,t2;
    245244   uint64_t ms1,ms2;
     
    289288            strcpy(disk_name, argv[n + 1]);
    290289         }
    291          else if ((strcmp(argv[n], "-RAMDISK") == 0) && ((n + 1) < argc))
    292          {
    293             strcpy(ramdisk_name, argv[n + 1]);
    294          }
    295290         else if ((strcmp(argv[n], "-THREADS") == 0) && ((n + 1) < argc))
    296291         {
     
    311306            std::cout << "     -SOFT path to soft" << std::endl;
    312307            std::cout << "     -DISK path to disk image" << std::endl;
    313             std::cout << "     -RAMDISK path to ramdisk image" << std::endl;
    314308            std::cout << "     -THREADS simulator's threads number" << std::endl;
    315309            std::cout << "     -FROZEN max_number_of_lines" << std::endl;
     
    364358    std::cout << " - SOFT_FILENAME    = " << soft_name << std::endl;
    365359    std::cout << " - DISK_IMAGENAME   = " << disk_name << std::endl;
    366     std::cout << " - RAMDISK_FILENAME = " << ramdisk_name << std::endl;
    367360    std::cout << " - OPENMP THREADS   = " << threads << std::endl;
    368361
     
    609602
    610603#if USE_RAMDISK
    611    soclib::common::Loader loader( soft_name, ramdisk_name );
     604   std::ostringstream ramdisk_name;
     605   ramdisk_name << disk_name << "@" << std::hex << SEG_RDK_BASE << ":";
     606   soclib::common::Loader loader( soft_name, ramdisk_name.str().c_str() );
    612607#else
    613608   soclib::common::Loader loader( soft_name );
Note: See TracChangeset for help on using the changeset viewer.