- Timestamp:
- Apr 15, 2015, 4:02:08 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/reconfiguration/platforms/tsar_generic_iob/scripts/arch.py
r958 r974 53 53 IRQ_PER_PROC = 4 54 54 USE_RAMDISK = False 55 USE_NIC = False 55 56 56 57 # virtual address increment for distributed memory segments in the GietVM OS … … 69 70 nb_procs=4, 70 71 nb_ttys=1, 71 fbf_width=FBF_WIDTH): 72 fbf_width=FBF_WIDTH, 73 ioc_type='BDV'): 72 74 """This function describes the tsar_generic_iob platform and defines its 73 75 parameters""" … … 89 91 # define physical segments 90 92 ram_base = 0x0000000000 91 ram_size = 0x 10000000 / (x_size * y_size)93 ram_size = 0x4000000 / (x_size * y_size) 92 94 93 95 xcu_base = 0x00B0000000 … … 151 153 152 154 # external peripherals (accessible in cluster[0,0] only for this mapping) 155 pic = mapping.addPeriph('PIC', base=pic_base, size=pic_size, 156 ptype='PIC', channels=32) 157 153 158 mapping.addPeriph('IOB', base=iob_base, size=iob_size, 154 159 ptype='IOB') 155 160 156 mapping.addPeriph('BDV', base=bdv_base, size=bdv_size, 157 ptype='IOC', subtype='BDV') 158 159 mapping.addPeriph('TTY', base=tty_base, size=tty_size, 160 ptype='TTY', channels=nb_ttys) 161 162 mapping.addPeriph('NIC', base=nic_base, size=nic_size, 163 ptype='NIC', channels=NB_NICS) 164 165 mapping.addPeriph('CMA', base=cma_base, size=cma_size, 166 ptype='CMA', channels=2*NB_NICS) 161 bdv = mapping.addPeriph('BDV', base=bdv_base, size=bdv_size, 162 ptype='IOC', subtype='BDV') 163 164 mapping.addIrq(pic, index=8, src=bdv, isrtype='ISR_BDV', channel=0) 165 166 tty = mapping.addPeriph('TTY', base=tty_base, size=tty_size, 167 ptype='TTY', channels=nb_ttys) 168 169 for i in xrange(nb_ttys): 170 mapping.addIrq(pic, index=16+i, src=tty, isrtype='ISR_TTY_RX', channel=i) 171 172 if USE_NIC: 173 nic = mapping.addPeriph('NIC', base=nic_base, size=nic_size, 174 ptype='NIC', channels=NB_NICS) 175 176 mapping.addIrq(pic, index=0, src=nic, isrtype='ISR_NIC_RX', channel=0) 177 mapping.addIrq(pic, index=1, src=nic, isrtype='ISR_NIC_RX', channel=1) 178 mapping.addIrq(pic, index=2, src=nic, isrtype='ISR_NIC_TX', channel=0) 179 mapping.addIrq(pic, index=3, src=nic, isrtype='ISR_NIC_TX', channel=1) 180 181 cma = mapping.addPeriph('CMA', base=cma_base, size=cma_size, 182 ptype='CMA', channels=2*NB_NICS) 183 184 mapping.addIrq(pic, index=4, src=cma, isrtype='ISR_CMA', channel=0) 185 mapping.addIrq(pic, index=5, src=cma, isrtype='ISR_CMA', channel=1) 186 mapping.addIrq(pic, index=6, src=cma, isrtype='ISR_CMA', channel=2) 187 mapping.addIrq(pic, index=7, src=cma, isrtype='ISR_CMA', channel=3) 167 188 168 189 mapping.addPeriph('FBF', base=fbf_base, size=fbf_size, … … 174 195 mapping.addPeriph('ROM', base=rom_base, size=rom_size, 175 196 ptype='ROM') 176 177 pic = mapping.addPeriph('PIC', base=pic_base, size=pic_size,178 ptype='PIC', channels=32)179 180 mapping.addIrq(pic, index=0, isrtype='ISR_NIC_RX', channel=0)181 mapping.addIrq(pic, index=1, isrtype='ISR_NIC_RX', channel=1)182 mapping.addIrq(pic, index=2, isrtype='ISR_NIC_TX', channel=0)183 mapping.addIrq(pic, index=3, isrtype='ISR_NIC_TX', channel=1)184 mapping.addIrq(pic, index=4, isrtype='ISR_CMA', channel=0)185 mapping.addIrq(pic, index=5, isrtype='ISR_CMA', channel=1)186 mapping.addIrq(pic, index=6, isrtype='ISR_CMA', channel=2)187 mapping.addIrq(pic, index=7, isrtype='ISR_CMA', channel=3)188 mapping.addIrq(pic, index=8, isrtype='ISR_BDV', channel=0)189 190 for i in xrange(nb_ttys):191 mapping.addIrq(pic, index=16+i, isrtype='ISR_TTY_RX', channel=i)192 197 193 198 # hardware components replicated in all clusters … … 198 203 mapping.addRam('RAM', base=ram_base + offset, size=ram_size) 199 204 200 mapping.addPeriph('MMC', base=mmc_base + offset, size=mmc_size,201 ptype='MMC')202 203 205 mapping.addPeriph('DROM', base=drom_base + offset, size=drom_size, 204 206 ptype='DROM') 207 208 mmc = mapping.addPeriph('MMC', base=mmc_base + offset, size=mmc_size, 209 ptype='MMC') 205 210 206 211 dma = mapping.addPeriph('DMA', base=dma_base + offset, … … 214 219 215 220 # MMC IRQ replicated in all clusters 216 mapping.addIrq(xcu, index=0, isrtype='ISR_MMC')221 mapping.addIrq(xcu, index=0, src=mmc, isrtype='ISR_MMC') 217 222 218 223 # DMA IRQ replicated in all clusters 219 224 for i in xrange(dma.channels): 220 mapping.addIrq(xcu, index=1+i, isrtype='ISR_DMA', 221 channel=i) 225 mapping.addIrq(xcu, index=1+i, src=dma, isrtype='ISR_DMA', channel=i) 222 226 223 227 # processors … … 374 378 with open(hard_path, "w") as hard_config: 375 379 hard_config.write(mapping.hard_config()) 376 with open(dts_path, "w") as linux_dts: 377 linux_dts.write(mapping.linux_dts()) 380 381 if dts_path != None: 382 with open(dts_path, "w") as linux_dts: 383 linux_dts.write(mapping.linux_dts()) 378 384 379 385 ################################# platform test ################################
Note: See TracChangeset
for help on using the changeset viewer.