Changeset 717
- Timestamp:
- Jun 23, 2014, 4:02:53 PM (11 years ago)
- Location:
- branches/fault_tolerance/platform/tsar_generic_iob
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/fault_tolerance/platform/tsar_generic_iob/Makefile
r658 r717 1 SOCLIB_CC := soclib-cc 2 RM := rm -rf 3 CP := cp -f4 MAKE := make 5 TARGET := simul.x 6 ARGS ?= 1 ARGS ?= 2 SOCLIB_CC := soclib-cc 3 RM := rm -rf 4 CP := cp -f 5 MAKE := make 6 CONFIG_DIR := $(PWD)/conf 7 7 8 all: $(TARGET) preloader tags 8 TARGET := simul.x 9 10 all: $(TARGET) tags 9 11 10 12 # create simulator … … 13 15 SRCS += tsar_iob_cluster/caba/source/src/tsar_iob_cluster.cpp 14 16 INCS := tsar_iob_cluster/caba/source/include/tsar_iob_cluster.h 17 INCS += $(CONFIG_DIR)/hard_config.h 15 18 INCS += top.desc 16 19 INCS += soclib.conf 17 20 18 $(TARGET): $(SRCS) $(INCS) 21 $(TARGET): $(SRCS) $(INCS) soclib.conf 19 22 $(SOCLIB_CC) -P -p top.desc -I. -o simul.x 20 23 21 24 # create preloader 22 25 23 MESHSIZE := 4c1p24 PRELOADER_CONF := $(PWD)/conf/preloader_$(MESHSIZE)25 26 PRELOADER_PATH := $(TSARPATH)/trunk/softs/tsar_boot 26 PRELOADER_ARGS := "PLATFORM_DIR=$( PRELOADER_CONF) USE_DT=0 SOCLIB=1"27 PRELOADER_ARGS := "PLATFORM_DIR=$(CONFIG_DIR) USE_DT=0 SOCLIB=1" 27 28 PRELOADER_NAME ?= soft/soft.elf 28 29 … … 35 36 # run simulator 36 37 37 SIMULATOR_ARGS = -SOFT $(PRELOADER_NAME) 38 SIMULATOR_ARGS += -DISK soft/disk.dmg 39 SIMULATOR_ARGS += -XSIZE 2 -YSIZE 2 -NPROCS 1 38 SOFT ?= $(PRELOADER_NAME) 39 DISK ?= /dev/null 40 41 SIMULATOR_ARGS = -SOFT $(SOFT) 42 SIMULATOR_ARGS += -DISK $(DISK) 40 43 SIMULATOR_ARGS += $(ARGS) 41 44 42 run: $(TARGET) $( PRELOADER_NAME)45 run: $(TARGET) $(SOFT) 43 46 ./$< $(SIMULATOR_ARGS) 44 47 45 # create tags file with ctags 48 # create tags file with cscope 49 tags: cscope.out 46 50 47 tags:48 $(SOCLIB_CC) -p top.desc --tags --tags-type=c tags--tags-output=$@51 cscope.out: 52 $(SOCLIB_CC) -p top.desc --tags --tags-type=cscope --tags-output=$@ 49 53 50 54 # clean targets 51 55 52 56 clean: 57 $(SOCLIB_CC) -X 53 58 $(SOCLIB_CC) -x -p top.desc -I. 54 $(RM) *.o *.x tty* term*59 $(RM) *.o *.x mtty_* 55 60 56 61 clean-soft: 57 $(RM) $( PRELOADER_NAME)62 $(RM) $(SOFT) 58 63 59 64 clean-tags: … … 66 71 67 72 68 .PHONY: tags preloader clean clean-soft clean-preloader73 .PHONY: tags simul.x preloader clean clean-soft clean-preloader 69 74 -
branches/fault_tolerance/platform/tsar_generic_iob/soclib.conf
r652 r717 1 cflags = config.default.toolchain.cflags \ 2 + ['-Iconf'] \ 3 + ['-DUSE_OPENMP=0'] \ 4 # + ['-ggdb'] 5 1 6 config.default.toolchain.set( 2 "cflags", config.default.toolchain.cflags 3 # "cflags", config.default.toolchain.cflags + ['-ggdb'] 7 "cflags", cflags 4 8 ) 5 9 6 10 import os 7 11 tsar_path = os.environ['TSARPATH'] 12 config.addDescPath(tsar_path + "/trunk/lib") 13 config.addDescPath(tsar_path + "/trunk/communication") 14 config.addDescPath(tsar_path + "/trunk/modules/dspin_router_tsar") 15 config.addDescPath(tsar_path + "/trunk/modules/vci_io_bridge") 16 config.addDescPath(tsar_path + "/trunk/modules/vci_iox_network") 17 config.addDescPath(tsar_path + "/trunk/modules/vci_block_device_tsar") 8 18 config.addDescPath(tsar_path + "/branches/fault_tolerance/module") 9 19 config.addDescPath(tsar_path + "/branches/fault_tolerance/lib") 10 -
branches/fault_tolerance/platform/tsar_generic_iob/top.cpp
r695 r717 38 38 // (VCI ADDDRESS = 40 bits / VCI DATA width = 64 bits) 39 39 // 40 // The external peripherals IRQs are connected to the XICU component 41 // in cluster(0,0): therefore, the number of channels for the external 42 // peripherals (MTTY, MNIC, CDMA) is limited by the number of IRQ ports... 43 // 44 // In cluster(0,0), the XICU HWI input ports are connected as follow: 45 // - IRQ_IN[0] to IRQ_IN[7] grounded (reserved for PTI or SWI) 46 // - IRQ_IN[8] to IRQ_IN[9] are connected to 2 NIC_RX channels. 47 // - IRQ_IN[10] to IRQ_IN[11] are connected to 2 NIC_TX channels. 48 // - IRQ_IN[12] to IRQ_IN[15] are connected to 4 CDMA channels 49 // - IRQ_IN[16] to IRQ_IN[30] are connected to 15 TTY channels 50 // - IRQ_IN[31] is connected to BDEV 51 // In other clusters, the XICU HWI input ports are grounded. 40 // The external peripherals IRQs are connected to the XPIC component 41 // in IOX interconnect. 52 42 // 53 43 // All clusters are identical, but cluster(0,0) and cluster(XMAX-1,YMAX-1) … … 59 49 // - It uses two dspin_local_crossbar per cluster to implement the 60 50 // local interconnect correponding to the INT network. 61 // - It uses t wodspin_local_crossbar per cluster to implement the51 // - It uses three dspin_local_crossbar per cluster to implement the 62 52 // local interconnect correponding to the coherence INT network. 63 53 // - It uses two virtual_dspin_router per cluster to implement … … 68 58 // - It contains one vci_xicu and one vci_multi_dma per cluster. 69 59 // - It contains one vci_simple ram per cluster to model the L3 cache. 70 // 71 // The TsarIobCluster component is defined in files 72 // tsar_iob_cluster.* (with * = cpp, h, sd) 73 // 74 // The main hardware parameters must be defined in the hard_config.h file : 75 // - XMAX : number of clusters in a row (power of 2) 76 // - YMAX : number of clusters in a column (power of 2) 77 // - CLUSTER_SIZE : size of the segment allocated to a cluster 78 // - NB_PROCS_MAX : number of processors per cluster (power of 2) 79 // - NB_DMA_CHANNELS : number of DMA channels per cluster (< 9) 80 // - NB_TTY_CHANNELS : number of TTY channels in I/O network (< 16) 81 // - NB_NIC_CHANNELS : number of NIC channels in I/O network (< 9) 82 // 83 // Some secondary hardware parameters must be defined in this top.cpp file: 84 // - XRAM_LATENCY : external ram latency 85 // - MEMC_WAYS : L2 cache number of ways 86 // - MEMC_SETS : L2 cache number of sets 87 // - L1_IWAYS 88 // - L1_ISETS 89 // - L1_DWAYS 90 // - L1_DSETS 91 // - FBUF_X_SIZE : width of frame buffer (pixels) 92 // - FBUF_Y_SIZE : heigth of frame buffer (lines) 93 // - BDEV_SECTOR_SIZE : block size for block drvice 94 // - BDEV_IMAGE_NAME : file pathname for block device 95 // - NIC_RX_NAME : file pathname for NIC received packets 96 // - NIC_TX_NAME : file pathname for NIC transmited packets 97 // - NIC_TIMEOUT : max number of cycles before closing a container 60 // - It contains one vci_simple_rom per cluster which can be used for a 61 // distributed boot. 62 // - It contains one vci_multi_tty per cluster for debug purposes (number 63 // of channels can be 0). This TTY is mostly useful when using distributed 64 // boot. 98 65 // 99 66 // General policy for 40 bits physical address decoding: 100 67 // All physical segments base addresses are multiple of 1 Mbytes 101 68 // (=> the 24 LSB bits = 0, and the 16 MSB bits define the target) 102 // The (x_width + y_width) MSB bits (left aligned) define103 // the cluster index, and theLADR bits define the local index:69 // The (x_width + y_width) MSB bits define the cluster index, and the 70 // LADR bits define the local index: 104 71 // | X_ID | Y_ID |---| LADR | OFFSET | 105 72 // |x_width|y_width|---| 8 | 24 | … … 129 96 #include "vci_block_device_tsar.h" 130 97 #include "vci_framebuffer.h" 98 #include "vci_iopic.h" 131 99 #include "vci_iox_network.h" 132 100 … … 215 183 // All initiators are in the same indexing space (14 bits). 216 184 // The SRCID is structured in two fields: 217 // - The 10 MSB bits define the cluster index (left aligned)185 // - The 10 MSB bits define the cluster index 218 186 // - The 4 LSB bits define the local index. 219 187 // Two different initiators cannot have the same SRCID, but a given … … 234 202 #define MDMA_LOCAL_SRCID 0x8 235 203 #define IOBX_LOCAL_SRCID 0x9 236 #define MEMC_LOCAL_SRCID 0xA237 #define CDMA_LOCAL_SRCID 0xE // hard-coded in dspin_tsar238 #define BDEV_LOCAL_SRCID 0xF // hard-coded in dspin_tsar204 #define CDMA_LOCAL_SRCID 0xA 205 #define BDEV_LOCAL_SRCID 0xB 206 #define XPIC_LOCAL_SRCID 0xC 239 207 240 208 /////////////////////////////////////////////////////////////////////// 241 // TGT_ID and INI_ID port indexing for I 0X local interconnect209 // TGT_ID and INI_ID port indexing for IOX local interconnect 242 210 /////////////////////////////////////////////////////////////////////// 243 211 244 #define IOX_IOB0_TGT_ID 0 // don't change this value 245 #define IOX_IOB1_TGT_ID 1 // don't change this value 246 #define IOX_FBUF_TGT_ID 2 247 #define IOX_BDEV_TGT_ID 3 248 #define IOX_MNIC_TGT_ID 4 249 #define IOX_CDMA_TGT_ID 5 250 #define IOX_MTTY_TGT_ID 6 251 252 #define IOX_IOB0_INI_ID 0 // Don't change this value 253 #define IOX_IOB1_INI_ID 1 // Don't change this value 254 #define IOX_BDEV_INI_ID 2 255 #define IOX_CDMA_INI_ID 3 212 #define IOX_FBUF_TGT_ID 0 213 #define IOX_BDEV_TGT_ID 1 214 #define IOX_MNIC_TGT_ID 2 215 #define IOX_CDMA_TGT_ID 3 216 #define IOX_MTTY_TGT_ID 4 217 #define IOX_XPIC_TGT_ID 5 218 #define IOX_IOB0_TGT_ID 6 219 #define IOX_IOB1_TGT_ID 7 220 221 #define IOX_BDEV_INI_ID 0 222 #define IOX_CDMA_INI_ID 1 223 #define IOX_XPIC_INI_ID 2 224 #define IOX_IOB0_INI_ID 3 225 #define IOX_IOB1_INI_ID 4 256 226 257 227 //////////////////////////////////////////////////////////////////////// … … 267 237 char nic_tx_name[256] = NIC_TX_NAME; // path: tx packets file 268 238 ssize_t threads_nr = 1; // simulator's threads 269 bool debug_ok = false; // trace activated239 bool debug_ok = false; 270 240 size_t debug_period = 1; // trace period 271 241 size_t debug_memc_id = 0xFFFFFFFF; // idx of traced memc … … 274 244 uint32_t debug_from = 0; // trace start cycle 275 245 uint32_t frozen_cycles = MAX_FROZEN_CYCLES; // monitoring frozen procs 246 bool distboot = false; // distributed boot 276 247 const size_t block_size = BDEV_SECTOR_SIZE; // disk block size 277 248 const size_t x_size = X_SIZE; … … 296 267 } 297 268 if ((strcmp(argv[n],"-DEBUG") == 0) && ((n+1) < argc) ) { 298 debug_ok 269 debug_ok = true; 299 270 debug_from = strtol(argv[n+1], NULL, 0); 300 271 continue; … … 334 305 continue; 335 306 } 336 337 std::cout << " Arguments are (key,value) couples.\n" 338 << " The order is not important.\n" 339 << " Accepted arguments are :\n\n" 340 << " -NCYCLES number of simulated_cycles\n" 341 << " -SOFT pathname for embedded soft\n" 342 << " -DISK pathname for disk image\n" 343 << " -DEBUG debug start cycle\n" 344 << " -MEMCID index of memc to trace\n" 345 << " -IOB debug IOBs if non_zero_value\n\n" 346 << " -PROCID index of proc to trace\n" 347 << " -THREADS simulator's threads number\n" 348 << " -FROZEN max number of frozen cycles\n" 349 << " -PERIOD number of cycles between trace\n\n"; 307 if ((strcmp(argv[n], "-DISTBOOT") == 0)) { 308 distboot = true; 309 continue; 310 } 311 312 std::cout 313 << "\nArguments are (key,value) couples." 314 << "\nThe order is not important." 315 << "\nAccepted arguments are :\n" 316 << "\n -NCYCLES number of simulated_cycles" 317 << "\n -SOFT pathname for embedded soft" 318 << "\n -DISK pathname for disk image" 319 << "\n -DEBUG debug start cycle" 320 << "\n -MEMCID index of memc to trace" 321 << "\n -IOB debug IOBs if non_zero_value" 322 << "\n -PROCID index of proc to trace" 323 << "\n -THREADS simulator's threads number" 324 << "\n -FROZEN max number of frozen cycles" 325 << "\n -PERIOD number of cycles between trace" 326 << "\n -DISTBOOT use distributed boot ROM" 327 << "\n (processors physical address extention is" 328 << "\n initialized with local cluster id)" 329 << std::endl; 330 350 331 exit(0); 351 332 } … … 358 339 "The NB_NIC_CHANNELS parameter must be 1" ); 359 340 360 std::cout << std::endl; 361 std::cout << " - X_SIZE = " << x_size << std::endl; 362 std::cout << " - Y_SIZE = " << y_size << std::endl; 363 std::cout << " - NB_PROCS = " << NB_PROCS << std::endl; 364 std::cout << " - NB_DMA_CHANNELS = " << NB_DMA_CHANNELS << std::endl; 365 std::cout << " - NB_TTY_CHANNELS = " << NB_TTY_CHANNELS << std::endl; 366 std::cout << " - NB_NIC_CHANNELS = " << NB_NIC_CHANNELS << std::endl; 367 std::cout << " - MEMC_WAYS = " << MEMC_WAYS << std::endl; 368 std::cout << " - MEMC_SETS = " << MEMC_SETS << std::endl; 369 std::cout << " - RAM_LATENCY = " << XRAM_LATENCY << std::endl; 370 std::cout << " - MAX_FROZEN = " << frozen_cycles << std::endl; 341 assert( (x_size > 0) and (y_size > 0) and 342 "Number of clusters on X and Y must be at least 1" ); 343 344 std::cout << "\n- X_SIZE = " << x_size 345 << "\n- Y_SIZE = " << y_size 346 << "\n- NB_PROCS = " << NB_PROCS 347 << "\n- NB_DMA_CHANNELS = " << NB_DMA_CHANNELS 348 << "\n- NB_TTY_CHANNELS = " << NB_TTY_CHANNELS 349 << "\n- NB_NIC_CHANNELS = " << NB_NIC_CHANNELS 350 << "\n- MEMC_WAYS = " << MEMC_WAYS 351 << "\n- MEMC_SETS = " << MEMC_SETS 352 << "\n- RAM_LATENCY = " << XRAM_LATENCY 353 << "\n- MAX_FROZEN = " << frozen_cycles 354 << "\n- DISTBOOT = " << distboot 355 << std::endl; 371 356 372 357 std::cout << std::endl; … … 409 394 size_t cluster_iob0 = cluster(0, 0); 410 395 size_t cluster_iob1 = cluster(x_size - 1, y_size - 1); 396 397 // using mono cluster configuration (only one IO bridge) ? 398 bool is_mono_cluster = ((x_size == 1) && (y_size == 1)); 411 399 412 400 ///////////////////////////////////////////////////////////////////// … … 507 495 IntTab(cluster(x,y), INT_IOBX_TGT_ID), 508 496 not cacheable)); 497 498 std::ostringstream spic; 499 sdma << "int_seg_xpic_" << x << "_" << y; 500 maptab_int.add(Segment(spic.str(), XPIC_BASE+offset, XPIC_SIZE, 501 IntTab(cluster(x,y), INT_IOBX_TGT_ID), 502 not cacheable)); 509 503 } 510 504 … … 515 509 IntTab(cluster(x,y), INT_MDMA_INI_ID)); 516 510 maptab_int.srcid_map(IntTab(cluster(x,y), IOBX_LOCAL_SRCID), 511 IntTab(cluster(x,y), INT_IOBX_INI_ID)); 512 maptab_int.srcid_map(IntTab(cluster(x,y), XPIC_LOCAL_SRCID), 517 513 IntTab(cluster(x,y), INT_IOBX_INI_ID)); 518 514 … … 535 531 MappingTable maptab_ram( 536 532 vci_address_width, 537 IntTab(X_WIDTH + Y_WIDTH, 16 - X_WIDTH - Y_WIDTH),533 IntTab(X_WIDTH + Y_WIDTH, 0), 538 534 IntTab(X_WIDTH + Y_WIDTH, vci_param_int::S - X_WIDTH - Y_WIDTH), 539 535 0x00FF000000); … … 547 543 sxram << "ext_seg_xram_" << x << "_" << y; 548 544 maptab_ram.add(Segment(sxram.str(), XRAM_BASE+offset, XRAM_SIZE, 549 IntTab(cluster(x,y), 0), false));545 IntTab(cluster(x,y), RAM_XRAM_TGT_ID), false)); 550 546 } 551 547 } … … 557 553 maptab_ram.srcid_map(IntTab(cluster_iob0, CDMA_LOCAL_SRCID), 558 554 IntTab(cluster_iob0, RAM_IOBX_INI_ID)); 559 maptab_ram.srcid_map(IntTab(cluster_iob1, CDMA_LOCAL_SRCID),560 IntTab(cluster_iob1, RAM_IOBX_INI_ID));561 555 maptab_ram.srcid_map(IntTab(cluster_iob0, BDEV_LOCAL_SRCID), 562 556 IntTab(cluster_iob0, RAM_IOBX_INI_ID)); 563 maptab_ram.srcid_map(IntTab(cluster_iob1, BDEV_LOCAL_SRCID), 564 IntTab(cluster_iob1, RAM_IOBX_INI_ID)); 565 maptab_ram.srcid_map(IntTab(cluster_iob1, MEMC_LOCAL_SRCID), 566 IntTab(cluster_iob1, RAM_MEMC_INI_ID)); 557 maptab_ram.srcid_map(IntTab(cluster_iob0, XPIC_LOCAL_SRCID), 558 IntTab(cluster_iob0, RAM_IOBX_INI_ID)); 559 maptab_ram.srcid_map(IntTab(cluster_iob0, RAM_MEMC_INI_ID), 560 IntTab(cluster_iob0, RAM_MEMC_INI_ID)); 561 562 if (not is_mono_cluster) { 563 maptab_ram.srcid_map(IntTab(cluster_iob1, CDMA_LOCAL_SRCID), 564 IntTab(cluster_iob1, RAM_IOBX_INI_ID)); 565 maptab_ram.srcid_map(IntTab(cluster_iob1, BDEV_LOCAL_SRCID), 566 IntTab(cluster_iob1, RAM_IOBX_INI_ID)); 567 maptab_ram.srcid_map(IntTab(cluster_iob1, XPIC_LOCAL_SRCID), 568 IntTab(cluster_iob1, RAM_IOBX_INI_ID)); 569 maptab_ram.srcid_map(IntTab(cluster_iob1, RAM_MEMC_INI_ID), 570 IntTab(cluster_iob1, RAM_MEMC_INI_ID)); 571 } 567 572 568 573 std::cout << "RAM network " << maptab_ram << std::endl; … … 575 580 // - 8 targets (IOB0, IOB1, BDEV, CDMA, MTTY, FBUF, BROM, MNIC) 576 581 /////////////////////////////////////////////////////////////////////// 582 583 const size_t iox_addr_drop_bits = X_WIDTH + Y_WIDTH - 1; 584 const size_t iox_addr_decd_bits = 16 - X_WIDTH - Y_WIDTH + 1; 577 585 MappingTable maptab_iox( 578 586 vci_address_width, 579 IntTab( X_WIDTH + Y_WIDTH, 16 - X_WIDTH - Y_WIDTH),580 IntTab(X_WIDTH + Y_WIDTH , vci_srcid_width- X_WIDTH - Y_WIDTH),587 IntTab(iox_addr_drop_bits, iox_addr_decd_bits), 588 IntTab(X_WIDTH + Y_WIDTH , vci_param_ext::S - X_WIDTH - Y_WIDTH), 581 589 0x00FF000000); 582 590 583 // compute base addresses for cluster_iob0 and cluster_iob1 591 592 // Each peripheral can be accessed through two segments, 593 // depending on the used IOB (IOB0 or IOB1). 594 584 595 uint64_t iob0_base = ((uint64_t)cluster_iob0) 585 596 << (vci_address_width - X_WIDTH - Y_WIDTH); 586 uint64_t iob1_base = ((uint64_t)cluster_iob1) 587 << (vci_address_width - X_WIDTH - Y_WIDTH); 588 589 // Each peripheral can be accessed through two segments, 590 // depending on the used IOB (IOB0 or IOB1). 597 591 598 maptab_iox.add(Segment("iox_seg_mtty_0", XTTY_BASE + iob0_base, XTTY_SIZE, 592 IntTab(cluster_iob0, IOX_MTTY_TGT_ID), false)); 593 maptab_iox.add(Segment("iox_seg_mtty_1", XTTY_BASE + iob1_base, XTTY_SIZE, 594 IntTab(cluster_iob1, IOX_MTTY_TGT_ID), false)); 599 IntTab(0, IOX_MTTY_TGT_ID), false)); 595 600 maptab_iox.add(Segment("iox_seg_fbuf_0", FBUF_BASE + iob0_base, FBUF_SIZE, 596 IntTab(cluster_iob0, IOX_FBUF_TGT_ID), false)); 597 maptab_iox.add(Segment("iox_seg_fbuf_1", FBUF_BASE + iob1_base, FBUF_SIZE, 598 IntTab(cluster_iob1, IOX_FBUF_TGT_ID), false)); 601 IntTab(0, IOX_FBUF_TGT_ID), false)); 599 602 maptab_iox.add(Segment("iox_seg_bdev_0", BDEV_BASE + iob0_base, BDEV_SIZE, 600 IntTab(cluster_iob0, IOX_BDEV_TGT_ID), false)); 601 maptab_iox.add(Segment("iox_seg_bdev_1", BDEV_BASE + iob1_base, BDEV_SIZE, 602 IntTab(cluster_iob1, IOX_BDEV_TGT_ID), false)); 603 IntTab(0, IOX_BDEV_TGT_ID), false)); 603 604 maptab_iox.add(Segment("iox_seg_mnic_0", MNIC_BASE + iob0_base, MNIC_SIZE, 604 IntTab(cluster_iob0, IOX_MNIC_TGT_ID), false)); 605 maptab_iox.add(Segment("iox_seg_mnic_1", MNIC_BASE + iob1_base, MNIC_SIZE, 606 IntTab(cluster_iob1, IOX_MNIC_TGT_ID), false)); 605 IntTab(0, IOX_MNIC_TGT_ID), false)); 607 606 maptab_iox.add(Segment("iox_seg_cdma_0", CDMA_BASE + iob0_base, CDMA_SIZE, 608 IntTab(cluster_iob0, IOX_CDMA_TGT_ID), false)); 609 maptab_iox.add(Segment("iox_seg_cdma_1", CDMA_BASE + iob1_base, CDMA_SIZE, 610 IntTab(cluster_iob1, IOX_CDMA_TGT_ID), false)); 611 612 // Each physical RAM can be accessed through IOB0, or through IOB1. 613 // if IOMMU is not activated, addresses are 40 bits (physical addresses), 614 // and the choice depends on on address bit A[39]. 615 // if IOMMU is activated the addresses use only 32 bits (virtual 616 // addresses), and the choice depends on address bit A[31]. 607 IntTab(0, IOX_CDMA_TGT_ID), false)); 608 maptab_iox.add(Segment("iox_seg_xpic_0", XPIC_BASE + iob0_base, XPIC_SIZE, 609 IntTab(0, IOX_XPIC_TGT_ID), false)); 610 611 if (not is_mono_cluster) { 612 uint64_t iob1_base = ((uint64_t)cluster_iob1) 613 << (vci_address_width - X_WIDTH - Y_WIDTH); 614 615 maptab_iox.add(Segment("iox_seg_mtty_1", XTTY_BASE + iob1_base, 616 XTTY_SIZE, IntTab(0, IOX_MTTY_TGT_ID), false)); 617 maptab_iox.add(Segment("iox_seg_fbuf_1", FBUF_BASE + iob1_base, 618 FBUF_SIZE, IntTab(0, IOX_FBUF_TGT_ID), false)); 619 maptab_iox.add(Segment("iox_seg_bdev_1", BDEV_BASE + iob1_base, 620 BDEV_SIZE, IntTab(0, IOX_BDEV_TGT_ID), false)); 621 maptab_iox.add(Segment("iox_seg_mnic_1", MNIC_BASE + iob1_base, 622 MNIC_SIZE, IntTab(0, IOX_MNIC_TGT_ID), false)); 623 maptab_iox.add(Segment("iox_seg_cdma_1", CDMA_BASE + iob1_base, 624 CDMA_SIZE, IntTab(0, IOX_CDMA_TGT_ID), false)); 625 maptab_iox.add(Segment("iox_seg_xpic_1", XPIC_BASE + iob1_base, 626 XPIC_SIZE, IntTab(0, IOX_XPIC_TGT_ID), false)); 627 } 628 629 /////////////////////////////////////////////////////////////////////////// 630 // - For external DMA peripherals, each physical RAM and replicated 631 // XICU can be accessed through IOB0, or through IOB1 depending on address 632 // bit A[32] (0 => IOB0, 1 => IOB1). 633 // 634 // NOTE: the special attribute in the XICU segments is used by the IOB to 635 // route commands through the INT network. The commands on not special 636 // segments (RAM) are routed by the IOB through the RAM network 637 // 638 // NOTE: The IOX interconnect is implemented as a local interconnect because 639 // the global bits need to be dropped, but no locality check is 640 // performed 641 /////////////////////////////////////////////////////////////////////////// 642 617 643 for (size_t x = 0; x < x_size; x++) { 618 644 for (size_t y = 0; y < y_size ; y++) { 619 uint64_t offset = static_cast<uint64_t>(cluster(x,y)) 645 const bool special = true; 646 const bool cacheable = true; 647 648 const uint64_t offset = static_cast<uint64_t>(cluster(x,y)) 620 649 << (vci_address_width - X_WIDTH - Y_WIDTH); 621 650 622 // send command to XRAM through IOB0 623 if ( x < (x_size/2) ) { 624 std::ostringstream siob0; 625 siob0 << "iox_seg_xram_" << x << "_" << y; 626 maptab_iox.add(Segment(siob0.str(), 627 XRAM_BASE + offset, XRAM_SIZE, 628 IntTab(cluster_iob0,IOX_IOB0_TGT_ID), 629 false)); 630 } 631 // send command to XRAM through IOB1 632 else { 633 std::ostringstream siob1; 634 siob1 << "iox_seg_xram_" << x << "_" << y; 635 maptab_iox.add(Segment(siob1.str(), 636 XRAM_BASE + offset, XRAM_SIZE, 637 IntTab(cluster_iob1,IOX_IOB1_TGT_ID), 638 false)); 651 const uint64_t xicu_base = XICU_BASE + offset; 652 if ( (y & 0x1) == 0 ) { 653 // segments mapped to IOB0 654 std::ostringstream sxcu0; 655 sxcu0 << "iox_seg_xcu0_" << x << "_" << y; 656 maptab_iox.add(Segment(sxcu0.str(), xicu_base, XICU_SIZE, 657 IntTab(0, IOX_IOB0_TGT_ID), not cacheable, special)); 658 659 std::ostringstream sram0; 660 sram0 << "iox_seg_ram0_" << x << "_" << y; 661 maptab_iox.add(Segment(sram0.str(), offset, XICU_BASE, 662 IntTab(0, IOX_IOB0_TGT_ID), not cacheable, not special)); 663 } else { 664 // segments mapped to IOB1 665 std::ostringstream sxcu1; 666 sxcu1 << "iox_seg_xcu1_" << x << "_" << y; 667 maptab_iox.add(Segment(sxcu1.str(), xicu_base | (1ULL<<32), XICU_SIZE, 668 IntTab(0, IOX_IOB1_TGT_ID), not cacheable, special)); 669 670 std::ostringstream sram1; 671 sram1 << "iox_seg_ram1_" << x << "_" << y; 672 maptab_iox.add(Segment(sram1.str(), offset | (1ULL<<32), XICU_BASE, 673 IntTab(0, IOX_IOB1_TGT_ID), not cacheable, not special)); 639 674 } 640 675 } 641 676 } 642 // useful when IOMMU activated643 //maptab_iox.add(Segment("iox_seg_xram", 0xc0000000, 0x40000000,644 // IntTab(cluster_iob1,IOX_IOB1_TGT_ID), false));645 677 646 678 // This define the mapping between the initiators (identified by the SRCID) 647 679 // and the port index on the IOX local interconnect. 648 // External initiator have two alias SRCID (iob0 / iob1 access) 649 650 maptab_iox.srcid_map(IntTab(cluster_iob0, CDMA_LOCAL_SRCID), 651 IntTab(cluster_iob0, IOX_CDMA_INI_ID)); 652 maptab_iox.srcid_map(IntTab(cluster_iob1, CDMA_LOCAL_SRCID), 653 IntTab(cluster_iob1, IOX_CDMA_INI_ID)); 654 maptab_iox.srcid_map(IntTab(cluster_iob0, BDEV_LOCAL_SRCID), 655 IntTab(cluster_iob0, IOX_BDEV_INI_ID)); 656 maptab_iox.srcid_map(IntTab(cluster_iob1, BDEV_LOCAL_SRCID), 657 IntTab(cluster_iob0, IOX_BDEV_INI_ID)); 658 659 for (size_t x = 0; x < x_size; x++) { 660 for (size_t y = 0; y < y_size ; y++) { 661 size_t iob = (x < (x_size / 2)) ? IOX_IOB0_INI_ID : IOX_IOB1_INI_ID; 662 663 for (size_t p = 0 ; p < NB_PROCS ; p++) { 664 maptab_iox.srcid_map(IntTab(cluster(x,y), PROC_LOCAL_SRCID + p), 665 IntTab(cluster(x,y), iob)); 666 } 667 maptab_iox.srcid_map(IntTab( cluster(x,y), MDMA_LOCAL_SRCID), 668 IntTab( cluster(x,y), IOX_IOB0_INI_ID)); 669 } 680 681 maptab_iox.srcid_map(IntTab(0, CDMA_LOCAL_SRCID), 682 IntTab(0, IOX_CDMA_INI_ID)); 683 maptab_iox.srcid_map(IntTab(0, BDEV_LOCAL_SRCID), 684 IntTab(0, IOX_BDEV_INI_ID)); 685 maptab_iox.srcid_map(IntTab(0, XPIC_LOCAL_SRCID), 686 IntTab(0, IOX_XPIC_INI_ID)); 687 maptab_iox.srcid_map(IntTab(0, IOX_IOB0_INI_ID), 688 IntTab(0, IOX_IOB0_INI_ID)); 689 690 if (not is_mono_cluster) { 691 maptab_iox.srcid_map(IntTab(0, IOX_IOB1_INI_ID), 692 IntTab(0, IOX_IOB1_INI_ID)); 670 693 } 671 694 … … 697 720 VciSignals<vci_param_ext> signal_vci_ini_bdev("signal_vci_ini_bdev"); 698 721 VciSignals<vci_param_ext> signal_vci_ini_cdma("signal_vci_ini_cdma"); 722 VciSignals<vci_param_ext> signal_vci_ini_xpic("signal_vci_ini_xpic"); 699 723 700 724 VciSignals<vci_param_ext> signal_vci_tgt_iob0("signal_vci_tgt_iob0"); … … 705 729 VciSignals<vci_param_ext> signal_vci_tgt_bdev("signal_vci_tgt_bdev"); 706 730 VciSignals<vci_param_ext> signal_vci_tgt_cdma("signal_vci_tgt_cdma"); 731 VciSignals<vci_param_ext> signal_vci_tgt_xpic("signal_vci_tgt_xpic"); 707 732 708 733 // Horizontal inter-clusters INT network DSPIN … … 807 832 << std::endl; 808 833 834 const size_t nb_iox_initiators = (not is_mono_cluster) ? 5 : 4; 835 const size_t nb_iox_targets = (not is_mono_cluster) ? 8 : 7; 836 809 837 // IOX network 810 838 VciIoxNetwork<vci_param_ext>* iox_network; 811 839 iox_network = new VciIoxNetwork<vci_param_ext>("iox_network", 812 840 maptab_iox, 813 7,// number of targets814 4); // number of initiators841 nb_iox_targets, // number of targets 842 nb_iox_initiators ); // number of initiators 815 843 816 844 // Network Controller … … 853 881 IntTab(0, IOX_CDMA_TGT_ID), 854 882 64, // burst size (bytes) 855 2 * NB_NIC_CHANNELS); 883 NB_CMA_CHANNELS); 884 856 885 // Multi-TTY controller 857 886 std::vector<std::string> vect_names; … … 868 897 vect_names); 869 898 899 // IOPIC 900 VciIopic<vci_param_ext>* xpic; 901 xpic = new VciIopic<vci_param_ext>( "xpic", 902 maptab_iox, 903 IntTab(0, XPIC_LOCAL_SRCID), 904 IntTab(0, IOX_XPIC_TGT_ID), 905 32 ); // number of input HWI 906 907 870 908 TsarIobClusterType* clusters[x_size][y_size]; 871 909 … … 891 929 sc << "cluster_" << x << "_" << y; 892 930 893 bool memc_debug = 894 debug_ok && (cluster(x,y) == debug_memc_id); 895 bool proc_debug = 896 debug_ok && (cluster(x,y) == (debug_proc_id / NB_PROCS)); 931 bool memc_debug = (cluster(x,y) == debug_memc_id); 932 bool proc_debug = (cluster(x,y) == (debug_proc_id / NB_PROCS)); 933 934 bool is_io0 = (cluster(x,y) == cluster_iob0); 935 bool is_io1 = (cluster(x,y) == cluster_iob1); 936 bool is_io = is_io0 || is_io1; 937 938 IntTab iox_iob_tgtid = 939 IntTab(0, is_io0 ? IOX_IOB0_TGT_ID : IOX_IOB1_TGT_ID); 940 IntTab iox_iob_srcid = 941 IntTab(0, is_io0 ? IOX_IOB0_INI_ID : IOX_IOB1_INI_ID); 897 942 898 943 TsarIobClusterType::ClusterParams params = { … … 905 950 .mt_ext = maptab_ram, 906 951 .mt_iox = maptab_iox, 952 953 .is_io = is_io, 954 .iox_iob_tgtid = iox_iob_tgtid, 955 .iox_iob_srcid = iox_iob_srcid, 907 956 908 957 .memc_ways = MEMC_WAYS, … … 916 965 .loader = loader, 917 966 967 .distboot = distboot, 968 918 969 .frozen_cycles = frozen_cycles, 919 970 .debug_start_cycle = debug_from, 920 .memc_debug_ok = memc_debug, 921 .proc_debug_ok = proc_debug, 922 .iob_debug_ok = debug_ ok and debug_iob971 .memc_debug_ok = memc_debug, 972 .proc_debug_ok = proc_debug, 973 .iob_debug_ok = debug_iob 923 974 }; 924 975 … … 942 993 iox_network->p_clk (signal_clk); 943 994 iox_network->p_resetn (signal_resetn); 944 iox_network->p_to_ini[IOX_IOB0_INI_ID] (signal_vci_ini_iob0);945 iox_network->p_to_ini[IOX_IOB1_INI_ID] (signal_vci_ini_iob1);946 995 iox_network->p_to_ini[IOX_BDEV_INI_ID] (signal_vci_ini_bdev); 947 996 iox_network->p_to_ini[IOX_CDMA_INI_ID] (signal_vci_ini_cdma); 948 iox_network->p_to_ tgt[IOX_IOB0_TGT_ID] (signal_vci_tgt_iob0);949 iox_network->p_to_ tgt[IOX_IOB1_TGT_ID] (signal_vci_tgt_iob1);997 iox_network->p_to_ini[IOX_XPIC_INI_ID] (signal_vci_ini_xpic); 998 iox_network->p_to_ini[IOX_IOB0_INI_ID] (signal_vci_ini_iob0); 950 999 iox_network->p_to_tgt[IOX_MTTY_TGT_ID] (signal_vci_tgt_mtty); 951 1000 iox_network->p_to_tgt[IOX_FBUF_TGT_ID] (signal_vci_tgt_fbuf); … … 953 1002 iox_network->p_to_tgt[IOX_BDEV_TGT_ID] (signal_vci_tgt_bdev); 954 1003 iox_network->p_to_tgt[IOX_CDMA_TGT_ID] (signal_vci_tgt_cdma); 1004 iox_network->p_to_tgt[IOX_XPIC_TGT_ID] (signal_vci_tgt_xpic); 1005 iox_network->p_to_tgt[IOX_IOB0_TGT_ID] (signal_vci_tgt_iob0); 1006 1007 if (not is_mono_cluster) { 1008 iox_network->p_to_ini[IOX_IOB1_INI_ID] (signal_vci_ini_iob1); 1009 iox_network->p_to_tgt[IOX_IOB1_TGT_ID] (signal_vci_tgt_iob1); 1010 } 955 1011 956 1012 // BDEV connexion 957 bdev->p_clk (signal_clk); 958 bdev->p_resetn (signal_resetn); 959 bdev->p_irq (signal_irq_bdev); 960 961 // For AHCI 962 // bdev->p_channel_irq[0] (signal_irq_bdev); 963 1013 bdev->p_clk (signal_clk); 1014 bdev->p_resetn (signal_resetn); 1015 bdev->p_irq (signal_irq_bdev); 964 1016 bdev->p_vci_target (signal_vci_tgt_bdev); 965 1017 bdev->p_vci_initiator (signal_vci_ini_bdev); … … 1001 1053 cdma->p_vci_target (signal_vci_tgt_cdma); 1002 1054 cdma->p_vci_initiator (signal_vci_ini_cdma); 1003 for ( size_t i=0 ; i< (NB_NIC_CHANNELS*2); i++) {1055 for ( size_t i=0 ; i<NB_CMA_CHANNELS ; i++) { 1004 1056 cdma->p_irq[i] (signal_irq_cdma[i]); 1005 1057 } … … 1007 1059 std::cout << " - CDMA connected" << std::endl; 1008 1060 1009 // IRQ connexions from external peripherals (cluster_iob0 only) 1010 // IRQ_MNIC_RX -> IRQ[08] to IRQ[09] 1011 // IRQ_MNIC_TX -> IRQ[10] to IRQ[11] 1012 // IRQ_CDMA -> IRQ[12] to IRQ[15] 1013 // IRQ_MTTY -> IRQ[16] to IRQ[30] 1014 // IRQ_BDEV -> IRQ[31] 1015 1016 size_t mx = 16 + NB_TTY_CHANNELS; 1017 for ( size_t n=0 ; n<32 ; n++ ) { 1018 if ( n < 8 ) (*clusters[0][0]->p_irq[n]) (signal_irq_false); 1019 else if ( n < 10 ) (*clusters[0][0]->p_irq[n]) (signal_irq_false); 1020 else if ( n < 12 ) (*clusters[0][0]->p_irq[n]) (signal_irq_false); 1021 else if ( n < 16 ) (*clusters[0][0]->p_irq[n]) (signal_irq_false); 1022 else if ( n < mx ) (*clusters[0][0]->p_irq[n]) (signal_irq_mtty[n-16]); 1023 else if ( n < 31 ) (*clusters[0][0]->p_irq[n]) (signal_irq_false); 1024 else (*clusters[0][0]->p_irq[n]) (signal_irq_bdev); 1025 } 1061 // XPIC connexion 1062 xpic->p_clk (signal_clk); 1063 xpic->p_resetn (signal_resetn); 1064 xpic->p_vci_target (signal_vci_tgt_xpic); 1065 xpic->p_vci_initiator (signal_vci_ini_xpic); 1066 for ( size_t i=0 ; i<32 ; i++) 1067 { 1068 if (i < NB_NIC_CHANNELS) xpic->p_hwi[i] (signal_irq_mnic_rx[i]); 1069 else if (i < 2) xpic->p_hwi[i] (signal_irq_false); 1070 else if (i < 2+NB_NIC_CHANNELS) xpic->p_hwi[i] (signal_irq_mnic_tx[i-2]); 1071 else if (i < 4) xpic->p_hwi[i] (signal_irq_false); 1072 else if (i < 4+NB_CMA_CHANNELS) xpic->p_hwi[i] (signal_irq_cdma[i-4]); 1073 else if (i < 8) xpic->p_hwi[i] (signal_irq_false); 1074 else if (i < 9) xpic->p_hwi[i] (signal_irq_bdev); 1075 else if (i < 9+NB_TTY_CHANNELS) xpic->p_hwi[i] (signal_irq_mtty[i-9]); 1076 else xpic->p_hwi[i] (signal_irq_false); 1077 } 1078 1079 std::cout << " - XPIC connected" << std::endl; 1026 1080 1027 1081 // IOB0 cluster connexion to IOX network … … 1030 1084 1031 1085 // IOB1 cluster connexion to IOX network 1032 (*clusters[x_size-1][y_size-1]->p_vci_iob_iox_ini) (signal_vci_ini_iob1); 1033 (*clusters[x_size-1][y_size-1]->p_vci_iob_iox_tgt) (signal_vci_tgt_iob1); 1086 if (not is_mono_cluster) { 1087 (*clusters[x_size-1][y_size-1]->p_vci_iob_iox_ini) (signal_vci_ini_iob1); 1088 (*clusters[x_size-1][y_size-1]->p_vci_iob_iox_tgt) (signal_vci_tgt_iob1); 1089 } 1034 1090 1035 1091 // All clusters Clock & RESET connexions … … 1145 1201 // East & West boundary cluster connections 1146 1202 for (size_t y = 0; y < y_size; y++) { 1203 // L1-L2 cmd network boundary connections 1147 1204 for (size_t k = 0; k < 3; k++) { 1148 1205 clusters[0][y]->p_dspin_int_cmd_in[WEST][k]( … … 1156 1213 } 1157 1214 1215 // L1-L2 rsp network boundary connections 1158 1216 for (size_t k = 0; k < 2; k++) { 1159 1217 clusters[0][y]->p_dspin_int_rsp_in[WEST][k]( … … 1167 1225 } 1168 1226 1169 // handling IOB to RAM network connection in cluster_iob0 1170 if( y == 0 ) { 1171 (*clusters[0][0]->p_dspin_iob_cmd_out)( 1172 signal_dspin_cmd_iob0_loopback); 1173 clusters[0][0]->p_dspin_ram_cmd_in[WEST]( 1174 signal_dspin_cmd_iob0_loopback); 1175 clusters[0][0]->p_dspin_ram_cmd_out[WEST]( 1176 signal_dspin_false_ram_cmd_out[0][0][WEST]); 1177 clusters[0][0]->p_dspin_ram_rsp_in[WEST]( 1178 signal_dspin_false_ram_rsp_in[0][0][WEST]); 1179 clusters[0][0]->p_dspin_ram_rsp_out[WEST]( 1180 signal_dspin_rsp_iob0_loopback); 1181 (*clusters[0][0]->p_dspin_iob_rsp_in)( 1182 signal_dspin_rsp_iob0_loopback); 1183 } 1184 else { 1185 clusters[0][y]->p_dspin_ram_cmd_in[WEST]( 1186 signal_dspin_false_ram_cmd_in[0][y][WEST]); 1187 clusters[0][y]->p_dspin_ram_cmd_out[WEST]( 1188 signal_dspin_false_ram_cmd_out[0][y][WEST]); 1189 clusters[0][y]->p_dspin_ram_rsp_in[WEST]( 1190 signal_dspin_false_ram_rsp_in[0][y][WEST]); 1191 clusters[0][y]->p_dspin_ram_rsp_out[WEST]( 1192 signal_dspin_false_ram_rsp_out[0][y][WEST]); 1193 } 1194 1195 // handling IOB to RAM network connection in cluster_iob1 1196 if( y == y_size-1 ) { 1197 (*clusters[x_size-1][y_size-1]->p_dspin_iob_cmd_out)( 1198 signal_dspin_cmd_iob1_loopback); 1199 clusters[x_size-1][y_size-1]->p_dspin_ram_cmd_in[EAST]( 1200 signal_dspin_cmd_iob1_loopback); 1201 1202 clusters[x_size-1][y_size-1]->p_dspin_ram_cmd_out[EAST]( 1203 signal_dspin_false_ram_cmd_out[x_size-1][y_size-1][EAST]); 1204 clusters[x_size-1][y_size-1]->p_dspin_ram_rsp_in[EAST]( 1205 signal_dspin_false_ram_rsp_in[x_size-1][y_size-1][EAST]); 1206 1207 clusters[x_size-1][y_size-1]->p_dspin_ram_rsp_out[EAST]( 1208 signal_dspin_rsp_iob1_loopback); 1209 (*clusters[x_size-1][y_size-1]->p_dspin_iob_rsp_in)( 1210 signal_dspin_rsp_iob1_loopback); 1211 } 1212 else { 1213 clusters[x_size-1][y]->p_dspin_ram_cmd_in[EAST]( 1214 signal_dspin_false_ram_cmd_in[x_size-1][y][EAST]); 1215 clusters[x_size-1][y]->p_dspin_ram_cmd_out[EAST]( 1216 signal_dspin_false_ram_cmd_out[x_size-1][y][EAST]); 1217 clusters[x_size-1][y]->p_dspin_ram_rsp_in[EAST]( 1218 signal_dspin_false_ram_rsp_in[x_size-1][y][EAST]); 1219 clusters[x_size-1][y]->p_dspin_ram_rsp_out[EAST]( 1220 signal_dspin_false_ram_rsp_out[x_size-1][y][EAST]); 1221 } 1227 // L2-XRAM cmd network boundary connections 1228 clusters[0][y]->p_dspin_ram_cmd_in[WEST]( 1229 signal_dspin_false_ram_cmd_in[0][y][WEST]); 1230 clusters[0][y]->p_dspin_ram_cmd_out[WEST]( 1231 signal_dspin_false_ram_cmd_out[0][y][WEST]); 1232 clusters[x_size-1][y]->p_dspin_ram_cmd_in[EAST]( 1233 signal_dspin_false_ram_cmd_in[x_size-1][y][EAST]); 1234 clusters[x_size-1][y]->p_dspin_ram_cmd_out[EAST]( 1235 signal_dspin_false_ram_cmd_out[x_size-1][y][EAST]); 1236 1237 // L2-XRAM rsp network boundary connections 1238 clusters[0][y]->p_dspin_ram_rsp_in[WEST]( 1239 signal_dspin_false_ram_rsp_in[0][y][WEST]); 1240 clusters[0][y]->p_dspin_ram_rsp_out[WEST]( 1241 signal_dspin_false_ram_rsp_out[0][y][WEST]); 1242 clusters[x_size-1][y]->p_dspin_ram_rsp_in[EAST]( 1243 signal_dspin_false_ram_rsp_in[x_size-1][y][EAST]); 1244 clusters[x_size-1][y]->p_dspin_ram_rsp_out[EAST]( 1245 signal_dspin_false_ram_rsp_out[x_size-1][y][EAST]); 1222 1246 } 1223 1247 … … 1277 1301 1278 1302 signal_resetn = false; 1279 1280 1303 signal_irq_false = false; 1281 1304 … … 1368 1391 } 1369 1392 1393 // trace RAM xbar (between MEMC and IOB) 1394 // clusters[0][0]->ram_xbar_cmd->print_trace(); 1395 // clusters[0][0]->ram_xbar_rsp->print_trace(); 1396 // clusters[x_size-1][y_size-1]->ram_xbar_cmd->print_trace(); 1397 // clusters[x_size-1][y_size-1]->ram_xbar_rsp->print_trace(); 1398 1370 1399 // trace INT network 1371 // 1372 1373 // 1374 // 1375 // 1376 // 1377 1378 // 1379 // 1400 // clusters[0][0]->int_xbar_d->print_trace(); 1401 1402 // clusters[0][0]->signal_int_dspin_cmd_l2g_d.print_trace( 1403 // "[SIG] INT_CMD_L2G_D_0_0"); 1404 // clusters[0][0]->signal_int_dspin_rsp_g2l_d.print_trace( 1405 // "[SIG] INT_RSP_G2L_D_0_0"); 1406 1407 // clusters[0][0]->int_router_cmd->print_trace(0); 1408 // clusters[0][0]->int_router_rsp->print_trace(0); 1380 1409 1381 1410 // trace INT_CMD_D xbar and router in cluster 0_1 1382 // 1383 // 1384 1385 // 1386 // 1387 // 1388 // 1389 1390 // 1411 // clusters[0][1]->int_router_cmd->print_trace(0); 1412 // clusters[0][1]->int_router_rsp->print_trace(0); 1413 1414 // clusters[0][1]->signal_int_dspin_cmd_g2l_d.print_trace( 1415 // "[SIG] INT_CMD_G2L_D_0_0"); 1416 // clusters[0][1]->signal_int_dspin_rsp_l2g_d.print_trace( 1417 // "[SIG] INT_RSP_L2G_D_0_0"); 1418 1419 // clusters[0][1]->int_xbar_cmd_d->print_trace(); 1391 1420 1392 1421 // trace memc[debug_memc_id] … … 1412 1441 1413 1442 // trace iob, iox and external peripherals 1414 if ( debug_iob ) {1415 clusters[0][0]->iob->print_trace();1416 clusters[0][0]->signal_int_vci_tgt_iobx.print_trace(1417 "[SIG]IOB0_INT_TGT");1418 clusters[0][0]->signal_int_vci_ini_iobx.print_trace(1419 "[SIG]IOB0_INT_INI");1420 clusters[0][0]->signal_ram_vci_ini_iobx.print_trace(1421 "[SIG]IOB0_RAM_INI");1422 1423 signal_vci_ini_iob0.print_trace("[SIG]IOB0_IOX_INI");1424 signal_vci_tgt_iob0.print_trace("[SIG]IOB0_IOX_TGT");1425 1426 cdma->print_trace();1427 signal_vci_tgt_cdma.print_trace("[SIG]IOX_CDMA_TGT");1428 signal_vci_ini_cdma.print_trace("[SIG]IOX_CDMA_INI");1429 1430 iox_network->print_trace();1431 1432 // interrupts1433 if (signal_irq_bdev) std::cout << "### IRQ_BDEV ACTIVATED"1434 << std::endl;1435 }1443 //if ( debug_iob ) { 1444 // clusters[0][0]->iob->print_trace(); 1445 // clusters[0][0]->signal_int_vci_tgt_iobx.print_trace( 1446 // "[SIG]IOB0_INT_TGT"); 1447 // clusters[0][0]->signal_int_vci_ini_iobx.print_trace( 1448 // "[SIG]IOB0_INT_INI"); 1449 // clusters[0][0]->signal_ram_vci_ini_iobx.print_trace( 1450 // "[SIG]IOB0_RAM_INI"); 1451 1452 // signal_vci_ini_iob0.print_trace("[SIG]IOB0_IOX_INI"); 1453 // signal_vci_tgt_iob0.print_trace("[SIG]IOB0_IOX_TGT"); 1454 1455 // cdma->print_trace(); 1456 // signal_vci_tgt_cdma.print_trace("[SIG]IOX_CDMA_TGT"); 1457 // signal_vci_ini_cdma.print_trace("[SIG]IOX_CDMA_INI"); 1458 1459 // iox_network->print_trace(); 1460 1461 // // interrupts 1462 // if (signal_irq_bdev) std::cout << "### IRQ_BDEV ACTIVATED" 1463 // << std::endl; 1464 //} 1436 1465 } 1437 1466 sc_start(sc_core::sc_time(1, SC_NS)); … … 1444 1473 delete cdma; 1445 1474 delete mtty; 1475 delete xpic; 1446 1476 1447 1477 for(size_t x = 0; x < x_size; x++) { -
branches/fault_tolerance/platform/tsar_generic_iob/top.desc
r699 r717 2 2 # -*- python -*- 3 3 4 # VCI parameters 4 # VCI parameters 5 5 vci_cell_size_int = 4 6 6 vci_cell_size_ext = 8 … … 16 16 vci_wrplen_size = 1 17 17 18 # internal DSPIN network parameters 18 # internal DSPIN network parameters 19 19 int_dspin_cmd_flit_size = 39 20 20 int_dspin_rsp_flit_size = 32 … … 27 27 uses = [ 28 28 # cluster 29 Uses('caba:tsar_iob_cluster', 29 Uses('caba:tsar_iob_cluster', 30 30 vci_data_width_int = vci_cell_size_int, 31 vci_data_width_ext = vci_cell_size_ext, 31 vci_data_width_ext = vci_cell_size_ext, 32 32 dspin_int_cmd_width = int_dspin_cmd_flit_size, 33 33 dspin_int_rsp_width = int_dspin_rsp_flit_size, 34 34 dspin_ram_cmd_width = ram_dspin_cmd_flit_size, 35 35 dspin_ram_rsp_width = ram_dspin_rsp_flit_size), 36 36 37 37 # IOX Network 38 Uses('caba:vci_iox_network', 38 Uses('caba:vci_iox_network', 39 39 cell_size = vci_cell_size_ext), 40 40 41 41 # Frame Buffer 42 Uses('caba:vci_framebuffer', 42 Uses('caba:vci_framebuffer', 43 43 cell_size = vci_cell_size_ext), 44 44 45 45 # Block Device 46 Uses('caba:vci_block_device_tsar', 46 Uses('caba:vci_block_device_tsar', 47 47 cell_size = vci_cell_size_ext), 48 48 49 # NIC 50 Uses('caba:vci_multi_nic', 49 # NIC 50 Uses('caba:vci_multi_nic', 51 51 cell_size = vci_cell_size_ext), 52 52 53 53 # Chained DMA 54 Uses('caba:vci_chbuf_dma', 54 Uses('caba:vci_chbuf_dma', 55 55 cell_size = vci_cell_size_ext), 56 56 57 57 # TTY 58 Uses('caba:vci_multi_tty', 58 Uses('caba:vci_multi_tty', 59 cell_size = vci_cell_size_ext), 60 61 # PIC 62 Uses('caba:vci_iopic', 59 63 cell_size = vci_cell_size_ext), 60 64 … … 64 68 65 69 # default VCI parameters (global variables) 66 cell_size = vci_cell_size_int, 70 cell_size = vci_cell_size_int, 67 71 plen_size = vci_plen_size, 68 72 addr_size = vci_addr_size, -
branches/fault_tolerance/platform/tsar_generic_iob/tsar_iob_cluster/caba/metadata/tsar_iob_cluster.sd
r699 r717 66 66 flit_width = parameter.Reference('dspin_int_rsp_width')), 67 67 68 Uses('caba:dspin_local_crossbar', 69 flit_width = parameter.Reference('dspin_ram_cmd_width')), 70 71 Uses('caba:dspin_local_crossbar', 72 flit_width = parameter.Reference('dspin_ram_rsp_width')), 73 68 74 Uses('caba:vci_dspin_initiator_wrapper', 69 75 cell_size = parameter.Reference('vci_data_width_int'), … … 93 99 dspin_rsp_width = parameter.Reference('dspin_ram_rsp_width')), 94 100 95 Uses('caba:dspin_router _tsar',101 Uses('caba:dspin_router', 96 102 flit_width = parameter.Reference('dspin_ram_cmd_width')), 97 103 98 Uses('caba:dspin_router _tsar',104 Uses('caba:dspin_router', 99 105 flit_width = parameter.Reference('dspin_ram_rsp_width')), 100 106 -
branches/fault_tolerance/platform/tsar_generic_iob/tsar_iob_cluster/caba/source/include/tsar_iob_cluster.h
r696 r717 27 27 #include "vci_dspin_initiator_wrapper.h" 28 28 #include "vci_dspin_target_wrapper.h" 29 #include "dspin_router _tsar.h"29 #include "dspin_router.h" 30 30 #include "virtual_dspin_router.h" 31 31 #include "vci_multi_dma.h" … … 89 89 soclib::caba::VciTarget<vci_param_ext>* p_vci_iob_iox_tgt; 90 90 91 // These ports are used to connect IOB to RAM network in top cell92 soclib::caba::DspinOutput<dspin_ram_cmd_width>* p_dspin_iob_cmd_out;93 soclib::caba::DspinInput<dspin_ram_rsp_width>* p_dspin_iob_rsp_in;94 95 // These ports are used to connect hard IRQ from external peripherals to96 // IOB097 sc_in<bool>* p_irq[32];98 99 91 // These arrays of ports are used to connect the INT & RAM networks in 100 92 // top cell … … 111 103 // interrupt signals 112 104 sc_signal<bool> signal_false; 113 sc_signal<bool> signal_proc_it[ 8];114 sc_signal<bool> signal_irq_mdma[ 8];115 sc_signal<bool> signal_irq_mtty[ 8];105 sc_signal<bool> signal_proc_it[NB_PROCS*IRQ_PER_PROCESSOR]; 106 sc_signal<bool> signal_irq_mdma[NB_DMA_CHANNELS]; 107 sc_signal<bool> signal_irq_mtty[NB_DEBUG_TTY_CHANNELS]; 116 108 sc_signal<bool> signal_irq_memc; 117 109 … … 130 122 131 123 // INT network VCI signals between VCI components and VCI local crossbar 132 VciSignals<vci_param_int> signal_int_vci_ini_proc[ 8];124 VciSignals<vci_param_int> signal_int_vci_ini_proc[NB_PROCS]; 133 125 VciSignals<vci_param_int> signal_int_vci_ini_mdma; 134 126 VciSignals<vci_param_int> signal_int_vci_ini_iobx; … … 149 141 DspinSignals<dspin_int_cmd_width> signal_int_dspin_clack_memc; 150 142 DspinSignals<dspin_int_rsp_width> signal_int_dspin_p2m_memc; 151 DspinSignals<dspin_int_cmd_width> signal_int_dspin_m2p_proc[ 8];152 DspinSignals<dspin_int_cmd_width> signal_int_dspin_clack_proc[ 8];153 DspinSignals<dspin_int_rsp_width> signal_int_dspin_p2m_proc[ 8];143 DspinSignals<dspin_int_cmd_width> signal_int_dspin_m2p_proc[NB_PROCS]; 144 DspinSignals<dspin_int_cmd_width> signal_int_dspin_clack_proc[NB_PROCS]; 145 DspinSignals<dspin_int_rsp_width> signal_int_dspin_p2m_proc[NB_PROCS]; 154 146 155 147 // RAM network VCI signals between VCI components and VCI/DSPIN wrappers … … 161 153 DspinSignals<dspin_ram_cmd_width> signal_ram_dspin_cmd_xram_t; 162 154 DspinSignals<dspin_ram_rsp_width> signal_ram_dspin_rsp_xram_t; 155 163 156 DspinSignals<dspin_ram_cmd_width> signal_ram_dspin_cmd_memc_i; 164 157 DspinSignals<dspin_ram_rsp_width> signal_ram_dspin_rsp_memc_i; 158 159 DspinSignals<dspin_ram_cmd_width> signal_ram_dspin_cmd_iob_i; 160 DspinSignals<dspin_ram_rsp_width> signal_ram_dspin_rsp_iob_i; 161 162 DspinSignals<dspin_ram_cmd_width> signal_ram_dspin_cmd_xbar; 163 DspinSignals<dspin_ram_rsp_width> signal_ram_dspin_rsp_xbar; 164 165 DspinSignals<dspin_ram_cmd_width> signal_ram_dspin_cmd_false; 166 DspinSignals<dspin_ram_rsp_width> signal_ram_dspin_rsp_false; 167 165 168 166 169 ////////////////////////////////////// … … 213 216 VciExtDspinTargetWrapperType* xram_ram_wt; 214 217 215 DspinRouterTsar<dspin_ram_cmd_width>* ram_router_cmd; 216 DspinRouterTsar<dspin_ram_rsp_width>* ram_router_rsp; 218 DspinRouter<dspin_ram_cmd_width>* ram_router_cmd; 219 DspinRouter<dspin_ram_rsp_width>* ram_router_rsp; 220 221 DspinLocalCrossbar<dspin_ram_cmd_width>* ram_xbar_cmd; 222 DspinLocalCrossbar<dspin_ram_rsp_width>* ram_xbar_rsp; 217 223 218 224 // IO Network Components (not instanciated in all clusters) … … 232 238 const soclib::common::MappingTable &mt_ext; 233 239 const soclib::common::MappingTable &mt_iox; 240 241 const bool is_io; 242 const soclib::common::IntTab iox_iob_tgtid; 243 const soclib::common::IntTab iox_iob_srcid; 234 244 235 245 size_t memc_ways; … … 243 253 const Loader& loader; 244 254 255 bool distboot; 256 245 257 uint32_t frozen_cycles; 246 258 uint32_t debug_start_cycle; … … 255 267 }; 256 268 269 270 SC_HAS_PROCESS(TsarIobCluster); 271 272 void init(); 273 257 274 // cluster constructor 258 275 TsarIobCluster(struct ClusterParams& params); -
branches/fault_tolerance/platform/tsar_generic_iob/tsar_iob_cluster/caba/source/src/tsar_iob_cluster.cpp
r696 r717 9 9 // Modified on: mars 2014 10 10 ////////////////////////////////////////////////////////////////////////////// 11 // Cluster(0,0) & Cluster(xmax-1,ymax-1) contains the IOB0 & IOB1 components.12 // These twoclusters contain 6 extra components:13 // - 1 vci_io_bridge (connected to the 3 networks .11 // IO clusters contains the IOB component. 12 // These clusters contain 6 extra components: 13 // - 1 vci_io_bridge (connected to the 3 networks). 14 14 // - 3 vci_dspin_wrapper for the IOB. 15 15 // - 2 dspin_local_crossbar for commands and responses. … … 39 39 assert((params.x_id < X_MAX) && (params.y_id < Y_MAX)); 40 40 41 size_t cid = this->clusterId(params.x_id, params.y_id); 42 size_t cluster_iob0 = this->clusterId(0, 0); 43 size_t cluster_iob1 = this->clusterId(X_SIZE - 1, Y_SIZE - 1); 44 size_t is_iob0 = (cid == cluster_iob0); 45 size_t is_iob1 = (cid == cluster_iob1); 46 bool is_io_cluster = is_iob0 || is_iob1; 47 41 size_t cid = this->clusterId(params.x_id, params.y_id); 48 42 size_t l_width = vci_param_int::S - X_WIDTH - Y_WIDTH; 49 43 … … 67 61 alloc_elems<DspinOutput<dspin_ram_rsp_width> >("p_ext_rsp_out", 4); 68 62 69 // ports in cluster_iob0 and cluster_iob1only63 // ports in IO clusters only 70 64 p_vci_iob_iox_ini = NULL; 71 65 p_vci_iob_iox_tgt = NULL; 72 p_dspin_iob_cmd_out = NULL;73 p_dspin_iob_rsp_in = NULL;74 if ( is_io_cluster ) { 66 if ( params.is_io ) { 67 std::cout << " Creating signals for IOB" << std::endl; 68 75 69 // VCI ports from IOB to IOX network 76 70 p_vci_iob_iox_ini = new soclib::caba::VciInitiator<vci_param_ext>; 77 71 p_vci_iob_iox_tgt = new soclib::caba::VciTarget<vci_param_ext>; 78 79 // DSPIN ports from IOB to RAM network80 p_dspin_iob_cmd_out = new soclib::caba::DspinOutput<dspin_ram_cmd_width>;81 p_dspin_iob_rsp_in = new soclib::caba::DspinInput<dspin_ram_rsp_width>;82 }83 84 // IRQ ports in cluster_iob0 only85 for ( size_t n = 0 ; n < 32 ; n++ ) {86 p_irq[n] = ( is_iob0 ) ? new sc_in<bool> : NULL;87 72 } 88 73 … … 110 95 params.debug_start_cycle, params.proc_debug_ok); 111 96 112 proc[p]->set_dcache_paddr_ext_reset(cid); 113 proc[p]->set_icache_paddr_ext_reset(cid); 97 // Physical address extention register is initialized with local cluster 98 // ID when distributed boot is activated. 99 if (params.distboot) { 100 proc[p]->set_dcache_paddr_ext_reset(cid); 101 proc[p]->set_icache_paddr_ext_reset(cid); 102 } 114 103 } 115 104 … … 149 138 150 139 // Multi-TTY controller 151 mtty 140 mtty = NULL; 152 141 if (NB_DEBUG_TTY_CHANNELS) { 153 142 assert(NB_DEBUG_TTY_CHANNELS < 8); … … 175 164 params.mt_int, 176 165 IntTab(cid, INT_XICU_TGT_ID), 177 32, 32, 32,178 NB_PROCS );166 32, 1, 32, 167 NB_PROCS * IRQ_PER_PROCESSOR); 179 168 180 169 //////////// MDMA … … 195 184 nb_direct_targets++; 196 185 } 197 if ( is_io_cluster) {186 if ( params.is_io ) { 198 187 nb_direct_initiators++; 199 188 nb_direct_targets++; … … 306 295 std::ostringstream s_ram_router_cmd; 307 296 s_ram_router_cmd << "ram_router_cmd_" << params.x_id << "_" << params.y_id; 308 ram_router_cmd = new DspinRouter Tsar<dspin_ram_cmd_width>(297 ram_router_cmd = new DspinRouter<dspin_ram_cmd_width>( 309 298 s_ram_router_cmd.str().c_str(), 310 299 params.x_id, params.y_id, 311 300 X_WIDTH, Y_WIDTH, 312 4, 4, 313 is_iob0, is_iob1, 314 false, 315 l_width); 301 4, 4); 316 302 317 303 std::ostringstream s_ram_router_rsp; 318 304 s_ram_router_rsp << "ram_router_rsp_" << params.x_id << "_" << params.y_id; 319 ram_router_rsp = new DspinRouter Tsar<dspin_ram_rsp_width>(305 ram_router_rsp = new DspinRouter<dspin_ram_rsp_width>( 320 306 s_ram_router_rsp.str().c_str(), 321 307 params.x_id, params.y_id, 322 308 X_WIDTH, Y_WIDTH, 323 4, 4, 324 is_iob0, is_iob1, 325 true, 326 l_width); 309 4, 4); 327 310 328 311 ////////////////////// I/O CLUSTER ONLY /////////////////////// 329 312 iob = NULL; 330 313 iob_ram_wi = NULL; 331 if ( is_io_cluster) {314 if ( params.is_io ) { 332 315 /////////// IO_BRIDGE 333 size_t iox_local_id;334 bool has_irqs;335 if ( is_iob0 ) {336 iox_local_id = 0;337 has_irqs = true;338 }339 else {340 iox_local_id = 1;341 has_irqs = false;342 }343 344 316 std::ostringstream s_iob; 345 317 s_iob << "iob_" << params.x_id << "_" << params.y_id; … … 351 323 IntTab(cid, INT_IOBX_TGT_ID), 352 324 IntTab(cid, INT_IOBX_INI_ID), 353 IntTab(cid, iox_local_id ),354 has_irqs,325 params.iox_iob_tgtid, 326 params.iox_iob_srcid, 355 327 16, 356 328 8, … … 364 336 s_iob_ram_wi.str().c_str(), 365 337 vci_param_int::S); 338 339 std::ostringstream s_ram_xbar_cmd; 340 s_ram_xbar_cmd << "s_ram_xbar_cmd_" << params.x_id << "_" << params.y_id; 341 ram_xbar_cmd = new DspinLocalCrossbar<dspin_ram_cmd_width>( 342 s_ram_xbar_cmd.str().c_str(), // name 343 params.mt_ext, // mapping table 344 params.x_id, params.y_id, // x, y 345 X_WIDTH, Y_WIDTH, l_width, // x_width, y_width, l_width 346 2, 0, // local inputs, local outputs 347 2, 2, // in fifo, out fifo depths 348 true, // is cmd ? 349 false, // use routing table ? 350 false); // support broadcast ? 351 352 std::ostringstream s_ram_xbar_rsp; 353 s_ram_xbar_rsp << "s_ram_xbar_rsp_" << params.x_id << "_" << params.y_id; 354 ram_xbar_rsp = new DspinLocalCrossbar<dspin_ram_rsp_width>( 355 s_ram_xbar_rsp.str().c_str(), // name 356 params.mt_ext, // mapping table 357 params.x_id, params.y_id, // x, y 358 X_WIDTH, Y_WIDTH, l_width, // x_width, y_width, l_width 359 0, 2, // local inputs, local outputs 360 2, 2, // in fifo, out fifo depths 361 false, // is cmd ? 362 true, // use routing table ? 363 false); // support broadcast ? 366 364 } 367 365 … … 372 370 // on coherence network : local srcid[proc] in [0...NB_PROCS-1] 373 371 // : local srcid[memc] = NB_PROCS 374 // In cluster_iob0, 32 HWI interrupts from external peripherals375 // are connected to the XICU ports p_hwi[0:31]376 // In other clusters, no HWI interrupts are connected to XICU377 372 378 373 //////////////////////// internal CMD & RSP routers … … 425 420 } 426 421 427 if ( is_io_cluster) {422 if ( params.is_io ) { 428 423 int_xbar_d->p_to_target[INT_IOBX_TGT_ID] (signal_int_vci_tgt_iobx); 429 424 int_xbar_d->p_to_initiator[INT_IOBX_INI_ID] (signal_int_vci_ini_iobx); … … 480 475 proc[p]->p_dspin_p2m (signal_int_dspin_p2m_proc[p]); 481 476 proc[p]->p_dspin_clack (signal_int_dspin_clack_proc[p]); 482 proc[p]->p_irq[0] (signal_proc_it[p]); 483 for ( size_t j = 1 ; j < 6 ; j++) { 484 proc[p]->p_irq[j] (signal_false); 477 for ( size_t j = 0 ; j < 6 ; j++) { 478 if ( j < IRQ_PER_PROCESSOR ) { 479 proc[p]->p_irq[j] (signal_proc_it[IRQ_PER_PROCESSOR * p + j]); 480 } 481 else { 482 proc[p]->p_irq[j] (signal_false); 483 } 485 484 } 486 485 } … … 490 489 xicu->p_resetn (this->p_resetn); 491 490 xicu->p_vci (signal_int_vci_tgt_xicu); 492 for ( size_t p = 0 ; p < NB_PROCS ; p++) { 493 xicu->p_irq[p] (signal_proc_it[p]); 494 } 495 for ( size_t i=0 ; i<32 ; i++) { 496 if ( is_iob0 ) 497 xicu->p_hwi[i] (*(this->p_irq[i])); 498 else 499 xicu->p_hwi[i] (signal_false); 500 } 491 for ( size_t irq = 0 ; irq < (IRQ_PER_PROCESSOR * NB_PROCS) ; irq++) { 492 xicu->p_irq[irq] (signal_proc_it[irq]); 493 } 494 xicu->p_hwi[0] (signal_irq_memc); 501 495 502 496 ///////////////////////////////////// MEMC … … 564 558 ram_router_rsp->p_in[n] (this->p_dspin_ram_rsp_in[n]); 565 559 } 566 ram_router_cmd->p_out[4] (signal_ram_dspin_cmd_xram_t); 567 ram_router_cmd->p_in[4] (signal_ram_dspin_cmd_memc_i); 568 ram_router_rsp->p_out[4] (signal_ram_dspin_rsp_memc_i); 569 ram_router_rsp->p_in[4] (signal_ram_dspin_rsp_xram_t); 570 571 ///////////////////////// IOB exists only in cluster_iob0 & cluster_iob1. 572 if ( is_io_cluster ) { 560 561 ram_router_cmd->p_out[4] (signal_ram_dspin_cmd_xram_t); 562 if (params.is_io) ram_router_cmd->p_in[4] (signal_ram_dspin_cmd_xbar); 563 else ram_router_cmd->p_in[4] (signal_ram_dspin_cmd_memc_i); 564 565 ram_router_rsp->p_in[4] (signal_ram_dspin_rsp_xram_t); 566 if (params.is_io) ram_router_rsp->p_out[4] (signal_ram_dspin_rsp_xbar); 567 else ram_router_rsp->p_out[4] (signal_ram_dspin_rsp_memc_i); 568 569 ///////////////////////// IOB exists only in IO clusters. 570 if ( params.is_io ) { 573 571 // IO bridge 574 572 iob->p_clk (this->p_clk); … … 580 578 iob->p_vci_ini_ram (signal_ram_vci_ini_iobx); 581 579 582 if ( is_iob0 ) {583 for ( size_t n = 0 ; n < 32 ; n++ ) {584 (*iob->p_irq[n]) (*(this->p_irq[n]));585 }586 }587 588 580 // initiator wrapper to RAM network 589 iob_ram_wi->p_clk (this->p_clk); 590 iob_ram_wi->p_resetn (this->p_resetn); 591 iob_ram_wi->p_dspin_cmd (*(this->p_dspin_iob_cmd_out)); 592 iob_ram_wi->p_dspin_rsp (*(this->p_dspin_iob_rsp_in)); 593 iob_ram_wi->p_vci (signal_ram_vci_ini_iobx); 594 } 581 iob_ram_wi->p_clk (this->p_clk); 582 iob_ram_wi->p_resetn (this->p_resetn); 583 iob_ram_wi->p_dspin_cmd (signal_ram_dspin_cmd_iob_i); 584 iob_ram_wi->p_dspin_rsp (signal_ram_dspin_rsp_iob_i); 585 iob_ram_wi->p_vci (signal_ram_vci_ini_iobx); 586 587 ram_xbar_cmd->p_clk (this->p_clk); 588 ram_xbar_cmd->p_resetn (this->p_resetn); 589 ram_xbar_cmd->p_global_out (signal_ram_dspin_cmd_xbar); 590 ram_xbar_cmd->p_global_in (signal_ram_dspin_cmd_false); 591 ram_xbar_cmd->p_local_in[0] (signal_ram_dspin_cmd_memc_i); 592 ram_xbar_cmd->p_local_in[1] (signal_ram_dspin_cmd_iob_i); 593 594 ram_xbar_rsp->p_clk (this->p_clk); 595 ram_xbar_rsp->p_resetn (this->p_resetn); 596 ram_xbar_rsp->p_global_out (signal_ram_dspin_rsp_false); 597 ram_xbar_rsp->p_global_in (signal_ram_dspin_rsp_xbar); 598 ram_xbar_rsp->p_local_out[0] (signal_ram_dspin_rsp_memc_i); 599 ram_xbar_rsp->p_local_out[1] (signal_ram_dspin_rsp_iob_i); 600 } 601 602 SC_METHOD(init); 595 603 } // end constructor 604 605 tmpl(void)::init() { 606 signal_ram_dspin_cmd_false.write = false; 607 signal_ram_dspin_cmd_false.read = true; 608 signal_ram_dspin_rsp_false.write = false; 609 signal_ram_dspin_rsp_false.read = true; 610 } 596 611 597 612 tmpl(/**/)::~TsarIobCluster() { 598 613 if (p_vci_iob_iox_ini) delete p_vci_iob_iox_ini; 599 614 if (p_vci_iob_iox_tgt) delete p_vci_iob_iox_tgt; 600 if (p_dspin_iob_cmd_out) delete p_dspin_iob_cmd_out;601 if (p_dspin_iob_rsp_in) delete p_dspin_iob_rsp_in;602 615 if (iob) delete iob; 603 616 if (iob_ram_wi) delete iob_ram_wi; 604 605 for (size_t n = 0 ; n < 32 ; n++) {606 if (p_irq[n]) delete p_irq[n];607 }608 617 609 618 for (size_t p = 0; p < NB_PROCS; p++) { … … 627 636 delete ram_router_cmd; 628 637 delete ram_router_rsp; 638 delete ram_xbar_cmd; 639 delete ram_xbar_rsp; 629 640 } 630 641
Note: See TracChangeset
for help on using the changeset viewer.