Changeset 967 for trunk/platforms/tsar_generic_leti/arch.py
- Timestamp:
- Apr 6, 2015, 12:39:32 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/platforms/tsar_generic_leti/arch.py
r960 r967 14 14 # and kernel objects (global vsegs). 15 15 # 16 # The x_size & y_size parameters define the total number of clusters. 16 # This platform includes 6 external peripherals controllers located 17 # in cluster[x_size-1][y_size-1]: TTY, IOC, FBF, NIC, CMA, PIC. 18 # It does not use the IOB component. 19 # It does not use an external ROM, as the preloader code is (pre)loaded 20 # at address 0x0, in the physical memory of cluster[0][0]. 21 # It can use an - optional - RAMDISK located in cluster[0][0]. 17 22 # The upper row (y = y_size-1) does not contain processors or memory. 18 23 # 19 # It does not use the IOB component: 20 # The external peripherals are located in cluster[x_size-1][y_size-1]. 24 # The "constructor" parameters (defined in Makefile) are: 25 # - x_size : number of clusters in a row 26 # - y_size : number of clusters in a column 27 # - nb_procs : number of processors per cluster 28 # - nb_ttys : number of TTY channels 29 # - fbf_width : frame_buffer width = frame_buffer heigth 30 # - ioc_type : can be 'BDV','HBA','SDC','RDK' 21 31 # 22 # It does not use an external ROM, as the preloader code is (pre)loaded 23 # at address 0x0, in the physical memory of cluster[0][0]. 24 # 25 # It can use an - optional - RAMDISK located in cluster[0][0]. 26 # 27 # The others hardware parameters are: 28 # - fbf_width : frame_buffer width = frame_buffer heigth 29 # - nb_ttys : number of TTY channels 32 # The others hardware parameters (defined below) are: 30 33 # - nb_nics : number of NIC channels 31 34 # - nb_cmas : number of CMA channels 35 # - x_io : cluster_io x coordinate 36 # - y_io : cluster_io y coordinate 37 # - x_width : number of bits for x coordinate 38 # - y_width : number of bits for y coordinate 39 # - paddr_width : number of bits for physical address 32 40 # - irq_per_proc : number of input IRQs per processor 33 41 # - use_ramdisk : use a RAMDISK when True 34 # - peri_increment : address increment for replicated peripherals42 # - peri_increment : address increment for replicated vsegs 35 43 # 36 44 # Regarding the boot and kernel vsegs mapping : … … 52 60 nb_procs = 4, 53 61 nb_ttys = 1, 54 fbf_width = 128 ): 62 fbf_width = 128, 63 ioc_type = 'HBA' ): 55 64 56 65 ### define architecture constants … … 58 67 nb_nics = 1 59 68 nb_cmas = 2 60 x_io = x_size - 1 61 y_io = y_size - 1 69 x_io = x_size - 1 # LETI constraint 70 y_io = y_size - 1 # LETI constraint 62 71 x_width = 4 63 72 y_width = 4 64 p_width = 2 73 p_width = 2 # LETI constraint 65 74 paddr_width = 40 66 irq_per_proc = 4 67 use_ramdisk = False 68 peri_increment = 0x10000 # distributed peripherals vbase increment 69 reset_address = 0x00000000 # wired preloader pbase address 75 irq_per_proc = 4 # NetBSD constraint 76 peri_increment = 0x10000 77 reset_address = 0x00000000 # LETI constraint 70 78 71 79 ### parameters checking … … 75 83 assert( x_size <= (1 << x_width) ) 76 84 77 assert( y_size <= (1 << y_width) ) 78 85 assert( (y_size > 1) and (y_size <= (1 << y_width)) ) 86 87 assert( ioc_type in [ 'BDV' , 'HBA' , 'SDC' , 'RDK' ] ) 88 79 89 ### define type and name 80 90 81 platform_ type = 'tsar_leti'82 platform_name = '%s_%d_%d_%d' % (platform_type, x_size, y_size, nb_procs)91 platform_name = 'tsar_leti_%d_%d_%d' % ( x_size, y_size, nb_procs ) 92 platform_name += '_%d_%d_%s' % ( fbf_width , nb_ttys , ioc_type ) 83 93 84 94 ### define physical segments replicated in all clusters … … 97 107 ## These segments are only defined in cluster_io 98 108 99 bdv_base = 0xF2000000100 bdv_size = 0x1000 # 4kbytes109 ioc_base = 0xF2000000 110 ioc_size = 0x1000 # 4kbytes 101 111 102 112 tty_base = 0xF4000000 … … 120 130 ### => boot cost is one BPP in cluster[0][0] 121 131 122 preloader_vbase = 0x00000000# ident132 preloader_vbase = reset_address # ident 123 133 preloader_size = 0x00010000 # 64 Kbytes 124 134 … … 176 186 coherence = True, 177 187 irq_per_proc = irq_per_proc, 178 use_ramdisk = use_ramdisk,188 use_ramdisk = (ioc_type == 'RDK'), 179 189 x_io = x_io, 180 190 y_io = y_io, … … 215 225 if ( (x==x_io) and (y==y_io) ): 216 226 217 bdv = mapping.addPeriph( 'BDV', base = bdv_base + offset, size = bdv_size, 218 ptype = 'IOC', subtype = 'BDV' ) 227 if ( ioc_type != 'RDK' ): 228 ioc = mapping.addPeriph( 'IOC', base = ioc_base + offset, size = ioc_size, 229 ptype = 'IOC', subtype = ioc_type ) 219 230 220 231 tty = mapping.addPeriph( 'TTY', base = tty_base + offset, size = tty_size, … … 244 255 mapping.addIrq( pic, index = 7 , isrtype = 'ISR_CMA' , channel = 3 ) 245 256 246 mapping.addIrq( pic, index = 8 , isrtype = 'ISR_BDV' , channel = 0 ) 257 if ( ioc_type == 'BDV' ): 258 mapping.addIrq( pic, index = 8 , isrtype = 'ISR_BDV' , channel = 0 ) 259 if ( ioc_type == 'HBA' ): 260 mapping.addIrq( pic, index = 8 , isrtype = 'ISR_HBA' , channel = 0 ) 261 if ( ioc_type == 'SDC' ): 262 mapping.addIrq( pic, index = 8 , isrtype = 'ISR_SDC' , channel = 0 ) 247 263 248 264 mapping.addIrq( pic, index = 16, isrtype = 'ISR_TTY_RX', channel = 0 ) … … 284 300 ### global vseg for RAM-DISK in cluster[0][0] 285 301 ### identity mapping / non local / big pages 286 if use_ramdisk:302 if (ioc_type == 'RDK'): 287 303 288 304 mapping.addGlobal( 'seg_ramdisk', ramdisk_vbase, ramdisk_size, … … 342 358 ### global vsegs for external peripherals: non local / big page 343 359 ### only mapped in cluster_io 344 mapping.addGlobal( 'seg_ bdv', bdv_base, bdv_size,345 '__W_', vtype = 'PERI', x = x_io, y = y_io, pseg = ' BDV',360 mapping.addGlobal( 'seg_ioc', ioc_base, ioc_size, 361 '__W_', vtype = 'PERI', x = x_io, y = y_io, pseg = 'IOC', 346 362 local = False, big = True ) 347 363
Note: See TracChangeset
for help on using the changeset viewer.