- Timestamp:
- Jul 10, 2014, 2:35:05 PM (10 years ago)
- Location:
- branches/reconfiguration/platforms/tsar_generic_iob
- Files:
-
- 10 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/reconfiguration/platforms/tsar_generic_iob/arch.py
r747 r748 8 8 # author : Alain Greiner 9 9 ####################################################################################### 10 # This file contains a mapping generator for the "tsar_generic_iob" platform. 10 # This file contains a mapping generator for the "tsar_generic_iob" platform. 11 11 # This includes both the hardware architecture (clusters, processors, peripherals, 12 12 # physical space segmentation) and the mapping of all kernel objects (global vsegs). … … 42 42 43 43 nb_ttys = 1 44 nb_nics = 2 44 nb_nics = 2 45 45 fbf_width = 1024 46 46 x_io = 0 … … 53 53 peri_increment = 0x10000 54 54 distributed_ptabs = True 55 55 56 56 ### parameters checking 57 57 58 58 assert( nb_procs <= 4 ) 59 59 60 assert( (x_size == 1) or (x_size == 2) or (x_size == 4) 60 assert( (x_size == 1) or (x_size == 2) or (x_size == 4) 61 61 or (y_size == 8) or (x_size == 16) ) 62 62 63 assert( (y_size == 1) or (y_size == 2) or (y_size == 4) 63 assert( (y_size == 1) or (y_size == 2) or (y_size == 4) 64 64 or (y_size == 8) or (y_size == 16) ) 65 65 … … 70 70 71 71 platform_name = 'tsar_iob_%d_%d_%d' % ( x_size, y_size, nb_procs ) 72 72 73 73 ### define physical segments 74 74 75 ram_base = 0x0000000000 76 ram_size = 0x4000000 # 64 Mbytes 77 78 xcu_base = 0x00B0000000 79 xcu_size = 0x1000 # 4 Kbytes 80 81 dma_base = 0x00B1000000 82 dma_size = 0x1000 * nb_procs # 4 Kbytes * nb_procs 83 84 mmc_base = 0x00B2000000 85 mmc_size = 0x1000 # 4 Kbytes 75 ram_base = 0x0000000000 76 ram_size = 0x4000000 # 64 Mbytes 77 78 xcu_base = 0x00B0000000 79 xcu_size = 0x1000 # 4 Kbytes 80 81 dma_base = 0x00B1000000 82 dma_size = 0x1000 * nb_procs # 4 Kbytes * nb_procs 83 84 mmc_base = 0x00B2000000 85 mmc_size = 0x1000 # 4 Kbytes 86 87 rom_base = 0x00BFC00000 88 rom_size = 0x8000 # 32 Kbytes 86 89 87 90 offset_io = ((x_io << y_width) + y_io) << (paddr_width - x_width - y_width) … … 106 109 107 110 iob_base = 0x00BE000000 + offset_io 108 iob_size = 0x1000 # 4kbytes 109 110 rom_base = 0x00BFC00000 + offset_io 111 rom_size = 0x4000 # 16 Kbytes 111 iob_size = 0x1000 # 4 kbytes 112 113 ### GIET_VM specifics virtual segments 112 114 113 115 ### define bootloader vsegs base addresses … … 117 119 118 120 boot_code_vbase = 0x00040000 # ident 119 boot_code_size = 0x00020000 # 128 Kbytes 120 121 boot_code_size = 0x00020000 # 128 Kbytes 122 121 123 boot_data_vbase = 0x00060000 # ident 122 124 boot_data_size = 0x00010000 # 64 Kbytes … … 125 127 boot_buffer_size = 0x00060000 # 384 Kbytes 126 128 127 boot_stack_vbase = 0x0 00D0000 # ident128 boot_stack_size = 0x00 050000 # 320 Kbytes129 boot_stack_vbase = 0x03F00000 # ident 130 boot_stack_size = 0x00100000 # 1 Mbytes 129 131 130 132 ### define kernel vsegs base addresses 131 133 132 kernel_code_vbase = 0x80000000 134 kernel_code_vbase = 0x80000000 133 135 kernel_code_size = 0x00020000 # 128 Kbytes 134 136 … … 147 149 ### create mapping 148 150 149 mapping = Mapping( name = platform_name, 150 x_size = x_size, 151 y_size = y_size, 152 procs_max = nb_procs, 153 x_width = x_width, 154 y_width = y_width, 155 paddr_width = paddr_width, 156 coherence = True, 157 irq_per_proc = irq_per_proc, 158 use_ramdisk = use_ramdisk, 159 x_io = x_io, 151 mapping = Mapping( name = platform_name, 152 x_size = x_size, 153 y_size = y_size, 154 procs_max = nb_procs, 155 x_width = x_width, 156 y_width = y_width, 157 paddr_width = paddr_width, 158 coherence = True, 159 irq_per_proc = irq_per_proc, 160 use_ramdisk = use_ramdisk, 161 x_io = x_io, 160 162 y_io = y_io, 161 peri_increment = peri_increment, 162 ram_base = ram_base, 163 ram_size = ram_size ) 163 peri_increment = peri_increment, 164 ram_base = ram_base, 165 ram_size = ram_size ) 164 166 165 167 ### external peripherals (accessible in cluster[0,0] only for this mapping) … … 171 173 tty = mapping.addPeriph( 'TTY', base = tty_base, size = tty_size, ptype = 'TTY', channels = nb_ttys ) 172 174 173 nic = mapping.addPeriph( 'NIC', base = nic_base, size = nic_size, ptype = 'NIC', channels = nb_nics ) 175 nic = mapping.addPeriph( 'NIC', base = nic_base, size = nic_size, ptype = 'NIC', channels = nb_nics ) 174 176 175 177 cma = mapping.addPeriph( 'CMA', base = cma_base, size = cma_size, ptype = 'CMA', channels = 2*nb_nics ) 176 178 177 179 fbf = mapping.addPeriph( 'FBF', base = fbf_base, size = fbf_size, ptype = 'FBF', arg = fbf_width ) 178 179 rom = mapping.addPeriph( 'ROM', base = rom_base, size = rom_size, ptype = 'ROM' )180 180 181 181 pic = mapping.addPeriph( 'PIC', base = pic_base, size = pic_size, ptype = 'PIC', channels = 32 ) … … 196 196 mapping.addIrq( pic, index = 9, isrtype = 'ISR_TTY_RX', channel = 0 ) 197 197 198 ### hardware components replicated in all clusters 198 ### hardware components replicated in all clusters 199 199 200 200 for x in xrange( x_size ): … … 205 205 ram = mapping.addRam( 'RAM', base = ram_base + offset, size = ram_size ) 206 206 207 mmc = mapping.addPeriph( 'MMC', base = mmc_base + offset, size = mmc_size, 207 mmc = mapping.addPeriph( 'MMC', base = mmc_base + offset, size = mmc_size, 208 208 ptype = 'MMC' ) 209 209 210 dma = mapping.addPeriph( 'DMA', base = dma_base + offset, size = dma_size, 211 ptype = 'DMA', channels = nb_procs ) 212 213 xcu = mapping.addPeriph( 'XCU', base = xcu_base + offset, size = xcu_size, 210 dma = mapping.addPeriph( 'DMA', base = dma_base + offset, size = dma_size, 211 ptype = 'DMA', channels = nb_procs ) 212 213 xcu = mapping.addPeriph( 'XCU', base = xcu_base + offset, size = xcu_size, 214 214 ptype = 'XCU', channels = nb_procs * irq_per_proc, arg = 16 ) 215 216 rom = mapping.addPeriph( 'ROM', base = rom_base + offset, size = rom_size, 217 ptype = 'ROM' ) 215 218 216 219 # MMC IRQ replicated in all clusters … … 221 224 mapping.addProc( x, y, p ) 222 225 223 ### global vsegs for boot_loader / identity mapping 224 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_buffer', boot_buffer_vbase, boot_buffer_size, 238 'C_W_', vtype = 'BUFFER', x = 0, y = 0, pseg = 'RAM', 239 identity = True ) 240 241 mapping.addGlobal( 'seg_boot_stack', boot_stack_vbase, boot_stack_size, 242 'C_W_', vtype = 'BUFFER', x = 0, y = 0, pseg = 'RAM', 243 identity = True ) 244 245 ### the code global vsegs for kernel can be replicated in all clusters 246 ### if the page tables are distributed in all clusters. 226 ### global vsegs for boot_loader / identity mapping 227 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 247 244 248 245 if distributed_ptabs: … … 261 258 mapping.addGlobal( 'seg_kernel_code', kernel_code_vbase, kernel_code_size, 262 259 'CXW_', vtype = 'ELF', x = 0 , y = 0 , pseg = 'RAM', 263 binpath = 'build/kernel/kernel.elf', local = False)260 binpath = 'build/kernel/kernel.elf' ) 264 261 265 262 mapping.addGlobal( 'seg_kernel_init', kernel_init_vbase, kernel_init_size, 266 263 'CXW_', vtype = 'ELF', x = 0 , y = 0 , pseg = 'RAM', 267 binpath = 'build/kernel/kernel.elf', local = False ) 268 269 ### shared global vsegs for kernel 270 271 mapping.addGlobal( 'seg_kernel_data', kernel_data_vbase, kernel_data_size, 272 'C_W_', vtype = 'ELF', x = 0, y = 0, pseg = 'RAM', 273 binpath = 'build/kernel/kernel.elf', local = False ) 274 275 mapping.addGlobal( 'seg_kernel_uncdata', kernel_uncdata_vbase, kernel_uncdata_size, 276 '__W_', vtype = 'ELF', x = 0, y = 0, pseg = 'RAM', 277 binpath = 'build/kernel/kernel.elf', local = False ) 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' ) 278 271 279 272 ### global vsegs for external peripherals / identity mapping 280 273 281 mapping.addGlobal( 'seg_iob', iob_base, iob_size, '__W_', 282 vtype = 'PERI', x = 0, y = 0, pseg = 'IOB', 283 identity = True ) 284 285 mapping.addGlobal( 'seg_bdv', bdv_base, bdv_size, '__W_', 286 vtype = 'PERI', x = 0, y = 0, pseg = 'BDV', 287 identity = True ) 288 289 mapping.addGlobal( 'seg_tty', tty_base, tty_size, '__W_', 290 vtype = 'PERI', x = 0, y = 0, pseg = 'TTY', 291 identity = True ) 292 293 mapping.addGlobal( 'seg_nic', nic_base, nic_size, '__W_', 294 vtype = 'PERI', x = 0, y = 0, pseg = 'NIC', 295 identity = True ) 296 297 mapping.addGlobal( 'seg_cma', cma_base, cma_size, '__W_', 298 vtype = 'PERI', x = 0, y = 0, pseg = 'CMA', 299 identity = True ) 300 301 mapping.addGlobal( 'seg_fbf', fbf_base, fbf_size, '__W_', 302 vtype = 'PERI', x = 0, y = 0, pseg = 'FBF', 303 identity = True ) 304 305 mapping.addGlobal( 'seg_pic', pic_base, pic_size, '__W_', 306 vtype = 'PERI', x = 0, y = 0, pseg = 'PIC', 307 identity = True ) 308 309 mapping.addGlobal( 'seg_rom', rom_base, rom_size, 'CXW_', 310 vtype = 'PERI', x = 0, y = 0, pseg = 'ROM', 311 identity = True ) 312 313 ### global vsegs for internal peripherals, and for schedulers 274 mapping.addGlobal( 'seg_iob', iob_base, iob_size, '__W_', 275 vtype = 'PERI', x = 0, y = 0, pseg = 'IOB', identity = True ) 276 277 mapping.addGlobal( 'seg_bdv', bdv_base, bdv_size, '__W_', 278 vtype = 'PERI', x = 0, y = 0, pseg = 'BDV', identity = True ) 279 280 mapping.addGlobal( 'seg_tty', tty_base, tty_size, '__W_', 281 vtype = 'PERI', x = 0, y = 0, pseg = 'TTY', identity = True ) 282 283 mapping.addGlobal( 'seg_nic', nic_base, nic_size, '__W_', 284 vtype = 'PERI', x = 0, y = 0, pseg = 'NIC', identity = True ) 285 286 mapping.addGlobal( 'seg_cma', cma_base, cma_size, '__W_', 287 vtype = 'PERI', x = 0, y = 0, pseg = 'CMA', identity = True ) 288 289 mapping.addGlobal( 'seg_fbf', fbf_base, fbf_size, '__W_', 290 vtype = 'PERI', x = 0, y = 0, pseg = 'FBF', identity = True ) 291 292 mapping.addGlobal( 'seg_pic', pic_base, pic_size, '__W_', 293 vtype = 'PERI', x = 0, y = 0, pseg = 'PIC', identity = True ) 294 295 ### global vsegs for internal peripherals, and for schedulers 314 296 ### name is indexed by (x,y) / vbase address is incremented by (cluster_xy * peri_increment) 315 297 … … 319 301 offset = cluster_xy * peri_increment 320 302 303 mapping.addGlobal( 'seg_rom_%d_%d' %(x,y), rom_base + offset, rom_size, 304 'CX__', vtype = 'PERI' , x = x , y = y , pseg = 'ROM' ) 305 321 306 mapping.addGlobal( 'seg_xcu_%d_%d' %(x,y), xcu_base + offset, xcu_size, 322 307 '__W_', vtype = 'PERI' , x = x , y = y , pseg = 'XCU' ) … … 348 333 349 334 # print mapping.giet_vsegs() 350 335 351 336 352 337 # Local Variables: -
branches/reconfiguration/platforms/tsar_generic_iob/top.cpp
r747 r748 9 9 // an external bus (i.e. Hypertransport) to access 7 external peripherals: 10 10 // 11 // - BROM : boot ROM12 11 // - FBUF : Frame Buffer 13 12 // - MTTY : multi TTY (one channel) … … 44 43 // - IOPIC HWI[8] connected to IRQ_BDEV 45 44 // - IOPIC HWI[9] connected to IRQ_TTY_RX[0] 45 // - IOPIC HWI[31:9] unused (grounded) 46 46 // 47 47 // Besides the external peripherals, each cluster contains one XICU component, … … 228 228 //////////////////////i///////////////////////////////////// 229 229 230 #define MAX_FROZEN_CYCLES 200000 00230 #define MAX_FROZEN_CYCLES 200000 231 231 232 232 ///////////////////////////////////////////////////////// … … 276 276 #define INT_XICU_TGT_ID 1 277 277 #define INT_MDMA_TGT_ID 2 278 #define INT_IOBX_TGT_ID 3 278 #define INT_BROM_TGT_ID 3 279 #define INT_IOBX_TGT_ID 4 279 280 280 281 #define INT_PROC_INI_ID 0 // from 0 to (NB_PROCS_MAX-1) … … 299 300 #define IOX_MNIC_TGT_ID 2 300 301 #define IOX_CDMA_TGT_ID 3 301 #define IOX_BROM_TGT_ID 4 302 #define IOX_MTTY_TGT_ID 5 303 #define IOX_IOPI_TGT_ID 6 304 #define IOX_IOB0_TGT_ID 7 305 #define IOX_IOB1_TGT_ID 8 302 #define IOX_MTTY_TGT_ID 4 303 #define IOX_IOPI_TGT_ID 5 304 #define IOX_IOB0_TGT_ID 6 305 #define IOX_IOB1_TGT_ID 7 306 306 307 307 #define IOX_BDEV_INI_ID 0 … … 349 349 if ((strcmp(argv[n],"-NCYCLES") == 0) && (n+1<argc)) 350 350 { 351 ncycles = atoi(argv[n+1]);351 ncycles = strtol(argv[n+1], NULL, 0); 352 352 } 353 353 else if ((strcmp(argv[n],"-SOFT") == 0) && (n+1<argc) ) … … 358 358 { 359 359 debug_ok = true; 360 debug_from = atoi(argv[n+1]);360 debug_from = strtol(argv[n+1], NULL, 0); 361 361 } 362 362 else if ((strcmp(argv[n],"-DISK") == 0) && (n+1<argc) ) … … 366 366 else if ((strcmp(argv[n],"-MEMCID") == 0) && (n+1<argc) ) 367 367 { 368 debug_memc_id = atoi(argv[n+1]);368 debug_memc_id = strtol(argv[n+1], NULL, 0); 369 369 size_t x = debug_memc_id >> 4; 370 370 size_t y = debug_memc_id & 0xF; … … 377 377 else if ((strcmp(argv[n],"-XRAMID") == 0) && (n+1<argc) ) 378 378 { 379 debug_xram_id = atoi(argv[n+1]);379 debug_xram_id = strtol(argv[n+1], NULL, 0); 380 380 size_t x = debug_xram_id >> 4; 381 381 size_t y = debug_xram_id & 0xF; … … 388 388 else if ((strcmp(argv[n],"-IOB") == 0) && (n+1<argc) ) 389 389 { 390 debug_iob = atoi(argv[n+1]);390 debug_iob = strtol(argv[n+1], NULL, 0); 391 391 } 392 392 else if ((strcmp(argv[n],"-PROCID") == 0) && (n+1<argc) ) 393 393 { 394 debug_proc_id = atoi(argv[n+1]);394 debug_proc_id = strtol(argv[n+1], NULL, 0); 395 395 size_t cluster_xy = debug_proc_id / NB_PROCS_MAX ; 396 396 size_t x = cluster_xy >> 4; … … 404 404 else if ((strcmp(argv[n], "-THREADS") == 0) && ((n+1) < argc)) 405 405 { 406 threads_nr = atoi(argv[n+1]);406 threads_nr = strtol(argv[n+1], NULL, 0); 407 407 threads_nr = (threads_nr < 1) ? 1 : threads_nr; 408 408 } 409 409 else if ((strcmp(argv[n], "-FROZEN") == 0) && (n+1 < argc)) 410 410 { 411 frozen_cycles = atoi(argv[n+1]);411 frozen_cycles = strtol(argv[n+1], NULL, 0); 412 412 } 413 413 else if ((strcmp(argv[n], "-PERIOD") == 0) && (n+1 < argc)) 414 414 { 415 debug_period = atoi(argv[n+1]);415 debug_period = strtol(argv[n+1], NULL, 0); 416 416 } 417 417 else … … 436 436 } 437 437 438 // Activate Distributed Boot (set by environment variable) 439 // When this is activated, every processor boots with its instruction and data 440 // physical address extension register initialized to its cluster index 441 // (X_LOCAL, Y_LOCAL). To support this feature, a distributed ROM is 442 // implemented in each cluster. 443 444 const bool distributed_boot = (getenv("DISTRIBUTED_BOOT") != NULL); 445 438 446 // checking hardware parameters 439 447 assert( (XMAX <= 16) and … … 466 474 << " - RAM_LATENCY = " << XRAM_LATENCY << std::endl 467 475 << " - MAX_FROZEN = " << frozen_cycles << std::endl 476 << " - DIST_BOOT = " << distributed_boot << std::endl 468 477 << " - DEBUG_PROCID = " << debug_proc_id << std::endl 469 478 << " - DEBUG_MEMCID = " << debug_memc_id << std::endl … … 544 553 IntTab(cluster(x,y), INT_MDMA_TGT_ID), not cacheable)); 545 554 555 std::ostringstream sbrom; 556 sbrom << "int_seg_brom_" << x << "_" << y; 557 maptab_int.add(Segment(sbrom.str(), SEG_ROM_BASE+offset, SEG_ROM_SIZE, 558 IntTab(cluster(x,y), INT_BROM_TGT_ID), cacheable)); 559 546 560 // the following segments are only defined in cluster_iob0 or in cluster_iob1 547 561 … … 572 586 maptab_int.add(Segment(snic.str(), SEG_NIC_BASE+offset, SEG_NIC_SIZE, 573 587 IntTab(cluster(x,y), INT_IOBX_TGT_ID), not cacheable)); 574 575 std::ostringstream srom;576 srom << "int_seg_brom_" << x << "_" << y;577 maptab_int.add(Segment(srom.str(), SEG_ROM_BASE+offset, SEG_ROM_SIZE,578 IntTab(cluster(x,y), INT_IOBX_TGT_ID), cacheable ));579 588 580 589 std::ostringstream sdma; … … 698 707 maptab_iox.add(Segment("iox_seg_cdma_0", SEG_CMA_BASE + iob0_base, SEG_CMA_SIZE, 699 708 IntTab(0, IOX_CDMA_TGT_ID), false)); 700 maptab_iox.add(Segment("iox_seg_brom_0", SEG_ROM_BASE + iob0_base, SEG_ROM_SIZE,701 IntTab(0, IOX_BROM_TGT_ID), false));702 709 maptab_iox.add(Segment("iox_seg_iopi_0", SEG_PIC_BASE + iob0_base, SEG_PIC_SIZE, 703 710 IntTab(0, IOX_IOPI_TGT_ID), false)); … … 718 725 maptab_iox.add(Segment("iox_seg_cdma_1", SEG_CMA_BASE + iob1_base, SEG_CMA_SIZE, 719 726 IntTab(0, IOX_CDMA_TGT_ID), false)); 720 maptab_iox.add(Segment("iox_seg_brom_1", SEG_ROM_BASE + iob1_base, SEG_ROM_SIZE,721 IntTab(0, IOX_BROM_TGT_ID), false));722 727 maptab_iox.add(Segment("iox_seg_iopi_1", SEG_PIC_BASE + iob1_base, SEG_PIC_SIZE, 723 728 IntTab(0, IOX_IOPI_TGT_ID), false)); … … 813 818 VciSignals<vci_param_ext> signal_vci_tgt_fbuf("signal_vci_tgt_fbuf"); 814 819 VciSignals<vci_param_ext> signal_vci_tgt_mnic("signal_vci_tgt_mnic"); 815 VciSignals<vci_param_ext> signal_vci_tgt_brom("signal_vci_tgt_brom");816 820 VciSignals<vci_param_ext> signal_vci_tgt_bdev("signal_vci_tgt_bdev"); 817 821 VciSignals<vci_param_ext> signal_vci_tgt_cdma("signal_vci_tgt_cdma"); … … 901 905 902 906 const size_t nb_iox_initiators = (cluster_iob0 != cluster_iob1) ? 5 : 4; 903 const size_t nb_iox_targets = (cluster_iob0 != cluster_iob1) ? 9 : 8;907 const size_t nb_iox_targets = (cluster_iob0 != cluster_iob1) ? 8 : 7; 904 908 905 909 // IOX network … … 909 913 nb_iox_targets, 910 914 nb_iox_initiators ); 911 // boot ROM 912 VciSimpleRom<vci_param_ext>* brom; 913 brom = new VciSimpleRom<vci_param_ext>( "brom", 914 IntTab(0, IOX_BROM_TGT_ID), 915 maptab_iox, 916 loader ); 915 917 916 // Network Controller 918 917 VciMultiNic<vci_param_ext>* mnic; … … 976 975 IntTab(0, IOX_IOPI_TGT_ID), 977 976 32 ); // number of input HWI 977 978 978 // Clusters 979 979 TsarIobCluster<vci_param_int, … … 1041 1041 INT_XICU_TGT_ID, 1042 1042 INT_MDMA_TGT_ID, 1043 INT_BROM_TGT_ID, 1043 1044 INT_IOBX_TGT_ID, 1044 1045 … … 1065 1066 XCU_NB_INPUTS, 1066 1067 1068 distributed_boot, 1069 1067 1070 loader, 1068 1071 … … 1100 1103 iox_network->p_to_tgt[IOX_FBUF_TGT_ID] (signal_vci_tgt_fbuf); 1101 1104 iox_network->p_to_tgt[IOX_MNIC_TGT_ID] (signal_vci_tgt_mnic); 1102 iox_network->p_to_tgt[IOX_BROM_TGT_ID] (signal_vci_tgt_brom);1103 1105 iox_network->p_to_tgt[IOX_BDEV_TGT_ID] (signal_vci_tgt_bdev); 1104 1106 iox_network->p_to_tgt[IOX_CDMA_TGT_ID] (signal_vci_tgt_cdma); … … 1138 1140 1139 1141 std::cout << " - MNIC connected" << std::endl; 1140 1141 // BROM connexion1142 brom->p_clk (signal_clk);1143 brom->p_resetn (signal_resetn);1144 brom->p_vci (signal_vci_tgt_brom);1145 1146 std::cout << " - BROM connected" << std::endl;1147 1142 1148 1143 // MTTY connexion … … 1423 1418 1424 1419 // Monitor a specific address for one L2 cache 1425 // clusters[0][0]->memc->cache_monitor( 0x1 542c0ULL, true ); // single word1420 // clusters[0][0]->memc->cache_monitor( 0x170000ULL); 1426 1421 1427 1422 // Monitor a specific address for one XRAM … … 1440 1435 size_t x = cluster_xy >> 4; 1441 1436 size_t y = cluster_xy & 0xF; 1442 1443 clusters[x][y]->proc[l]->print_trace( 0x40);1437 1438 clusters[x][y]->proc[l]->print_trace(1); 1444 1439 std::ostringstream proc_signame; 1445 1440 proc_signame << "[SIG]PROC_" << x << "_" << y << "_" << l ; … … 1451 1446 clusters[x][y]->signal_int_vci_tgt_xicu.print_trace(xicu_signame.str()); 1452 1447 1453 clusters[x][y]->mdma->print_trace(); 1454 std::ostringstream mdma_signame; 1455 mdma_signame << "[SIG]MDMA_" << x << "_" << y; 1456 clusters[x][y]->signal_int_vci_tgt_mdma.print_trace(mdma_signame.str()); 1457 1458 // local interrupts in cluster(x,y) 1459 if( clusters[x][y]->signal_irq_memc.read() ) 1460 std::cout << "### IRQ_MMC_" << std::dec << x << "_" << y 1461 << " ACTIVE" << std::endl; 1462 1463 for ( size_t c = 0 ; c < NB_DMA_CHANNELS ; c++ ) 1464 { 1465 if( clusters[x][y]->signal_irq_mdma[c].read() ) 1466 std::cout << "### IRQ_DMA_" << std::dec << x << "_" << y << "_" << c 1467 << " ACTIVE" << std::endl; 1468 } 1469 1470 for ( size_t c = 0 ; c < NB_PROCS_MAX ; c++ ) 1471 { 1472 if( clusters[x][y]->signal_proc_it[c].read() ) 1473 std::cout << "### IRQ_PROC_" << std::dec << x << "_" << y << "_" << c 1474 << " ACTIVE" << std::endl; 1475 } 1448 // clusters[x][y]->mdma->print_trace(); 1449 // std::ostringstream mdma_signame; 1450 // mdma_signame << "[SIG]MDMA_" << x << "_" << y; 1451 // clusters[x][y]->signal_int_vci_tgt_mdma.print_trace(mdma_signame.str()); 1452 1453 if( clusters[x][y]->signal_proc_it[l].read() ) 1454 std::cout << "### IRQ_PROC_" << std::dec 1455 << x << "_" << y << "_" << l << " ACTIVE" << std::endl; 1476 1456 } 1477 1457 … … 1521 1501 // clusters[0][0]->signal_ram_vci_ini_iobx.print_trace( "[SIG]IOB0_RAM_INI"); 1522 1502 1523 //signal_vci_ini_iob0.print_trace("[SIG]IOB0_IOX_INI");1524 //signal_vci_tgt_iob0.print_trace("[SIG]IOB0_IOX_TGT");1503 signal_vci_ini_iob0.print_trace("[SIG]IOB0_IOX_INI"); 1504 signal_vci_tgt_iob0.print_trace("[SIG]IOB0_IOX_TGT"); 1525 1505 1526 1506 // cdma->print_trace(); … … 1528 1508 // signal_vci_ini_cdma.print_trace("[SIG]IOX_CDMA_INI"); 1529 1509 1530 // brom->print_trace();1531 // signal_vci_tgt_brom.print_trace("[SIG]IOX_BROM_TGT");1532 1533 1510 // mtty->print_trace(); 1534 1511 // signal_vci_tgt_mtty.print_trace("[SIG]IOX_MTTY_TGT"); … … 1538 1515 signal_vci_ini_bdev.print_trace("[SIG]BDEV_INI"); 1539 1516 1540 //mnic->print_trace();1541 //signal_vci_tgt_mnic.print_trace("[SIG]MNIC_TGT");1517 mnic->print_trace(); 1518 signal_vci_tgt_mnic.print_trace("[SIG]MNIC_TGT"); 1542 1519 1543 1520 // fbuf->print_trace(); -
branches/reconfiguration/platforms/tsar_generic_iob/top.desc
r747 r748 28 28 uses = [ 29 29 # cluster 30 Uses('caba: tsar_iob_cluster',30 Uses('caba:reconfiguration:tsar_iob_cluster', 31 31 vci_data_width_int = vci_cell_size_int, 32 32 vci_data_width_ext = vci_cell_size_ext, -
branches/reconfiguration/platforms/tsar_generic_iob/tsar_iob_cluster/caba/metadata/tsar_iob_cluster.sd
r747 r748 2 2 # -*- python -*- 3 3 4 Module('caba: tsar_iob_cluster',4 Module('caba:reconfiguration:tsar_iob_cluster', 5 5 classname = 'soclib::caba::TsarIobCluster', 6 6 … … 48 48 49 49 Uses('caba:vci_multi_dma', 50 cell_size = parameter.Reference('vci_data_width_int')), 51 52 Uses('caba:vci_simple_rom', 50 53 cell_size = parameter.Reference('vci_data_width_int')), 51 54 -
branches/reconfiguration/platforms/tsar_generic_iob/tsar_iob_cluster/caba/source/include/tsar_iob_cluster.h
r747 r748 32 32 #include "vci_cc_vcache_wrapper.h" 33 33 #include "vci_io_bridge.h" 34 #include "vci_simple_rom.h" 34 35 35 36 namespace soclib { namespace caba { … … 94 95 VciSignals<vci_param_int> signal_int_vci_tgt_xicu; 95 96 VciSignals<vci_param_int> signal_int_vci_tgt_mdma; 97 VciSignals<vci_param_int> signal_int_vci_tgt_brom; 96 98 VciSignals<vci_param_int> signal_int_vci_tgt_iobx; 97 99 … … 146 148 VciMultiDma<vci_param_int>* mdma; 147 149 150 VciSimpleRom<vci_param_int>* brom; 151 148 152 VciLocalCrossbar<vci_param_int>* int_xbar_d; 149 153 … … 205 209 size_t int_xicu_tgt_id, 206 210 size_t int_mdma_tgt_id, 211 size_t int_brom_tgt_id, 207 212 size_t int_iobx_tgt_id, 208 213 size_t int_proc_ini_id, … … 227 232 size_t xcu_nb_inputs, 228 233 234 bool distboot, 235 229 236 const Loader &loader, // loader for XRAM 230 237 -
branches/reconfiguration/platforms/tsar_generic_iob/tsar_iob_cluster/caba/source/src/tsar_iob_cluster.cpp
r747 r748 50 50 size_t int_xicu_tgt_id, // local index 51 51 size_t int_mdma_tgt_id, // local index 52 size_t int_brom_tgt_id, // local index 52 53 size_t int_iobx_tgt_id, // local index 53 54 … … 73 74 size_t xcu_nb_inputs, 74 75 75 const Loader &loader, 76 bool distboot, 77 78 const Loader &loader, 76 79 77 80 uint32_t frozen_cycles, … … 137 140 debug_start_cycle, 138 141 proc_debug_ok); 142 143 // initialize physical address extension with cluster ID when using 144 // distributed boot 145 if (distboot) 146 { 147 proc[p]->set_dcache_paddr_ext_reset(cluster_id); 148 proc[p]->set_icache_paddr_ext_reset(cluster_id); 149 } 139 150 } 140 151 … … 193 204 nb_dmas); // number of IRQs 194 205 206 /////////// DISTRIBUTED BOOT ROM 207 std::ostringstream s_brom; 208 s_brom << "brom_" << x_id << "_" << y_id; 209 brom = new VciSimpleRom<vci_param_int>( 210 s_brom.str().c_str(), 211 IntTab(cluster_id, int_brom_tgt_id), 212 mt_int, 213 loader, 214 x_width + y_width); // msb drop bits 215 195 216 /////////// Direct LOCAL_XBAR(S) 196 217 size_t nb_direct_initiators = is_io ? nb_procs + 2 : nb_procs + 1; 197 size_t nb_direct_targets = is_io ? 4 : 3;218 size_t nb_direct_targets = is_io ? 5 : 4; 198 219 199 220 std::ostringstream s_int_xbar_d; … … 432 453 int_xbar_d->p_to_target[int_xicu_tgt_id] (signal_int_vci_tgt_xicu); 433 454 int_xbar_d->p_to_target[int_mdma_tgt_id] (signal_int_vci_tgt_mdma); 455 int_xbar_d->p_to_target[int_brom_tgt_id] (signal_int_vci_tgt_brom); 434 456 int_xbar_d->p_to_initiator[int_mdma_ini_id] (signal_int_vci_ini_mdma); 435 457 for (size_t p = 0; p < nb_procs; p++) … … 550 572 mdma->p_irq[i] (signal_irq_mdma[i]); 551 573 574 /////////////////////////////////// BROM 575 brom->p_clk (this->p_clk); 576 brom->p_resetn (this->p_resetn); 577 brom->p_vci (signal_int_vci_tgt_brom); 578 552 579 //////////////////////////// RAM network CMD & RSP routers 553 580 ram_router_cmd->p_clk (this->p_clk); … … 626 653 627 654 // Local Variables: 628 // tab-width: 3629 // c-basic-offset: 3655 // tab-width: 4 656 // c-basic-offset: 4 630 657 // c-file-offsets:((innamespace . 0)(inline-open . 0)) 631 658 // indent-tabs-mode: nil 632 659 // End: 633 660 634 // vim: filetype=cpp:expandtab:shiftwidth= 3:tabstop=3:softtabstop=3635 661 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4 662
Note: See TracChangeset
for help on using the changeset viewer.