Changeset 547 for trunk/platforms/tsar_generic_xbar/top.cpp
- Timestamp:
- Oct 7, 2013, 5:31:08 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/platforms/tsar_generic_xbar/top.cpp
r512 r547 125 125 #define cluster(x,y) (y + YMAX * x) 126 126 127 #define min(x, y) (x < y ? x : y) 128 127 129 /////////////////////////////////////////////////////////// 128 130 // DSPIN parameters … … 229 231 //////////////////////i///////////////////////////////////// 230 232 231 #define MAX_FROZEN_CYCLES 100000 233 #define MAX_FROZEN_CYCLES 1000000 232 234 233 235 ///////////////////////////////////////////////////////// … … 239 241 ///////////////////////////////////////////////////////// 240 242 241 // specific segments in "IO" cluster : absolute physical address 242 243 #define BROM_BASE 0x00BFC00000 244 #define BROM_SIZE 0x0000100000 // 1 Mbytes 245 246 #define FBUF_BASE 0x00B2000000 247 #define FBUF_SIZE (FBUF_X_SIZE * FBUF_Y_SIZE * 2) 248 249 #define BDEV_BASE 0x00B3000000 250 #define BDEV_SIZE 0x0000001000 // 4 Kbytes 251 252 #define MTTY_BASE 0x00B4000000 253 #define MTTY_SIZE 0x0000001000 // 4 Kbytes 254 255 #define MNIC_BASE 0x00B5000000 256 #define MNIC_SIZE 0x0000080000 // 512 Kbytes (for 8 channels) 257 258 #define CDMA_BASE 0x00B6000000 259 #define CDMA_SIZE 0x0000004000 * NB_CMA_CHANNELS 260 261 // replicated segments : address is incremented by a cluster offset 262 // offset = cluster(x,y) << (address_width-x_width-y_width); 263 264 #define MEMC_BASE 0x0000000000 265 #define MEMC_SIZE 0x0010000000 // 256 Mbytes per cluster 243 #ifdef USE_GIET 244 // specific segments in "IO" cluster : absolute physical address 245 #define BROM_BASE 0x00BFC00000 246 #define BROM_SIZE 0x0000100000 // 1 Mbytes 247 248 #define FBUF_BASE 0x00B2000000 249 #define FBUF_SIZE (FBUF_X_SIZE * FBUF_Y_SIZE * 2) 250 251 #define BDEV_BASE 0x00B3000000 252 #define BDEV_SIZE 0x0000001000 // 4 Kbytes 253 254 #define MTTY_BASE 0x00B4000000 255 #define MTTY_SIZE 0x0000001000 // 4 Kbytes 256 257 #define MNIC_BASE 0x00B5000000 258 #define MNIC_SIZE 0x0000080000 // 512 Kbytes (for 8 channels) 259 260 #define CDMA_BASE 0x00B6000000 261 #define CDMA_SIZE 0x0000004000 * NB_CMA_CHANNELS 262 263 // replicated segments : address is incremented by a cluster offset 264 // offset = cluster(x,y) << (address_width-x_width-y_width); 265 266 #define MEMC_BASE 0x0000000000 267 #define MEMC_SIZE 0x0010000000 // 256 Mbytes per cluster 268 269 #define XICU_BASE 0x00B0000000 270 #define XICU_SIZE 0x0000001000 // 4 Kbytes 271 272 #define MDMA_BASE 0x00B1000000 273 #define MDMA_SIZE 0x0000001000 * NB_DMA_CHANNELS // 4 Kbytes per channel 274 275 #define SIMH_BASE 0x00B7000000 276 #define SIMH_SIZE 0x0000001000 277 #endif 266 278 267 279 #ifdef USE_ALMOS 268 #define XICU_BASE 0x0030000000 269 #endif 270 #ifdef USE_GIET 271 #define XICU_BASE 0x00B0000000 272 #endif 273 #define XICU_SIZE 0x0000001000 // 4 Kbytes 274 275 #ifdef USE_ALMOS 276 #define MDMA_BASE 0x0031000000 277 #endif 278 #ifdef USE_GIET 279 #define MDMA_BASE 0x00B1000000 280 #endif 281 #define MDMA_SIZE 0x0000001000 * NB_DMA_CHANNELS // 4 Kbytes per channel 280 #define CLUSTER_INC (0x80000000ULL / (XMAX * YMAX) * 2) 281 282 #define MEMC_BASE 0x0000000000 283 #define MEMC_SIZE min(0x02000000, (0x80000000 / (XMAX * YMAX))) 284 285 #define BROM_BASE 0x00BFC00000 286 #define BROM_SIZE 0x0000100000 // 1 Mbytes 287 288 #define XICU_BASE (MEMC_SIZE) 289 #define XICU_SIZE 0x0000001000 // 4 Kbytes 290 291 #define MDMA_BASE (XICU_BASE + XICU_SIZE) 292 #define MDMA_SIZE 0x0000001000 * NB_DMA_CHANNELS // 4 Kbytes per channel 293 294 #define BDEV_BASE ((cluster_io_id * (CLUSTER_INC)) + MDMA_BASE + MDMA_SIZE) 295 #define BDEV_SIZE 0x0000001000 // 4 Kbytes 296 297 #define MTTY_BASE (BDEV_BASE + BDEV_SIZE) 298 #define MTTY_SIZE 0x0000001000 // 4 Kbytes 299 300 #define FBUF_BASE (MTTY_BASE + MTTY_SIZE) 301 #define FBUF_SIZE (FBUF_X_SIZE * FBUF_Y_SIZE * 2) // Should be 0x80000 302 303 // Unused in almos 304 #define MNIC_BASE (FBUF_BASE + FBUF_SIZE) 305 #define MNIC_SIZE 0x0000001000 306 307 #define CDMA_BASE (MNIC_BASE + MNIC_SIZE) 308 #define CDMA_SIZE 0x0000004000 * NB_CMA_CHANNELS 309 310 #endif 311 282 312 283 313 //////////////////////////////////////////////////////////////////// … … 295 325 #define BROM_TGTID 7 296 326 #define CDMA_TGTID 8 327 #define SIMH_TGTID 9 297 328 298 329 bool stop_called = false; … … 438 469 std::cout << " - RAM_LATENCY = " << XRAM_LATENCY << std::endl; 439 470 std::cout << " - MAX_FROZEN = " << frozen_cycles << std::endl; 471 std::cout << "[PROCS] " << NB_PROCS_MAX * XMAX * YMAX << std::endl; 440 472 441 473 std::cout << std::endl; … … 498 530 // internal network 499 531 MappingTable maptabd(vci_address_width, 500 IntTab(x_width + y_width, 16- x_width - y_width),532 IntTab(x_width + y_width, 20 - x_width - y_width), 501 533 IntTab(x_width + y_width, vci_srcid_width - x_width - y_width), 502 0x00FF 000000);534 0x00FF800000); 503 535 504 536 for (size_t x = 0; x < XMAX; x++) … … 510 542 << (vci_address_width-x_width-y_width); 511 543 544 std::ostringstream si; 545 si << "seg_xicu_" << x << "_" << y; 546 maptabd.add(Segment(si.str(), XICU_BASE + offset, XICU_SIZE, 547 IntTab(cluster(x,y),XICU_TGTID), false)); 548 549 std::ostringstream sd; 550 sd << "seg_mdma_" << x << "_" << y; 551 maptabd.add(Segment(sd.str(), MDMA_BASE + offset, MDMA_SIZE, 552 IntTab(cluster(x,y),MDMA_TGTID), false)); 553 512 554 std::ostringstream sh; 513 555 sh << "seg_memc_" << x << "_" << y; 514 maptabd.add(Segment(sh.str(), MEMC_BASE+offset, MEMC_SIZE, 515 IntTab(cluster(x,y),MEMC_TGTID), true)); 516 517 std::ostringstream si; 518 si << "seg_xicu_" << x << "_" << y; 519 maptabd.add(Segment(si.str(), XICU_BASE+offset, XICU_SIZE, 520 IntTab(cluster(x,y),XICU_TGTID), false)); 521 522 std::ostringstream sd; 523 sd << "seg_mdma_" << x << "_" << y; 524 maptabd.add(Segment(sd.str(), MDMA_BASE+offset, MDMA_SIZE, 525 IntTab(cluster(x,y),MDMA_TGTID), false)); 556 maptabd.add(Segment(sh.str(), MEMC_BASE + offset, MEMC_SIZE, 557 IntTab(cluster(x,y),MEMC_TGTID), true)); 526 558 527 559 if ( cluster(x,y) == cluster_io_id ) … … 533 565 maptabd.add(Segment("seg_bdev", BDEV_BASE, BDEV_SIZE, 534 566 IntTab(cluster(x,y),BDEV_TGTID), false)); 567 maptabd.add(Segment("seg_brom", BROM_BASE, BROM_SIZE, 568 IntTab(cluster(x,y),BROM_TGTID), true)); 535 569 maptabd.add(Segment("seg_mnic", MNIC_BASE, MNIC_SIZE, 536 570 IntTab(cluster(x,y),MNIC_TGTID), false)); 537 571 maptabd.add(Segment("seg_cdma", CDMA_BASE, CDMA_SIZE, 538 572 IntTab(cluster(x,y),CDMA_TGTID), false)); 539 maptabd.add(Segment("seg_ brom", BROM_BASE, BROM_SIZE,540 IntTab(cluster(x,y), BROM_TGTID), true));573 maptabd.add(Segment("seg_simh", SIMH_BASE, SIMH_SIZE, 574 IntTab(cluster(x,y),SIMH_TGTID), false)); 541 575 } 542 576 } … … 562 596 sh << "x_seg_memc_" << x << "_" << y; 563 597 564 maptabx.add(Segment(sh.str(), MEMC_BASE +offset,598 maptabx.add(Segment(sh.str(), MEMC_BASE + offset, 565 599 MEMC_SIZE, IntTab(cluster(x,y)), false)); 566 600 } … … 670 704 CDMA_TGTID, 671 705 BDEV_TGTID, 706 SIMH_TGTID, 672 707 MEMC_WAYS, 673 708 MEMC_SETS, … … 981 1016 } 982 1017 1018 void voidhandler(int dummy = 0) {} 983 1019 984 1020 int sc_main (int argc, char *argv[]) 985 1021 { 986 1022 signal(SIGINT, handler); 1023 signal(SIGPIPE, voidhandler); 987 1024 988 1025 try {
Note: See TracChangeset
for help on using the changeset viewer.