Changeset 692 for trunk/platforms/tsar_generic_leti/top.cpp
- Timestamp:
- May 16, 2014, 7:01:38 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/platforms/tsar_generic_leti/top.cpp
r681 r692 147 147 148 148 #if USE_GIET_TSAR 149 #include " ../../softs/soft_transpose_giet/hard_config.h"149 #include "hard_config.h" 150 150 #define BINARY_PATH_FOR_LOADER "../../softs/soft_transpose_giet/bin.soft" 151 151 #define RAMDISK_PATH_FOR_LOADER "../../softs/soft_transpose_giet/images.raw@0x00800000:" … … 154 154 155 155 #if USE_GIET_VM 156 #include " ../../../giet_vm/hard_config.h"156 #include "hard_config.h" 157 157 #define BINARY_PATH_FOR_LOADER "../../softs/tsar_boot/preloader.elf" 158 158 #define RAMDISK_PATH_FOR_LOADER "../../../giet_vm/hdd/virt_hdd.dmg@0x02000000:" … … 173 173 /////////////////////////////////////////////////// 174 174 175 #define cluster(x,y) (y + (x << Y_WIDTH)) 176 177 #define min(a, b) (a < b ? a : b) 175 #define cluster(x,y) ((y) + ((x) << Y_WIDTH)) 178 176 179 177 /////////////////////////////////////////////////////////// … … 271 269 ////////////////////////////////////////////////////////////////////////////////////// 272 270 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 271 // in cluster [0,0] & [X_SIZE-1,Y_SIZE] 272 273 #define MTTY_BASE 0xF4000000 274 #define MTTY_SIZE 0x00001000 // 4 Kbytes 275 276 #define BDEV_BASE 0xF2000000 277 #define BDEV_SIZE 0x00001000 // 4 Kbytes 278 279 // in cluster [X_SIZE-1,Y_SIZE] 280 281 #define FBUF_BASE 0xF3000000 282 #define FBUF_SIZE (FBUF_X_SIZE * FBUF_Y_SIZE * 2) 283 284 #define MNIC_BASE 0xF7000000 285 #define MNIC_SIZE 0x00800000 // 512 Kbytes (for 8 channels) 286 287 #define CDMA_BASE 0xF8000000 288 #define CDMA_SIZE 0x00004000 * NB_CMA_CHANNELS 289 290 #define IOPI_BASE 0xF9000000 291 #define IOPI_SIZE 0x00001000 // 4 Kbytes 292 293 // replicated segments : address is extended to 40 bits by cluster_xy 294 295 #define MEMC_BASE 0x00000000 296 #define MEMC_SIZE XRAM_SIZE 297 298 #define MCFG_BASE 0xE0000000 299 #define MCFG_SIZE 0x00001000 // 4 Kbytes 300 301 #define XICU_BASE 0xF0000000 302 #define XICU_SIZE 0x00001000 // 4 Kbytes 305 303 306 304 bool stop_called = false; … … 313 311 using namespace soclib::common; 314 312 315 uint32_t ncycles = 0xFFFFFFFF; // max simulated cycles 316 size_t threads = 1; // simulator's threads number 317 bool trace_ok = false; // trace activated 318 uint32_t trace_from = 0; // trace start cycle 319 bool trace_proc_ok = false; // detailed proc trace activated 320 size_t trace_memc_ok = false; // detailed memc trace activated 321 size_t trace_memc_id = 0; // index of memc to be traced 322 size_t trace_proc_id = 0; // index of proc to be traced 323 uint32_t frozen_cycles = MAX_FROZEN_CYCLES; // monitoring frozen processor 313 uint32_t ncycles = 0xFFFFFFFF; // max simulated cycles 314 size_t threads = 1; // simulator's threads number 315 bool trace_ok = false; // trace activated 316 uint32_t trace_from = 0; // trace start cycle 317 bool trace_proc_ok = false; // detailed proc trace activated 318 size_t trace_memc_ok = false; // detailed memc trace activated 319 size_t trace_memc_id = 0; // index of memc to be traced 320 size_t trace_proc_id = 0; // index of proc to be traced 321 uint32_t frozen_cycles = MAX_FROZEN_CYCLES; 322 char soft_name[256] = BINARY_PATH_FOR_LOADER; 323 char disk_name[256] = DISK_IMAGE_PATH_FOR_IOC; 324 char ramdisk_name[256] = RAMDISK_PATH_FOR_LOADER; 324 325 struct timeval t1,t2; 325 326 uint64_t ms1,ms2; … … 358 359 size_t l = trace_proc_id % NB_PROCS_MAX ; 359 360 360 assert( (x < X_SIZE) and (y < (Y_SIZE)) and l < NB_PROCS_MAXand361 assert( (x < X_SIZE) and (y < Y_SIZE) and (l < NB_PROCS_MAX) and 361 362 "PROCID parameter refers a not valid processor"); 363 } 364 else if ((strcmp(argv[n], "-SOFT") == 0) && ((n + 1) < argc)) 365 { 366 strcpy(soft_name, argv[n + 1]); 367 } 368 else if ((strcmp(argv[n], "-DISK") == 0) && ((n + 1) < argc)) 369 { 370 strcpy(disk_name, argv[n + 1]); 371 } 372 else if ((strcmp(argv[n], "-RAMDISK") == 0) && ((n + 1) < argc)) 373 { 374 strcpy(ramdisk_name, argv[n + 1]); 362 375 } 363 376 else if ((strcmp(argv[n], "-THREADS") == 0) && ((n + 1) < argc)) … … 377 390 std::cout << " -NCYCLES number_of_simulated_cycles" << std::endl; 378 391 std::cout << " -DEBUG debug_start_cycle" << std::endl; 392 std::cout << " -SOFT path to soft" << std::endl; 393 std::cout << " -DISK path to disk image" << std::endl; 394 std::cout << " -RAMDISK path to ramdisk image" << std::endl; 379 395 std::cout << " -THREADS simulator's threads number" << std::endl; 380 396 std::cout << " -FROZEN max_number_of_lines" << std::endl; … … 426 442 std::cout << " - MAX_CYCLES = " << ncycles << std::endl; 427 443 std::cout << " - RESET_ADDRESS = " << RESET_ADDRESS << std::endl; 428 std::cout << " - SOFT_PATH_NAME = " << BINARY_PATH_FOR_LOADER << std::endl; 429 std::cout << " - DISK_IMAGE_PATH = " << DISK_IMAGE_PATH_FOR_IOC << std::endl; 444 std::cout << " - SOFT_FILENAME = " << soft_name << std::endl; 445 std::cout << " - DISK_IMAGENAME = " << disk_name << std::endl; 446 std::cout << " - RAMDISK_FILENAME = " << ramdisk_name << std::endl; 447 std::cout << " - OPENMP THREADS = " << threads << std::endl; 430 448 431 449 std::cout << std::endl; … … 671 689 672 690 #if USE_IOC_RDK 673 soclib::common::Loader loader( BINARY_PATH_FOR_LOADER, RAMDISK_PATH_FOR_LOADER);691 soclib::common::Loader loader( soft_name, ramdisk_name ); 674 692 #else 675 soclib::common::Loader loader( BINARY_PATH_FOR_LOADER);693 soclib::common::Loader loader( soft_name ); 676 694 #endif 677 695 … … 734 752 MTTY_TGTID, 735 753 BDEV_TGTID, 736 DISK_IMAGE_PATH_FOR_IOC,754 disk_name, 737 755 MEMC_WAYS, 738 756 MEMC_SETS, … … 801 819 IntTab(cluster_io, BDEV_SRCID), 802 820 IntTab(cluster_io, BDEV_TGTID), 803 DISK_IMAGE_PATH_FOR_IOC,821 disk_name, 804 822 512, // block size 805 823 64 ); // burst size
Note: See TracChangeset
for help on using the changeset viewer.