Changeset 766
- Timestamp:
- Aug 13, 2014, 4:34:50 PM (10 years ago)
- Location:
- branches/reconfiguration/platforms/tsar_generic_iob
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/reconfiguration/platforms/tsar_generic_iob/arch.py
r748 r766 20 20 # - nb_procs : number of processors per cluster 21 21 # 22 # The "hidden" p latform parametersare:22 # The "hidden" parameters (defined below) are: 23 23 # - nb_ttys : number of TTY channels 24 24 # - nb_nics : number of NIC channels … … 43 43 nb_ttys = 1 44 44 nb_nics = 2 45 fbf_width = 1 02445 fbf_width = 128 46 46 x_io = 0 47 47 y_io = 0 … … 59 59 60 60 assert( (x_size == 1) or (x_size == 2) or (x_size == 4) 61 or ( y_size == 8) or (x_size == 16) )61 or (x_size == 8) or (x_size == 16) ) 62 62 63 63 assert( (y_size == 1) or (y_size == 2) or (y_size == 4) … … 111 111 iob_size = 0x1000 # 4 kbytes 112 112 113 113 114 ### GIET_VM specifics virtual segments 114 115 ### define bootloader vsegs base addresses 115 ### define bootloader vsegs base addresses 116 116 117 117 boot_mapping_vbase = 0x00000000 # ident 118 boot_mapping_size = 0x00040000 # 256 Kbytes 119 120 boot_code_vbase = 0x00040000 # ident 121 boot_code_size = 0x00020000 # 128 Kbytes 122 123 boot_data_vbase = 0x00060000 # ident 124 boot_data_size = 0x00010000 # 64 Kbytes 125 126 boot_buffer_vbase = 0x00070000 # ident 127 boot_buffer_size = 0x00060000 # 384 Kbytes 128 129 boot_stack_vbase = 0x03F00000 # ident 130 boot_stack_size = 0x00100000 # 1 Mbytes 131 132 ### define kernel vsegs base addresses 118 boot_mapping_size = 0x00080000 # 512 Kbytes 119 120 boot_code_vbase = 0x00080000 # ident 121 boot_code_size = 0x00040000 # 256 Kbytes 122 123 boot_data_vbase = 0x000C0000 # ident 124 boot_data_size = 0x00080000 # 512 Kbytes 125 126 boot_stack_vbase = 0x00140000 # ident 127 boot_stack_size = 0x00050000 # 320 Kbytes 128 129 ### define kernel vsegs base addresses and sizes 133 130 134 131 kernel_code_vbase = 0x80000000 … … 136 133 137 134 kernel_data_vbase = 0x80020000 138 kernel_data_size = 0x000 60000 # 384Kbytes139 140 kernel_uncdata_vbase = 0x800 80000141 kernel_uncdata_size = 0x000 40000 # 256Kbytes142 143 kernel_init_vbase = 0x800 C0000135 kernel_data_size = 0x00020000 # 128 Kbytes 136 137 kernel_uncdata_vbase = 0x80040000 138 kernel_uncdata_size = 0x00010000 # 64 Kbytes 139 140 kernel_init_vbase = 0x80050000 144 141 kernel_init_size = 0x00010000 # 64 Kbytes 145 142 146 143 kernel_sched_vbase = 0xF0000000 # distributed in all clusters 147 kernel_sched_size = 0x 1000 * nb_procs # 4kbytes per processor144 kernel_sched_size = 0x2000 * nb_procs # 8 kbytes per processor 148 145 149 146 ### create mapping … … 226 223 ### global vsegs for boot_loader / identity mapping 227 224 228 mapping.addGlobal( 'seg_boot_mapping' , boot_mapping_vbase , boot_mapping_size , 'C_W_', 229 vtype = 'BLOB' , x = 0, y = 0, pseg = 'RAM', identity = True ) 230 231 mapping.addGlobal( 'seg_boot_code' , boot_code_vbase , boot_code_size , 'CXW_', 232 vtype = 'BUFFER', x = 0, y = 0, pseg = 'RAM', identity = True ) 233 234 mapping.addGlobal( 'seg_boot_data' , boot_data_vbase , boot_data_size , 'C_W_', 235 vtype = 'BUFFER', x = 0, y = 0, pseg = 'RAM', identity = True ) 236 237 mapping.addGlobal( 'seg_boot_buffer' , boot_buffer_vbase , boot_buffer_size , 'C_W_', 238 vtype = 'BUFFER', x = 0, y = 0, pseg = 'RAM', identity = True ) 239 240 mapping.addGlobal( 'seg_boot_stack' , boot_stack_vbase , boot_stack_size , 'C_W_', 241 vtype = 'BUFFER', x = 0, y = 0, pseg = 'RAM', identity = True ) 242 243 ### global vsegs for kernel 225 mapping.addGlobal( 'seg_boot_mapping', boot_mapping_vbase, boot_mapping_size, 226 'C_W_', vtype = 'BLOB' , x = 0, y = 0, pseg = 'RAM', 227 identity = True ) 228 229 mapping.addGlobal( 'seg_boot_code', boot_code_vbase, boot_code_size, 230 'CXW_', vtype = 'BUFFER', x = 0, y = 0, pseg = 'RAM', 231 identity = True ) 232 233 mapping.addGlobal( 'seg_boot_data', boot_data_vbase, boot_data_size, 234 'C_W_', vtype = 'BUFFER', x = 0, y = 0, pseg = 'RAM', 235 identity = True ) 236 237 mapping.addGlobal( 'seg_boot_stack', boot_stack_vbase, boot_stack_size, 238 'C_W_', vtype = 'BUFFER', x = 0, y = 0, pseg = 'RAM', 239 identity = True ) 240 241 ### the code global vsegs for kernel can be replicated in all clusters 242 ### if the page tables are distributed in all clusters. 244 243 245 244 if distributed_ptabs: … … 258 257 mapping.addGlobal( 'seg_kernel_code', kernel_code_vbase, kernel_code_size, 259 258 'CXW_', vtype = 'ELF', x = 0 , y = 0 , pseg = 'RAM', 260 binpath = 'build/kernel/kernel.elf' )259 binpath = 'build/kernel/kernel.elf', local = False ) 261 260 262 261 mapping.addGlobal( 'seg_kernel_init', kernel_init_vbase, kernel_init_size, 263 262 'CXW_', vtype = 'ELF', x = 0 , y = 0 , pseg = 'RAM', 264 binpath = 'build/kernel/kernel.elf' ) 265 266 mapping.addGlobal( 'seg_kernel_data' , kernel_data_vbase , kernel_data_size , 'C_W_', 267 vtype = 'ELF' , x = 0, y = 0, pseg = 'RAM', binpath = 'build/kernel/kernel.elf' ) 268 269 mapping.addGlobal( 'seg_kernel_uncdata', kernel_uncdata_vbase, kernel_uncdata_size, '__W_', 270 vtype = 'ELF' , x = 0, y = 0, pseg = 'RAM', binpath = 'build/kernel/kernel.elf' ) 263 binpath = 'build/kernel/kernel.elf', local = False ) 264 265 ### shared global vsegs for kernel 266 267 mapping.addGlobal( 'seg_kernel_data', kernel_data_vbase, kernel_data_size, 268 'C_W_', vtype = 'ELF', x = 0, y = 0, pseg = 'RAM', 269 binpath = 'build/kernel/kernel.elf', local = False ) 270 271 mapping.addGlobal( 'seg_kernel_uncdata', kernel_uncdata_vbase, kernel_uncdata_size, 272 '__W_', vtype = 'ELF', x = 0, y = 0, pseg = 'RAM', 273 binpath = 'build/kernel/kernel.elf', local = False ) 271 274 272 275 ### global vsegs for external peripherals / identity mapping 273 276 274 277 mapping.addGlobal( 'seg_iob', iob_base, iob_size, '__W_', 275 vtype = 'PERI', x = 0, y = 0, pseg = 'IOB', identity = True ) 278 vtype = 'PERI', x = 0, y = 0, pseg = 'IOB', 279 identity = True ) 276 280 277 281 mapping.addGlobal( 'seg_bdv', bdv_base, bdv_size, '__W_', 278 vtype = 'PERI', x = 0, y = 0, pseg = 'BDV', identity = True ) 282 vtype = 'PERI', x = 0, y = 0, pseg = 'BDV', 283 identity = True ) 279 284 280 285 mapping.addGlobal( 'seg_tty', tty_base, tty_size, '__W_', 281 vtype = 'PERI', x = 0, y = 0, pseg = 'TTY', identity = True ) 286 vtype = 'PERI', x = 0, y = 0, pseg = 'TTY', 287 identity = True ) 282 288 283 289 mapping.addGlobal( 'seg_nic', nic_base, nic_size, '__W_', 284 vtype = 'PERI', x = 0, y = 0, pseg = 'NIC', identity = True ) 290 vtype = 'PERI', x = 0, y = 0, pseg = 'NIC', 291 identity = True ) 285 292 286 293 mapping.addGlobal( 'seg_cma', cma_base, cma_size, '__W_', 287 vtype = 'PERI', x = 0, y = 0, pseg = 'CMA', identity = True ) 294 vtype = 'PERI', x = 0, y = 0, pseg = 'CMA', 295 identity = True ) 288 296 289 297 mapping.addGlobal( 'seg_fbf', fbf_base, fbf_size, '__W_', 290 vtype = 'PERI', x = 0, y = 0, pseg = 'FBF', identity = True ) 298 vtype = 'PERI', x = 0, y = 0, pseg = 'FBF', 299 identity = True ) 291 300 292 301 mapping.addGlobal( 'seg_pic', pic_base, pic_size, '__W_', 293 vtype = 'PERI', x = 0, y = 0, pseg = 'PIC', identity = True ) 302 vtype = 'PERI', x = 0, y = 0, pseg = 'PIC', 303 identity = True ) 304 294 305 295 306 ### global vsegs for internal peripherals, and for schedulers -
branches/reconfiguration/platforms/tsar_generic_iob/top.cpp
r760 r766 1397 1397 // simulation loop 1398 1398 struct timeval t1,t2; 1399 const size_t stats_period = 100000; // cycles 1400 1401 if (ncycles == UINT_MAX) 1402 { 1403 int n = 0; 1404 while(1) 1405 { 1406 gettimeofday(&t1, NULL); 1407 sc_start(sc_core::sc_time(stats_period, SC_NS)); 1408 gettimeofday(&t2, NULL); 1409 1410 n += stats_period; 1411 1412 uint64_t ms1 = (uint64_t) t1.tv_sec * 1000ULL + 1413 (uint64_t) t1.tv_usec / 1000; 1414 uint64_t ms2 = (uint64_t) t2.tv_sec * 1000ULL + 1415 (uint64_t) t2.tv_usec / 1000; 1416 std::cerr << "### cycle = " << n 1417 << " / frequency = " 1418 << (double) stats_period / (double) (ms2 - ms1) << "Khz" 1419 << std::endl; 1420 } 1421 1422 return EXIT_SUCCESS; 1423 } 1424 1425 gettimeofday(&t1, NULL); 1426 for (size_t n = 1; n < ncycles; n++) 1399 1400 // cycles between stats 1401 const size_t stats_period = 100000; 1402 const size_t simul_period = debug_ok ? debug_period : stats_period; 1403 1404 for (size_t n = 0; n < ncycles; n += simul_period) 1427 1405 { 1428 1406 // stats display 1429 if( 1407 if((n % stats_period) == 0) 1430 1408 { 1431 gettimeofday(&t2, NULL); 1432 1433 uint64_t ms1 = (uint64_t) t1.tv_sec * 1000ULL + 1434 (uint64_t) t1.tv_usec / 1000; 1435 uint64_t ms2 = (uint64_t) t2.tv_sec * 1000ULL + 1436 (uint64_t) t2.tv_usec / 1000; 1437 std::cerr << "### cycle = " << n 1438 << " / frequency = " 1439 << (double) stats_period / (double) (ms2 - ms1) << "Khz" 1440 << std::endl; 1409 if (n > 0) 1410 { 1411 gettimeofday(&t2, NULL); 1412 1413 uint64_t ms1 = (uint64_t) t1.tv_sec * 1000ULL + 1414 (uint64_t) t1.tv_usec / 1000; 1415 uint64_t ms2 = (uint64_t) t2.tv_sec * 1000ULL + 1416 (uint64_t) t2.tv_usec / 1000; 1417 std::cerr << "### cycle = " << n << " / frequency (Khz) = " 1418 << (double) stats_period / (double) (ms2 - ms1) << std::endl; 1419 } 1441 1420 1442 1421 gettimeofday(&t1, NULL); … … 1565 1544 } 1566 1545 1567 sc_start(sc_core::sc_time( 1, SC_NS));1546 sc_start(sc_core::sc_time(simul_period, SC_NS)); 1568 1547 } 1569 1548 return EXIT_SUCCESS;
Note: See TracChangeset
for help on using the changeset viewer.