- Timestamp:
- Jan 20, 2015, 4:06:49 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/reconfiguration/platforms/tsar_generic_iob/top.cpp
r916 r926 133 133 #include "vci_framebuffer.h" 134 134 #include "vci_iox_network.h" 135 #include "vci_iox_network.h"136 135 #include "vci_iopic.h" 137 136 #include "vci_simhelper.h" … … 213 212 214 213 #define cluster(x, y) ((y) + ((x) << Y_WIDTH)) 215 216 ////////////////////////////////////////////////////////////217 // Software to be loaded in ROM & RAM218 //////////////////////i/////////////////////////////////////219 220 #define BOOT_SOFT_NAME "../../softs/tsar_boot/preloader.elf"221 214 222 215 //////////////////////////////////////////////////////////// … … 272 265 #define INT_XICU_TGT_ID 1 273 266 #define INT_MDMA_TGT_ID 2 274 #define INT_ BROM_TGT_ID 3267 #define INT_DROM_TGT_ID 3 275 268 #define INT_IOBX_TGT_ID 4 276 269 … … 299 292 #define IOX_IOPI_TGT_ID 5 300 293 #define IOX_SIMH_TGT_ID 6 301 #define IOX_IOB0_TGT_ID 7 302 #define IOX_IOB1_TGT_ID 8 294 #define IOX_ROM_TGT_ID 7 295 #define IOX_IOB0_TGT_ID 8 296 #define IOX_IOB1_TGT_ID 9 303 297 304 298 #define IOX_BDEV_INI_ID 0 … … 317 311 318 312 319 char soft_name[256] = BOOT_SOFT_NAME; // pathname: binary code 313 char dsoft_name[256] = ""; // pathname: binary code 314 char soft_name[256] = ""; // pathname: binary code 320 315 size_t ncycles = UINT_MAX; // simulated cycles 321 316 char disk_name[256] = BDEV_IMAGE_NAME; // pathname: disk image … … 348 343 { 349 344 strcpy(soft_name, argv[n+1]); 345 } 346 else if ((strcmp(argv[n], "-DSOFT") == 0) && (n+1<argc) ) 347 { 348 strcpy(dsoft_name, argv[n+1]); 350 349 } 351 350 else if ((strcmp(argv[n], "-DEBUG") == 0) && (n+1<argc) ) … … 444 443 std::cout << " Accepted arguments are :" << std::endl << std::endl; 445 444 std::cout << " -SOFT pathname_for_embedded_soft" << std::endl; 445 std::cout << " -DSOFT pathname_for_distributed_embedded_soft" << std::endl; 446 446 std::cout << " -DISK pathname_for_disk_image" << std::endl; 447 447 std::cout << " -NCYCLES number_of_simulated_cycles" << std::endl; … … 580 580 IntTab(cluster(x, y), INT_MDMA_TGT_ID), not cacheable)); 581 581 582 std::ostringstream s brom;583 s brom << "int_seg_brom_" << x << "_" << y;584 maptab_int.add(Segment(s brom.str(), SEG_ROM_BASE+offset, SEG_ROM_SIZE,585 IntTab(cluster(x, y), INT_ BROM_TGT_ID), cacheable));582 std::ostringstream sdrom; 583 sdrom << "int_seg_drom_" << x << "_" << y; 584 maptab_int.add(Segment(sdrom.str(), SEG_DROM_BASE+offset, SEG_DROM_SIZE, 585 IntTab(cluster(x, y), INT_DROM_TGT_ID), cacheable)); 586 586 587 587 // the following segments are only defined in cluster_iob0 or in cluster_iob1 … … 628 628 maptab_int.add(Segment(ssim.str(), SEG_SIM_BASE+offset, SEG_SIM_SIZE, 629 629 IntTab(cluster(x, y), INT_IOBX_TGT_ID), not cacheable)); 630 631 std::ostringstream srom; 632 srom << "int_seg_rom_" << x << "_" << y; 633 maptab_int.add(Segment(srom.str(), SEG_ROM_BASE+offset, SEG_ROM_SIZE, 634 IntTab(cluster(x, y), INT_IOBX_TGT_ID), cacheable)); 630 635 } 631 636 … … 711 716 // - two levels srcid decoding for responses 712 717 // - 5 initiators (IOB0, IOB1, BDEV, CDMA, IOPI) 713 // - 9 targets (IOB0, IOB1, BDEV, CDMA, MTTY, FBUF, BROM, MNIC, IOPI)718 // - 9 targets (IOB0, IOB1, BDEV, CDMA, MTTY, FBUF, ROM, MNIC, IOPI) 714 719 // 715 720 // Address bit 32 is used to determine if a command must be routed to … … 743 748 maptab_iox.add(Segment("iox_seg_simh_0", SEG_SIM_BASE + iob0_base, SEG_SIM_SIZE, 744 749 IntTab(0, IOX_SIMH_TGT_ID), false)); 750 maptab_iox.add(Segment("iox_seg_rom_0", SEG_ROM_BASE + iob0_base, SEG_ROM_SIZE, 751 IntTab(0, IOX_ROM_TGT_ID), false)); 745 752 746 753 if ( cluster_iob0 != cluster_iob1 ) … … 763 770 maptab_iox.add(Segment("iox_seg_simh_1", SEG_SIM_BASE + iob1_base, SEG_SIM_SIZE, 764 771 IntTab(0, IOX_SIMH_TGT_ID), false)); 772 maptab_iox.add(Segment("iox_seg_rom_1", SEG_ROM_BASE + iob1_base, SEG_ROM_SIZE, 773 IntTab(0, IOX_ROM_TGT_ID), false)); 765 774 } 766 775 … … 858 867 VciSignals<vci_param_ext> signal_vci_tgt_iopi("signal_vci_ini_iopi"); 859 868 VciSignals<vci_param_ext> signal_vci_tgt_simh("signal_vci_ini_simh"); 869 VciSignals<vci_param_ext> signal_vci_tgt_rom("signal_vci_ini_rom"); 860 870 861 871 // Horizontal inter-clusters INT network DSPIN … … 929 939 almos_kernel_pathname); 930 940 #else 931 soclib::common::Loader loader(soft_name );941 soclib::common::Loader loader(soft_name, dsoft_name); 932 942 #endif 933 943 … … 946 956 947 957 const size_t nb_iox_initiators = (cluster_iob0 != cluster_iob1) ? 5 : 4; 948 const size_t nb_iox_targets = (cluster_iob0 != cluster_iob1) ? 9 : 8;958 const size_t nb_iox_targets = (cluster_iob0 != cluster_iob1) ? 10 : 9; 949 959 950 960 // IOX network … … 1022 1032 maptab_iox ); 1023 1033 1034 // External ROM 1035 VciSimpleRom<vci_param_ext>* rom; 1036 rom = new VciSimpleRom<vci_param_ext>("rom", 1037 IntTab(0, IOX_ROM_TGT_ID), 1038 maptab_iox, 1039 loader, 1040 X_WIDTH + Y_WIDTH ); 1041 1024 1042 // Clusters 1025 1043 TsarIobCluster<vci_param_int, … … 1089 1107 INT_XICU_TGT_ID, 1090 1108 INT_MDMA_TGT_ID, 1091 INT_ BROM_TGT_ID,1109 INT_DROM_TGT_ID, 1092 1110 INT_IOBX_TGT_ID, 1093 1111 … … 1202 1220 iox_network->p_to_tgt[IOX_IOPI_TGT_ID] (signal_vci_tgt_iopi); 1203 1221 iox_network->p_to_tgt[IOX_SIMH_TGT_ID] (signal_vci_tgt_simh); 1222 iox_network->p_to_tgt[IOX_ROM_TGT_ID] (signal_vci_tgt_rom); 1204 1223 1205 1224 if (cluster_iob0 != cluster_iob1) … … 1285 1304 simh->p_vci(signal_vci_tgt_simh); 1286 1305 1306 // External ROM connexion 1307 rom->p_clk(signal_clk); 1308 rom->p_resetn(signal_resetn); 1309 rom->p_vci(signal_vci_tgt_rom); 1310 1287 1311 // IOB0 cluster connexion to IOX network 1288 1312 (*clusters[0][0]->p_vci_iob_iox_ini) (signal_vci_ini_iob0);
Note: See TracChangeset
for help on using the changeset viewer.