Changeset 803 for trunk/platforms
- Timestamp:
- Sep 12, 2014, 3:10:04 PM (10 years ago)
- Location:
- trunk/platforms/tsar_generic_leti
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/platforms/tsar_generic_leti/arch.py
r797 r803 1 1 #!/usr/bin/env python 2 2 3 from math import log, ceil 3 4 from mapping import * 4 5 5 6 ############################################################################### 6 # file : arch.py (for the tsar_generic_ iobarchitecture)7 # file : arch.py (for the tsar_generic_leti architecture) 7 8 # date : may 2014 8 9 # author : Alain Greiner 9 10 ############################################################################### 10 # This file contains a mapping generator for the "tsar_generic_ iob" platform.11 # This file contains a mapping generator for the "tsar_generic_leti" platform. 11 12 # This includes both the hardware architecture (clusters, processors, 12 13 # peripherals, physical space segmentation) and the mapping of all kernel 13 # objects (global vsegs). This platform includes 6 external peripherals, 14 # accessible through two IO_Bridge components located in cluster [0,0] and 15 # cluster [x_size-1, y_size-1]. Available peripherals are: TTY, BDV, FBF, 16 # ROM, NIC, CMA. 14 # objects (global vsegs). 17 15 # 18 16 # The "constructor" parameters are: … … 49 47 x_width = 4 50 48 y_width = 4 49 p_width = int(ceil(log(nb_procs, 2))) 51 50 paddr_width = 40 52 51 irq_per_proc = 4 … … 54 53 peri_increment = 0x10000 55 54 reset_address = 0x00000000 56 distributed_ptabs = True55 distributed_ptabs = False 57 56 58 57 ### parameters checking 59 58 60 assert( nb_procs <= 4)59 assert( nb_procs <= (1 << p_width) ) 61 60 62 61 assert( (x_size == 1) or (x_size == 2) or (x_size == 4) … … 71 70 ((x_io == x_size-1) and (y_io == y_size-1)) ) 72 71 73 platform_name = 'tsar_ iob_%d_%d_%d' % ( x_size, y_size, nb_procs )72 platform_name = 'tsar_leti_%d_%d_%d' % ( x_size, y_size, nb_procs ) 74 73 75 74 ### define physical segments … … 107 106 rdk_size = 0x02000000 # 32 Mbytes 108 107 108 ### define preloader vseg base address and size 109 110 preloader_vbase = 0x00000000 # ident 111 preloader_size = 0x00010000 # 64 Kbytes 112 109 113 ### define bootloader vsegs base addresses and sizes 110 114 111 boot_mapping_vbase = 0x000 00000 # ident115 boot_mapping_vbase = 0x00010000 # ident 112 116 boot_mapping_size = 0x00080000 # 512 Kbytes 113 117 114 boot_code_vbase = 0x000 80000 # ident118 boot_code_vbase = 0x00090000 # ident 115 119 boot_code_size = 0x00040000 # 256 Kbytes 116 120 117 boot_data_vbase = 0x000 C0000 # ident121 boot_data_vbase = 0x000D0000 # ident 118 122 boot_data_size = 0x00080000 # 512 Kbytes 119 123 120 boot_stack_vbase = 0x001 40000 # ident124 boot_stack_vbase = 0x00150000 # ident 121 125 boot_stack_size = 0x00050000 # 320 Kbytes 122 126 … … 135 139 kernel_init_size = 0x00010000 # 64 Kbytes 136 140 137 kernel_sched_vbase = 0x F0000000 # distributed in all clusters141 kernel_sched_vbase = 0x80060000 # distributed in all clusters 138 142 kernel_sched_size = 0x2000 * nb_procs # 8 kbytes per processor 139 143 … … 146 150 x_width = x_width, 147 151 y_width = y_width, 152 p_width = p_width, 148 153 paddr_width = paddr_width, 149 154 coherence = True, … … 218 223 mapping.addProc( x, y, p ) 219 224 225 ### global vseg for preloader 226 227 mapping.addGlobal( 'seg_preloader', preloader_vbase, preloader_size, '__W_', 228 vtype = 'BUFFER', x = 0, y = 0, pseg = 'RAM', 229 identity = True ) 230 220 231 ### global vseg for ram disk 221 232 222 mapping.addGlobal( 'seg_rdk', rdk_base, rdk_size, '__W_', 223 vtype = 'BUFFER', x = 0, y = 0, pseg = 'RAM', 224 identity = True ) 233 if use_ramdisk: 234 mapping.addGlobal( 'seg_rdk', rdk_base, rdk_size, '__W_', 235 vtype = 'BUFFER', x = 0, y = 0, pseg = 'RAM', 236 identity = True ) 225 237 226 238 ### global vsegs for external peripherals / identity mapping -
trunk/platforms/tsar_generic_leti/top.cpp
r796 r803 272 272 trace_proc_ok = true; 273 273 trace_proc_id = (size_t) strtol(argv[n + 1], NULL, 0); 274 size_t cluster_xy = trace_proc_id / NB_PROCS_MAX;274 size_t cluster_xy = trace_proc_id >> P_WIDTH ; 275 275 size_t x = cluster_xy >> Y_WIDTH; 276 276 size_t y = cluster_xy & ((1<<Y_WIDTH)-1); 277 size_t l = trace_proc_id % NB_PROCS_MAX;277 size_t l = trace_proc_id & ((1<<P_WIDTH)-1) ; 278 278 279 279 assert( (x < X_SIZE) and (y < Y_SIZE) and (l < NB_PROCS_MAX) and … … 324 324 "Illegal Y_SIZE parameter" ); 325 325 326 assert( (P_WIDTH <= 2) and 327 "P_WIDTH parameter cannot be larger than 2" ); 328 326 329 assert( (NB_PROCS_MAX <= 4) and 327 330 "Illegal NB_PROCS_MAX parameter" ); … … 664 667 Y_WIDTH, 665 668 vci_srcid_width - X_WIDTH - Y_WIDTH, // l_id width, 669 P_WIDTH, 666 670 MEMC_TGTID, 667 671 XICU_TGTID, … … 1177 1181 if ( trace_proc_ok ) 1178 1182 { 1179 l = trace_proc_id % NB_PROCS_MAX;1180 x = (trace_proc_id / NB_PROCS_MAX) >> Y_WIDTH ;1181 y = (trace_proc_id / NB_PROCS_MAX) & ((1<<Y_WIDTH) - 1);1183 l = trace_proc_id & ((1<<P_WIDTH)-1) ; 1184 x = (trace_proc_id >> P_WIDTH) >> Y_WIDTH ; 1185 y = (trace_proc_id >> P_WIDTH) & ((1<<Y_WIDTH) - 1); 1182 1186 1183 1187 std::ostringstream proc_signame; -
trunk/platforms/tsar_generic_leti/tsar_leti_cluster/caba/source/include/tsar_leti_cluster.h
r692 r803 166 166 size_t y_width, // y field bits 167 167 size_t l_width, // l field bits 168 size_t p_width, // p field bits 168 169 size_t tgtid_memc, 169 170 size_t tgtid_xicu, -
trunk/platforms/tsar_generic_leti/tsar_leti_cluster/caba/source/src/tsar_leti_cluster.cpp
r732 r803 32 32 size_t y_width, 33 33 size_t l_width, 34 size_t p_width, 34 35 size_t tgtid_memc, 35 36 size_t tgtid_xicu, … … 87 88 for (size_t p = 0; p < nb_procs; p++) 88 89 { 89 uint32_t global_proc_id = cluster_xy * nb_procs+ p;90 uint32_t global_proc_id = (cluster_xy << p_width) + p; 90 91 uint32_t global_cc_id = (cluster_xy << l_width) + p; 91 92 bool trace_ok = trace_proc_ok and (trace_proc_id == global_proc_id);
Note: See TracChangeset
for help on using the changeset viewer.