Changeset 544 for branches/ODCCP/modules/vci_mem_cache/caba
- Timestamp:
- Oct 4, 2013, 2:34:03 PM (11 years ago)
- Location:
- branches/ODCCP/modules/vci_mem_cache/caba/source
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/ODCCP/modules/vci_mem_cache/caba/source/include
-
Property
svn:mergeinfo
set to
(toggle deleted branches)
/trunk/modules/vci_mem_cache/caba/source/include merged eligible /branches/v5/modules/vci_mem_cache/caba/source/include 441-467
-
Property
svn:mergeinfo
set to
(toggle deleted branches)
-
branches/ODCCP/modules/vci_mem_cache/caba/source/include/mem_cache_directory.h
r494 r544 235 235 236 236 bool hit = false; 237 for ( size_t i=0 ; i<m_ways ; i++ ) { 237 for ( size_t i=0 ; i<m_ways ; i++ ) 238 { 238 239 bool equal = ( m_dir_tab[set][i].tag == tag ); 239 240 bool valid = m_dir_tab[set][i].valid; 240 241 hit = equal && valid; 241 if ( hit ) { 242 if ( hit ) 243 { 242 244 way = i; 243 245 break; 244 246 } 245 247 } 246 if ( hit ) { 248 if ( hit ) 249 { 247 250 m_lru_tab[set][way].recent = true; 248 251 return DirectoryEntry(m_dir_tab[set][way]); 249 } else { 252 } 253 else 254 { 250 255 return DirectoryEntry(); 251 256 } -
branches/ODCCP/modules/vci_mem_cache/caba/source/include/vci_mem_cache.h
r494 r544 80 80 { 81 81 TGT_CMD_IDLE, 82 TGT_CMD_ERROR,83 82 TGT_CMD_READ, 84 83 TGT_CMD_WRITE, 85 84 TGT_CMD_CAS, 85 TGT_CMD_ERROR, 86 86 TGT_CMD_CONFIG 87 87 }; … … 90 90 enum tgt_rsp_fsm_state_e 91 91 { 92 TGT_RSP_CONFIG_IDLE,93 TGT_RSP_TGT_CMD_IDLE,94 92 TGT_RSP_READ_IDLE, 95 93 TGT_RSP_WRITE_IDLE, … … 98 96 TGT_RSP_MULTI_ACK_IDLE, 99 97 TGT_RSP_CLEANUP_IDLE, 100 TGT_RSP_CONFIG ,101 TGT_RSP_TGT_CMD ,98 TGT_RSP_CONFIG_IDLE, 99 TGT_RSP_TGT_CMD_IDLE, 102 100 TGT_RSP_READ, 103 101 TGT_RSP_WRITE, … … 105 103 TGT_RSP_XRAM, 106 104 TGT_RSP_MULTI_ACK, 107 TGT_RSP_CLEANUP 105 TGT_RSP_CLEANUP, 106 TGT_RSP_CONFIG, 107 TGT_RSP_TGT_CMD 108 108 }; 109 109 … … 120 120 enum cc_send_fsm_state_e 121 121 { 122 CC_SEND_CONFIG_IDLE,123 122 CC_SEND_XRAM_RSP_IDLE, 124 123 CC_SEND_WRITE_IDLE, 125 124 CC_SEND_CAS_IDLE, 126 CC_SEND_CONFIG_INVAL_HEADER, 127 CC_SEND_CONFIG_INVAL_NLINE, 128 CC_SEND_CONFIG_BRDCAST_HEADER, 129 CC_SEND_CONFIG_BRDCAST_NLINE, 125 CC_SEND_CONFIG_IDLE, 130 126 CC_SEND_XRAM_RSP_BRDCAST_HEADER, 131 127 CC_SEND_XRAM_RSP_BRDCAST_NLINE, … … 142 138 CC_SEND_CAS_UPDT_NLINE, 143 139 CC_SEND_CAS_UPDT_DATA, 144 CC_SEND_CAS_UPDT_DATA_HIGH 140 CC_SEND_CAS_UPDT_DATA_HIGH, 141 CC_SEND_CONFIG_INVAL_HEADER, 142 CC_SEND_CONFIG_INVAL_NLINE, 143 CC_SEND_CONFIG_BRDCAST_HEADER, 144 CC_SEND_CONFIG_BRDCAST_NLINE 145 145 }; 146 146 … … 324 324 { 325 325 ALLOC_DIR_RESET, 326 ALLOC_DIR_CONFIG,327 326 ALLOC_DIR_READ, 328 327 ALLOC_DIR_WRITE, 329 328 ALLOC_DIR_CAS, 330 329 ALLOC_DIR_CLEANUP, 331 ALLOC_DIR_XRAM_RSP 330 ALLOC_DIR_XRAM_RSP, 331 ALLOC_DIR_CONFIG 332 332 }; 333 333 … … 414 414 uint32_t m_cpt_cycles; // Counter of cycles 415 415 416 uint32_t m_cpt_read; // Number of READ transactions 416 // Counters accessible in software (not yet but eventually) 417 uint32_t m_cpt_read_local; // Number of local READ transactions 417 418 uint32_t m_cpt_read_remote; // number of remote READ transactions 418 uint32_t m_cpt_read_flits; // number of flits for READs419 419 uint32_t m_cpt_read_cost; // Number of (flits * distance) for READs 420 420 421 uint32_t m_cpt_read_miss; // Number of MISS READ 422 423 uint32_t m_cpt_write; // Number of WRITE transactions 421 uint32_t m_cpt_write_local; // Number of local WRITE transactions 424 422 uint32_t m_cpt_write_remote; // number of remote WRITE transactions 425 uint32_t m_cpt_write_flits; // number of flits for WRITEs 423 uint32_t m_cpt_write_flits_local; // number of flits for local WRITEs 424 uint32_t m_cpt_write_flits_remote; // number of flits for remote WRITEs 426 425 uint32_t m_cpt_write_cost; // Number of (flits * distance) for WRITEs 427 426 427 uint32_t m_cpt_ll_local; // Number of local LL transactions 428 uint32_t m_cpt_ll_remote; // number of remote LL transactions 429 uint32_t m_cpt_ll_cost; // Number of (flits * distance) for LLs 430 431 uint32_t m_cpt_sc_local; // Number of local SC transactions 432 uint32_t m_cpt_sc_remote; // number of remote SC transactions 433 uint32_t m_cpt_sc_cost; // Number of (flits * distance) for SCs 434 435 uint32_t m_cpt_cas_local; // Number of local SC transactions 436 uint32_t m_cpt_cas_remote; // number of remote SC transactions 437 uint32_t m_cpt_cas_cost; // Number of (flits * distance) for SCs 438 439 uint32_t m_cpt_update; // Number of requests causing an UPDATE 440 uint32_t m_cpt_update_local; // Number of local UPDATE transactions 441 uint32_t m_cpt_update_remote; // Number of remote UPDATE transactions 442 uint32_t m_cpt_update_cost; // Number of (flits * distance) for UPDT 443 444 uint32_t m_cpt_m_inval; // Number of requests causing M_INV 445 uint32_t m_cpt_m_inval_local; // Number of local M_INV transactions 446 uint32_t m_cpt_m_inval_remote; // Number of remote M_INV transactions 447 uint32_t m_cpt_m_inval_cost; // Number of (flits * distance) for M_INV 448 449 uint32_t m_cpt_br_inval; // Number of BROADCAST INVAL 450 451 uint32_t m_cpt_cleanup_local; // Number of local CLEANUP transactions 452 uint32_t m_cpt_cleanup_remote; // Number of remote CLEANUP transactions 453 uint32_t m_cpt_cleanup_cost; // Number of (flits * distance) for CLEANUPs 454 455 // Counters not accessible by software 456 uint32_t m_cpt_read_miss; // Number of MISS READ 428 457 uint32_t m_cpt_write_miss; // Number of MISS WRITE 429 uint32_t m_cpt_write_cells; // Cumulated length for WRITE transactions430 458 uint32_t m_cpt_write_dirty; // Cumulated length for WRITE transactions 431 uint32_t m_cpt_update; // Number of UPDATE transactions 459 uint32_t m_cpt_write_broadcast;// Number of BROADCAST INVAL because write 460 432 461 uint32_t m_cpt_trt_rb; // Read blocked by a hit in trt 433 462 uint32_t m_cpt_trt_full; // Transaction blocked due to a full trt … … 441 470 uint32_t m_cpt_sc; // Number of SC transactions 442 471 uint32_t m_cpt_cas; // Number of CAS transactions 443 444 472 uint32_t m_cpt_read_fsm_dir_lock; // wait DIR LOCK 445 473 uint32_t m_cpt_read_fsm_n_dir_lock; // NB DIR LOCK … … 520 548 uint32_t m_cpt_heap_unused; // NB cycles HEAP LOCK unused 521 549 522 uint32_t m_cpt_cleanup_cost; // Number of (flits * distance) for CLEANUPs523 524 550 uint32_t m_cpt_update_flits; // Number of flits for UPDATEs 525 uint32_t m_cpt_update_cost; // Number of (flits * distance) for UPDATEs526 527 551 uint32_t m_cpt_inval_cost; // Number of (flits * distance) for INVALs 528 552 529 553 uint32_t m_cpt_get; 530 531 554 uint32_t m_cpt_put; 532 555 … … 546 569 soclib::caba::DspinOutput<dspin_out_width> p_dspin_clack; 547 570 571 #if MONITOR_MEMCACHE_FSM == 1 572 sc_out<int> p_read_fsm; 573 sc_out<int> p_write_fsm; 574 sc_out<int> p_xram_rsp_fsm; 575 sc_out<int> p_cas_fsm; 576 sc_out<int> p_cleanup_fsm; 577 sc_out<int> p_config_fsm; 578 sc_out<int> p_alloc_heap_fsm; 579 sc_out<int> p_alloc_dir_fsm; 580 sc_out<int> p_alloc_trt_fsm; 581 sc_out<int> p_alloc_upt_fsm; 582 sc_out<int> p_alloc_ivt_fsm; 583 sc_out<int> p_tgt_cmd_fsm; 584 sc_out<int> p_tgt_rsp_fsm; 585 sc_out<int> p_ixr_cmd_fsm; 586 sc_out<int> p_ixr_rsp_fsm; 587 sc_out<int> p_cc_send_fsm; 588 sc_out<int> p_cc_receive_fsm; 589 sc_out<int> p_multi_ack_fsm; 590 #endif 591 548 592 VciMemCache( 549 593 sc_module_name name, // Instance Name … … 553 597 const soclib::common::IntTab &tgtid_d, // global index INT network 554 598 const size_t cc_global_id, // global index CC network 599 const size_t x_width, // X width in platform 600 const size_t y_width, // Y width in platform 555 601 const size_t nways, // Number of ways per set 556 602 const size_t nsets, // Number of sets … … 566 612 ~VciMemCache(); 567 613 568 void clear_stats(); 569 void print_stats(); 614 void print_stats(bool activity_counters, bool stats); 570 615 void print_trace(); 571 616 void cache_monitor(addr_t addr); … … 578 623 void genMoore(); 579 624 void check_monitor(addr_t addr, data_t data, bool read); 625 uint32_t req_distance(uint32_t req_srcid); 626 bool is_local_req(uint32_t req_srcid); 580 627 581 628 // Component attributes … … 591 638 const size_t m_words; // Number of words in a line 592 639 const size_t m_cc_global_id; // global_index on cc network 640 const size_t m_xwidth; // number of x bits in platform 641 const size_t m_ywidth; // number of y bits in platform 593 642 size_t m_debug_start_cycle; 594 643 bool m_debug_ok; … … 665 714 666 715 sc_signal<int> r_tgt_cmd_fsm; 667 sc_signal<size_t> r_tgt_cmd_srcid; // srcid for response to config668 sc_signal<size_t> r_tgt_cmd_trdid; // trdid for response to config669 sc_signal<size_t> r_tgt_cmd_pktid; // pktid for response to config670 716 671 717 /////////////////////////////////////////////////////// … … 696 742 sc_signal<bool> r_config_to_ixr_cmd_req; // valid request 697 743 sc_signal<size_t> r_config_to_ixr_cmd_index; // TRT index 698 699 744 700 745 // Buffer between CONFIG fsm and TGT_RSP fsm (send a done response to L1 cache) … … 776 821 sc_signal<size_t> r_write_upt_index; // index in Update Table 777 822 sc_signal<bool> r_write_sc_fail; // sc command failed 778 sc_signal<bool> r_write_pending_sc; // sc command pending 823 sc_signal<data_t> r_write_sc_key; // sc command key 824 sc_signal<bool> r_write_bc_data_we; // Write enable for data buffer 779 825 780 826 // Buffer between WRITE fsm and TGT_RSP fsm (acknowledge a write command from L1) … … 787 833 // Buffer between WRITE fsm and IXR_CMD fsm 788 834 sc_signal<bool> r_write_to_ixr_cmd_req; // valid request 789 sc_signal<bool> r_write_to_ixr_cmd_put; // request type (GET/PUT)790 835 sc_signal<size_t> r_write_to_ixr_cmd_index; // TRT index 791 836 … … 891 936 // Buffer between CAS fsm and IXR_CMD fsm 892 937 sc_signal<bool> r_cas_to_ixr_cmd_req; // valid request 893 sc_signal<bool> r_cas_to_ixr_cmd_put; // request type (GET/PUT)894 938 sc_signal<size_t> r_cas_to_ixr_cmd_index; // TRT index 895 939 -
branches/ODCCP/modules/vci_mem_cache/caba/source/src/vci_mem_cache.cpp
-
Property
svn:mergeinfo
set to
(toggle deleted branches)
/trunk/modules/vci_mem_cache/caba/source/src/vci_mem_cache.cpp merged eligible /branches/v5/modules/vci_mem_cache/caba/source/src/vci_mem_cache.cpp 441-467
r543 r544 64 64 { 65 65 "TGT_CMD_IDLE", 66 "TGT_CMD_ERROR",67 66 "TGT_CMD_READ", 68 67 "TGT_CMD_WRITE", 69 68 "TGT_CMD_CAS", 69 "TGT_CMD_ERROR", 70 70 "TGT_CMD_CONFIG" 71 71 }; 72 72 const char *tgt_rsp_fsm_str[] = 73 73 { 74 "TGT_RSP_CONFIG_IDLE",75 "TGT_RSP_TGT_CMD_IDLE",76 74 "TGT_RSP_READ_IDLE", 77 75 "TGT_RSP_WRITE_IDLE", … … 80 78 "TGT_RSP_MULTI_ACK_IDLE", 81 79 "TGT_RSP_CLEANUP_IDLE", 82 "TGT_RSP_CONFIG ",83 "TGT_RSP_TGT_CMD ",80 "TGT_RSP_CONFIG_IDLE", 81 "TGT_RSP_TGT_CMD_IDLE", 84 82 "TGT_RSP_READ", 85 83 "TGT_RSP_WRITE", … … 87 85 "TGT_RSP_XRAM", 88 86 "TGT_RSP_MULTI_ACK", 89 "TGT_RSP_CLEANUP" 87 "TGT_RSP_CLEANUP", 88 "TGT_RSP_CONFIG", 89 "TGT_RSP_TGT_CMD" 90 90 }; 91 91 const char *cc_receive_fsm_str[] = … … 98 98 const char *cc_send_fsm_str[] = 99 99 { 100 "CC_SEND_CONFIG_IDLE",101 100 "CC_SEND_XRAM_RSP_IDLE", 102 101 "CC_SEND_WRITE_IDLE", 103 102 "CC_SEND_CAS_IDLE", 104 "CC_SEND_CONFIG_INVAL_HEADER", 105 "CC_SEND_CONFIG_INVAL_NLINE", 106 "CC_SEND_CONFIG_BRDCAST_HEADER", 107 "CC_SEND_CONFIG_BRDCAST_NLINE", 103 "CC_SEND_CONFIG_IDLE", 108 104 "CC_SEND_XRAM_RSP_BRDCAST_HEADER", 109 105 "CC_SEND_XRAM_RSP_BRDCAST_NLINE", … … 120 116 "CC_SEND_CAS_UPDT_NLINE", 121 117 "CC_SEND_CAS_UPDT_DATA", 122 "CC_SEND_CAS_UPDT_DATA_HIGH" 118 "CC_SEND_CAS_UPDT_DATA_HIGH", 119 "CC_SEND_CONFIG_INVAL_HEADER", 120 "CC_SEND_CONFIG_INVAL_NLINE", 121 "CC_SEND_CONFIG_BRDCAST_HEADER", 122 "CC_SEND_CONFIG_BRDCAST_NLINE" 123 123 }; 124 124 const char *multi_ack_fsm_str[] = … … 282 282 { 283 283 "ALLOC_DIR_RESET", 284 "ALLOC_DIR_CONFIG",285 284 "ALLOC_DIR_READ", 286 285 "ALLOC_DIR_WRITE", 287 286 "ALLOC_DIR_CAS", 288 287 "ALLOC_DIR_CLEANUP", 289 "ALLOC_DIR_XRAM_RSP" 288 "ALLOC_DIR_XRAM_RSP", 289 "ALLOC_DIR_CONFIG" 290 290 }; 291 291 const char *alloc_trt_fsm_str[] = … … 345 345 const IntTab &tgtid_d, // global index on direct network 346 346 const size_t cc_global_id, // global index on cc network 347 const size_t x_width, // number of x bits in platform 348 const size_t y_width, // number of x bits in platform 347 349 const size_t nways, // number of ways per set 348 350 const size_t nsets, // number of associative sets … … 377 379 m_words( nwords ), 378 380 m_cc_global_id( cc_global_id ), 381 m_xwidth(x_width), 382 m_ywidth(y_width), 379 383 m_debug_start_cycle( debug_start_cycle ), 380 384 m_debug_ok( debug_ok ), … … 470 474 r_alloc_heap_fsm("r_alloc_heap_fsm"), 471 475 r_alloc_heap_reset_cpt("r_alloc_heap_reset_cpt") 476 #if MONITOR_MEMCACHE_FSM == 1 477 , 478 p_read_fsm("p_read_fsm"), 479 p_write_fsm("p_write_fsm"), 480 p_xram_rsp_fsm("p_xram_rsp_fsm"), 481 p_cas_fsm("p_cas_fsm"), 482 p_cleanup_fsm("p_cleanup_fsm"), 483 p_config_fsm("p_config_fsm"), 484 p_alloc_heap_fsm("p_alloc_heap_fsm"), 485 p_alloc_dir_fsm("p_alloc_dir_fsm"), 486 p_alloc_trt_fsm("p_alloc_trt_fsm"), 487 p_alloc_upt_fsm("p_alloc_upt_fsm"), 488 p_alloc_ivt_fsm("p_alloc_ivt_fsm"), 489 p_tgt_cmd_fsm("p_tgt_cmd_fsm"), 490 p_tgt_rsp_fsm("p_tgt_rsp_fsm"), 491 p_ixr_cmd_fsm("p_ixr_cmd_fsm"), 492 p_ixr_rsp_fsm("p_ixr_rsp_fsm"), 493 p_cc_send_fsm("p_cc_send_fsm"), 494 p_cc_receive_fsm("p_cc_receive_fsm"), 495 p_multi_ack_fsm("p_multi_ack_fsm") 496 #endif 472 497 { 473 498 std::cout << " - Building VciMemCache : " << name << std::endl; … … 623 648 } 624 649 650 651 ///////////////////////////////////////////////////// 652 tmpl(uint32_t)::req_distance(uint32_t req_srcid) 653 ///////////////////////////////////////////////////// 654 { 655 const uint32_t srcid_width = vci_param_int::S; 656 uint8_t self_x_srcid = m_cc_global_id >> (srcid_width - m_xwidth); 657 uint8_t self_y_srcid = (m_cc_global_id >> (srcid_width - m_ywidth)) & ((1 << m_xwidth) - 1); 658 659 uint8_t x_srcid = req_srcid >> (srcid_width - m_xwidth); 660 uint8_t y_srcid = (req_srcid >> (srcid_width - m_ywidth - m_xwidth)) & ((1 << m_xwidth) - 1); 661 return abs(self_x_srcid - x_srcid) + abs(self_y_srcid - y_srcid); 662 } 663 664 665 ///////////////////////////////////////////////////// 666 tmpl(bool)::is_local_req(uint32_t req_srcid) 667 ///////////////////////////////////////////////////// 668 { 669 return req_distance(req_srcid) == 0; 670 } 671 672 625 673 ////////////////////////////////////////////////// 626 674 tmpl(void) ::print_trace() … … 648 696 } 649 697 698 650 699 ///////////////////////////////////////// 651 tmpl(void) ::clear_stats() 652 ///////////////////////////////////////// 700 tmpl(void)::print_stats(bool activity_counters = true, bool stats = true) 653 701 { 654 m_cpt_cycles = 0; 655 m_cpt_read = 0; 656 m_cpt_read_miss = 0; 657 m_cpt_write = 0; 658 m_cpt_write_miss = 0; 659 m_cpt_write_cells = 0; 660 m_cpt_write_dirty = 0; 661 m_cpt_update = 0; 662 m_cpt_update_mult = 0; 663 m_cpt_inval_brdcast = 0; 664 m_cpt_inval = 0; 665 m_cpt_inval_mult = 0; 666 m_cpt_cleanup = 0; 667 m_cpt_cleanup_data = 0; 668 m_cpt_ll = 0; 669 m_cpt_sc = 0; 670 m_cpt_cas = 0; 671 m_cpt_trt_full = 0; 672 m_cpt_trt_rb = 0; 673 m_cpt_dir_unused = 0; 674 m_cpt_ivt_unused = 0; 675 m_cpt_heap_unused = 0; 676 m_cpt_trt_unused = 0; 677 m_cpt_read_fsm_n_dir_lock = 0; 678 m_cpt_read_fsm_dir_lock = 0; 679 m_cpt_read_fsm_dir_used = 0; 680 m_cpt_read_fsm_trt_lock = 0; 681 m_cpt_read_fsm_heap_lock = 0; 682 m_cpt_write_fsm_dir_lock = 0; 683 m_cpt_write_fsm_n_dir_lock = 0; 684 m_cpt_write_fsm_upt_lock = 0; 685 m_cpt_write_fsm_heap_lock = 0; 686 m_cpt_write_fsm_dir_used = 0; 687 m_cpt_write_fsm_trt_lock = 0; 688 m_cpt_cas_fsm_n_dir_lock = 0; 689 m_cpt_cas_fsm_dir_lock = 0; 690 m_cpt_cas_fsm_upt_lock = 0; 691 m_cpt_cas_fsm_heap_lock = 0; 692 m_cpt_cas_fsm_trt_lock = 0; 693 m_cpt_cas_fsm_dir_used = 0; 694 m_cpt_xram_rsp_fsm_n_dir_lock = 0; 695 m_cpt_xram_rsp_fsm_dir_lock = 0; 696 m_cpt_xram_rsp_fsm_trt_lock = 0; 697 m_cpt_xram_rsp_fsm_upt_lock = 0; 698 m_cpt_xram_rsp_fsm_heap_lock = 0; 699 m_cpt_xram_rsp_fsm_dir_used = 0; 700 m_cpt_cleanup_fsm_dir_lock = 0; 701 m_cpt_cleanup_fsm_n_dir_lock = 0; 702 m_cpt_cleanup_fsm_heap_lock = 0; 703 m_cpt_cleanup_fsm_upt_lock = 0; 704 m_cpt_cleanup_fsm_dir_used = 0; 705 m_cpt_ixr_fsm_trt_lock = 0; 706 m_cpt_multi_ack_fsm_upt_lock = 0; 702 std::cout << "**********************************" << std::dec << std::endl; 703 std::cout << "*** MEM_CACHE " << name() << std::endl; 704 std::cout << "**********************************" << std::dec << std::endl; 705 if (activity_counters) { 706 std::cout << "----------------------------------" << std::dec << std::endl; 707 std::cout << "--- Activity Counters ---" << std::dec << std::endl; 708 std::cout << "----------------------------------" << std::dec << std::endl; 709 std::cout 710 << "[001] NUMBER OF CYCLES = " << m_cpt_cycles << std::endl 711 << std::endl 712 << "[002] LOCAL READ = " << m_cpt_read_local << std::endl 713 << "[003] REMOTE READ = " << m_cpt_read_remote << std::endl 714 << "[004] READ COST (FLITS * DIST) = " << m_cpt_read_cost << std::endl 715 << std::endl 716 << "[005] LOCAL WRITE = " << m_cpt_write_local << std::endl 717 << "[006] REMOTE WRITE = " << m_cpt_write_remote << std::endl 718 << "[007] WRITE FLITS LOCAL = " << m_cpt_write_flits_local << std::endl 719 << "[008] WRITE FLITS REMOTE = " << m_cpt_write_flits_remote << std::endl 720 << "[009] WRITE COST (FLITS * DIST) = " << m_cpt_write_cost << std::endl 721 << std::endl 722 << "[010] LOCAL LL = " << m_cpt_ll_local << std::endl 723 << "[011] REMOTE LL = " << m_cpt_ll_remote << std::endl 724 << "[012] LL COST (FLITS * DIST) = " << m_cpt_ll_cost << std::endl 725 << std::endl 726 << "[013] LOCAL SC = " << m_cpt_sc_local << std::endl 727 << "[014] REMOTE SC = " << m_cpt_sc_remote << std::endl 728 << "[015] SC COST (FLITS * DIST) = " << m_cpt_sc_cost << std::endl 729 << std::endl 730 << "[016] LOCAL CAS = " << m_cpt_cas_local << std::endl 731 << "[017] REMOTE CAS = " << m_cpt_cas_remote << std::endl 732 << "[018] CAS COST (FLITS * DIST) = " << m_cpt_cas_cost << std::endl 733 << std::endl 734 << "[019] REQUESTS TRIG. UPDATE = " << m_cpt_update << std::endl 735 << "[020] LOCAL UPDATE = " << m_cpt_update_local << std::endl 736 << "[021] REMOTE UPDATE = " << m_cpt_update_remote << std::endl 737 << "[022] UPDT COST (FLITS * DIST) = " << m_cpt_update_cost << std::endl 738 << std::endl 739 << "[023] REQUESTS TRIG. M_INV = " << m_cpt_m_inval << std::endl 740 << "[024] LOCAL M_INV = " << m_cpt_m_inval_local << std::endl 741 << "[025] REMOTE M_INV = " << m_cpt_m_inval_remote << std::endl 742 << "[026] M_INV COST (FLITS * DIST) = " << m_cpt_m_inval_cost << std::endl 743 << std::endl 744 << "[027] BROADCAT INVAL = " << m_cpt_br_inval << std::endl 745 << std::endl 746 << "[028] LOCAL CLEANUP = " << m_cpt_cleanup_local << std::endl 747 << "[029] REMOTE CLEANUP = " << m_cpt_cleanup_remote << std::endl 748 << "[030] CLNUP COST (FLITS * DIST) = " << m_cpt_cleanup_cost << std::endl 749 << std::endl 750 << std::endl 751 << "[031] READ MISS = " << m_cpt_read_miss << std::endl 752 << "[032] WRITE MISS = " << m_cpt_write_miss << std::endl 753 << "[033] WRITE DIRTY = " << m_cpt_write_dirty << std::endl 754 << "[034] RD BLOCKED BY HIT IN TRT = " << m_cpt_trt_rb << std::endl 755 << "[035] TRANS BLOCKED BY FULL TRT = " << m_cpt_trt_full << std::endl 756 << "[036] PUT (UNIMPLEMENTED) = " << m_cpt_put << std::endl 757 << "[037] GET (UNIMPLEMENTED) = " << m_cpt_get << std::endl 758 << "[038] WRITE BROADCAST = " << m_cpt_write_broadcast << std::endl 759 << std::endl; 707 760 } 708 ///////////////////////////////////////// 709 tmpl(void) ::print_stats() 710 ///////////////////////////////////////// 711 { 712 std::cout << "----------------------------------" << std::dec << std::endl; 713 std::cout 714 << "MEM_CACHE " << name() << " / Time = " << m_cpt_cycles << std::endl 715 << "- READ RATE = " << (double) m_cpt_read/m_cpt_cycles << std::endl 716 << "- READ TOTAL = " << m_cpt_read << std::endl 717 << "- READ MISS RATE = " << (double) m_cpt_read_miss/m_cpt_read << std::endl 718 << "- WRITE RATE = " << (double) m_cpt_write/m_cpt_cycles << std::endl 719 << "- WRITE TOTAL = " << m_cpt_write << std::endl 720 << "- WRITE MISS RATE = " << (double) m_cpt_write_miss/m_cpt_write << std::endl 721 << "- WRITE BURST LENGTH = " << (double) m_cpt_write_cells/m_cpt_write << std::endl 722 << "- WRITE BURST TOTAL = " << m_cpt_write_cells << std::endl 723 << "- REQUESTS TRT FULL = " << m_cpt_trt_full << std::endl 724 << "- READ TRT BLOKED HIT = " << m_cpt_trt_rb << std::endl 725 << "- UPDATE RATE = " << (double) m_cpt_update/m_cpt_cycles << std::endl 726 << "- UPDATE ARITY = " << (double) m_cpt_update_mult/m_cpt_update << std::endl 727 << "- INVAL MULTICAST RATE = " << (double)(m_cpt_inval-m_cpt_inval_brdcast) /m_cpt_cycles << std::endl 728 << "- INVAL MULTICAST ARITY = " << (double) m_cpt_inval_mult/ (m_cpt_inval-m_cpt_inval_brdcast) << std::endl 729 << "- INVAL BROADCAST RATE = " << (double) m_cpt_inval_brdcast/m_cpt_cycles << std::endl 730 << "- SAVE DIRTY RATE = " << (double) m_cpt_write_dirty/m_cpt_cycles << std::endl 731 << "- CLEANUP RATE = " << (double) m_cpt_cleanup/m_cpt_cycles << std::endl 732 << "- CLEANUP TOTAL = " << (double) m_cpt_cleanup << std::endl 733 << "- CLEANUP WITH DATA RATE = " << (double) m_cpt_cleanup_data/m_cpt_cycles << std::endl 734 << "- CLEANUP WITH DATA TOTAL = " << (double) m_cpt_cleanup_data << std::endl 735 << "- LL RATE = " << (double) m_cpt_ll/m_cpt_cycles << std::endl 736 << "- SC RATE = " << (double) m_cpt_sc/m_cpt_cycles << std::endl 737 << "- CAS RATE = " << (double) m_cpt_cas/m_cpt_cycles << std::endl << std::endl; 738 739 /* << "- WAIT DIR LOCK in READ_FSM = " << (double) m_cpt_read_fsm_dir_lock/m_cpt_read_fsm_n_dir_lock << std::endl 740 << "- NB CYCLES IN DIR LOCK in READ_FSM = " << (double) m_cpt_read_fsm_dir_used/m_cpt_read_fsm_n_dir_lock << std::endl 741 << "- WAIT DIR LOCK in WRITE_FSM = " << (double) m_cpt_write_fsm_dir_lock/m_cpt_write_fsm_n_dir_lock << std::endl 742 << "- NB CYCLES IN DIR LOCK in WRITE_FSM = " << (double) m_cpt_write_fsm_dir_used/m_cpt_write_fsm_n_dir_lock << std::endl 743 << "- WAIT DIR LOCK in XRAM_FSM = " << (double) m_cpt_xram_rsp_fsm_dir_lock/m_cpt_xram_rsp_fsm_n_dir_lock << std::endl 744 << "- NB CYCLES IN DIR LOCK in XRAM_FSM = " << (double) m_cpt_xram_rsp_fsm_dir_used/m_cpt_xram_rsp_fsm_n_dir_lock << std::endl 745 << "- WAIT DIR LOCK in CLEANUP_FSM = " << (double) m_cpt_cleanup_fsm_dir_lock/m_cpt_cleanup_fsm_n_dir_lock << std::endl 746 << "- NB CYCLES IN DIR LOCK in CLEANUP_FSM = " << (double) m_cpt_cleanup_fsm_dir_used/m_cpt_cleanup_fsm_n_dir_lock << std::endl 747 << "- WAIT DIR LOCK in CAS_FSM = " << (double) m_cpt_cas_fsm_dir_lock/m_cpt_cas_fsm_n_dir_lock << std::endl 748 << "- NB CYCLES IN LOCK in CAS_FSM = " << (double) m_cpt_cas_fsm_dir_used/m_cpt_cas_fsm_n_dir_lock << std::endl 749 << "- DIR UNUSED RATE = " << (double) m_cpt_dir_unused/m_cpt_cycles << std::endl << std::endl 750 751 << "- WAIT TRT LOCK in READ_FSM = " << (double) m_cpt_read_fsm_trt_lock/m_cpt_read_fsm_n_trt_lock << std::endl 752 << "- NB CYCLES IN TRT LOCK in READ_FSM = " << (double) m_cpt_read_fsm_trt_used/m_cpt_read_fsm_n_trt_lock << std::endl 753 << "- WAIT TRT LOCK in WRITE_FSM = " << (double) m_cpt_write_fsm_trt_lock/m_cpt_write_fsm_n_trt_lock << std::endl 754 << "- NB CYCLES IN TRT LOCK in WRITE_FSM = " << (double) m_cpt_write_fsm_trt_used/m_cpt_write_fsm_n_trt_lock << std::endl 755 << "- WAIT TRT LOCK in CAS_FSM = " << (double) m_cpt_cas_fsm_trt_lock/m_cpt_cas_fsm_n_trt_lock << std::endl 756 << "- NB CYCLES IN TRT LOCK in CAS_FSM = " << (double) m_cpt_cas_fsm_trt_used/m_cpt_cas_fsm_n_trt_lock << std::endl 757 << "- WAIT TRT LOCK in XRAM_FSM = " << (double) m_cpt_xram_rsp_fsm_trt_lock/m_cpt_xram_rsp_fsm_n_trt_lock << std::endl 758 << "- NB CYCLES IN TRT LOCK in XRAM_FSM = " << (double) m_cpt_xram_rsp_fsm_trt_used/m_cpt_xram_rsp_fsm_n_trt_lock << std::endl 759 << "- WAIT TRT LOCK in IXR_FSM = " << (double) m_cpt_ixr_fsm_trt_lock/m_cpt_ixr_fsm_n_trt_lock << std::endl 760 << "- NB CYCLES IN TRT LOCK in IXR_FSM = " << (double) m_cpt_ixr_fsm_trt_used/m_cpt_ixr_fsm_n_trt_lock << std::endl 761 << "- TRT UNUSED RATE = " << (double) m_cpt_trt_unused/m_cpt_cycles << std::endl << std::endl 762 763 << "- WAIT UPT LOCK in WRITE_FSM = " << (double) m_cpt_write_fsm_upt_lock/m_cpt_write_fsm_n_upt_lock << std::endl 764 << "- NB CYCLES IN UPT LOCK in WRITE_FSM = " << (double) m_cpt_write_fsm_upt_used/m_cpt_write_fsm_n_upt_lock << std::endl 765 << "- WAIT UPT LOCK in XRAM_FSM = " << (double) m_cpt_xram_rsp_fsm_upt_lock/m_cpt_xram_rsp_fsm_n_upt_lock << std::endl 766 << "- NB CYCLES IN UPT LOCK in XRAM_FSM = " << (double) m_cpt_xram_rsp_fsm_upt_used/m_cpt_xram_rsp_fsm_n_upt_lock << std::endl 767 << "- WAIT UPT LOCK in MULTIACK_FSM = " << (double) m_cpt_multi_ack_fsm_upt_lock/m_cpt_multi_ack_fsm_n_upt_lock << std::endl 768 << "- NB CYCLES IN UPT LOCK in MULTIACK_FSM = " << (double) m_cpt_multi_ack_fsm_upt_used/m_cpt_multi_ack_fsm_n_upt_lock << std::endl 769 << "- WAIT UPT LOCK in CLEANUP_FSM = " << (double) m_cpt_cleanup_fsm_upt_lock/m_cpt_cleanup_fsm_n_upt_lock << std::endl 770 << "- NB CYCLES IN UPT LOCK in CLEANUP_FSM = " << (double) m_cpt_cleanup_fsm_upt_used/m_cpt_cleanup_fsm_n_upt_lock << std::endl 771 << "- WAIT UPT LOCK in CAS_FSM = " << (double) m_cpt_cas_fsm_upt_lock/m_cpt_cas_fsm_n_upt_lock << std::endl 772 << "- NB CYCLES IN UPT LOCK in CAS_FSM = " << (double) m_cpt_cas_fsm_upt_used/m_cpt_cas_fsm_n_upt_lock << std::endl 773 << "- IVT UNUSED RATE = " << (double) m_cpt_ivt_unused/m_cpt_cycles << std::endl << std::endl 774 775 << "- WAIT HEAP LOCK in READ_FSM = " << (double) m_cpt_read_fsm_heap_lock/m_cpt_read_fsm_n_heap_lock << std::endl 776 << "- NB CYCLES IN HEAP LOCK in READ_FSM = " << (double) m_cpt_read_fsm_heap_used/m_cpt_read_fsm_n_heap_lock << std::endl 777 << "- WAIT HEAP LOCK in WRITE_FSM = " << (double) m_cpt_write_fsm_heap_lock/m_cpt_write_fsm_n_heap_lock << std::endl 778 << "- NB CYCLES IN HEAP LOCK in WRITE_FSM = " << (double) m_cpt_write_fsm_heap_used/m_cpt_write_fsm_n_heap_lock << std::endl 779 << "- WAIT HEAP LOCK in XRAM_FSM = " << (double) m_cpt_xram_rsp_fsm_heap_lock/m_cpt_xram_rsp_fsm_n_heap_lock << std::endl 780 << "- NB CYCLES IN HEAP LOCK in XRAM_FSM = " << (double) m_cpt_xram_rsp_fsm_heap_used/m_cpt_xram_rsp_fsm_n_heap_lock << std::endl 781 << "- WAIT HEAP LOCK in CLEANUP_FSM = " << (double) m_cpt_cleanup_fsm_heap_lock/m_cpt_cleanup_fsm_n_heap_lock << std::endl 782 << "- NB CYCLES IN HEAP LOCK in CLEANUP_FSM = " << (double) m_cpt_cleanup_fsm_heap_used/m_cpt_cleanup_fsm_n_heap_lock << std::endl 783 << "- WAIT HEAP LOCK in CAS_FSM = " << (double) m_cpt_cas_fsm_heap_lock/m_cpt_cas_fsm_n_heap_lock << std::endl 784 << "- NB CYCLES IN HEAP LOCK in CAS_FSM = " << (double) m_cpt_cas_fsm_heap_used/m_cpt_cas_fsm_n_heap_lock << std::endl 785 << "- HEAP UNUSED RATE = " << (double) m_cpt_heap_unused/m_cpt_cycles << std::endl;*/ 761 762 if (stats) { 763 std::cout << "----------------------------------" << std::dec << std::endl; 764 std::cout << "--- Calculated Stats ---" << std::dec << std::endl; 765 std::cout << "----------------------------------" << std::dec << std::endl; 766 std::cout 767 << "[100] READ TOTAL = " << m_cpt_read_local + m_cpt_read_remote << std::endl 768 << "[101] READ RATE = " << (double) (m_cpt_read_local + m_cpt_read_remote) / m_cpt_cycles << std::endl 769 << "[102] LOCAL READ RATE = " << (double) m_cpt_read_local / m_cpt_cycles << std::endl 770 << "[103] REMOTE READ RATE = " << (double) m_cpt_read_remote / m_cpt_cycles << std::endl 771 << "[104] READ MISS RATE = " << (double) m_cpt_read_miss / (m_cpt_read_local + m_cpt_read_remote) << std::endl 772 << std::endl 773 << "[105] WRITE TOTAL = " << m_cpt_write_local + m_cpt_write_remote << std::endl 774 << "[106] WRITE RATE = " << (double) (m_cpt_write_local + m_cpt_write_remote) / m_cpt_cycles << std::endl 775 << "[107] LOCAL WRITE RATE = " << (double) m_cpt_write_local / m_cpt_cycles << std::endl 776 << "[108] REMOTE WRITE RATE = " << (double) m_cpt_write_remote / m_cpt_cycles << std::endl 777 << "[109] WRITE MISS RATE = " << (double) m_cpt_write_miss / (m_cpt_write_local + m_cpt_write_remote) << std::endl 778 << "[110] WRITE BURST TOTAL = " << m_cpt_write_flits_local + m_cpt_write_flits_remote << std::endl 779 << "[111] WRITE BURST AVERAGE = " << (double) (m_cpt_write_flits_local + m_cpt_write_flits_remote) / (m_cpt_write_local + m_cpt_write_remote) << std::endl 780 << "[112] LOCAL WRITE BURST AV. = " << (double) m_cpt_write_flits_local / (m_cpt_write_local + m_cpt_write_remote) << std::endl 781 << "[113] REMOTE WRITE BURST AV = " << (double) m_cpt_write_flits_remote / (m_cpt_write_local + m_cpt_write_remote) << std::endl 782 << std::endl 783 << "[114] UPDATE RATE = " << (double) m_cpt_update / m_cpt_cycles << std::endl 784 << "[115] AV. UPDATE PER UP REQ = " << (double) (m_cpt_update_local + m_cpt_update_remote) / m_cpt_update << std::endl 785 << "[116] AV. LOC UPDT PER UP REQ = " << (double) m_cpt_update_local / m_cpt_update << std::endl 786 << "[117] AV. REMOTE UPDT PER UP REQ = " << (double) m_cpt_update_remote / m_cpt_update << std::endl 787 << std::endl 788 << "[118] INVAL MULTICAST RATE = " << (double) m_cpt_m_inval / m_cpt_cycles << std::endl 789 << "[119] AVE. INVAL PER M_INV = " << (double) (m_cpt_m_inval_local + m_cpt_m_inval_remote) / m_cpt_m_inval << std::endl 790 << "[120] AV. LOC INV PER M_INV = " << (double) m_cpt_m_inval_local / m_cpt_m_inval << std::endl 791 << "[121] AV. REM INV PER M_INV = " << (double) m_cpt_m_inval_remote / m_cpt_m_inval << std::endl 792 << std::endl 793 << "[122] INVAL BROADCAST RATE = " << (double) m_cpt_br_inval / m_cpt_cycles << std::endl 794 << "[123] WRITE DIRTY RATE = " << (double) m_cpt_write_dirty / m_cpt_cycles << std::endl 795 << std::endl 796 << "[124] CLEANUP RATE = " << (double) (m_cpt_cleanup_local + m_cpt_cleanup_remote) / m_cpt_cycles << std::endl 797 << "[125] LOCAL CLEANUP RATE = " << (double) m_cpt_cleanup_local / m_cpt_cycles << std::endl 798 << "[126] REMOTE CLEANUP RATE = " << (double) m_cpt_cleanup_remote / m_cpt_cycles << std::endl 799 << "[127] LL RATE = " << (double) (m_cpt_ll_local + m_cpt_ll_remote) / m_cpt_cycles << std::endl 800 << "[128] LOCAL LL RATE = " << (double) m_cpt_ll_local / m_cpt_cycles << std::endl 801 << "[129] REMOTE LL RATE = " << (double) m_cpt_ll_remote / m_cpt_cycles << std::endl 802 << "[130] SC RATE = " << (double) (m_cpt_sc_local + m_cpt_sc_remote) / m_cpt_cycles << std::endl 803 << "[131] LOCAL SC RATE = " << (double) m_cpt_sc_local / m_cpt_cycles << std::endl 804 << "[132] REMOTE SC RATE = " << (double) m_cpt_sc_remote / m_cpt_cycles << std::endl 805 << "[133] CAS RATE = " << (double) (m_cpt_cas_local + m_cpt_cas_remote) / m_cpt_cycles << std::endl 806 << "[134] LOCAL CAS RATE = " << (double) m_cpt_cas_local / m_cpt_cycles << std::endl 807 << "[135] REMOTE CAS RATE = " << (double) m_cpt_cas_remote / m_cpt_cycles << std::endl 808 << std::endl 809 << std::endl; 810 } 786 811 } 812 787 813 788 814 ///////////////////////////////// … … 790 816 ///////////////////////////////// 791 817 { 818 delete [] m_seg; 819 792 820 delete [] r_ixr_rsp_to_xram_rsp_rok; 793 //delete [] r_ixr_rsp_to_xram_rsp_no_coherent;794 795 821 delete [] r_xram_rsp_victim_data; 796 822 delete [] r_xram_rsp_to_tgt_rsp_data; … … 802 828 delete [] r_write_be; 803 829 delete [] r_write_to_cc_send_data; 830 delete [] r_write_to_cc_send_be; 804 831 805 832 delete [] r_cleanup_data; 806 delete [] r_ixr_cmd_data;807 833 delete [] r_cleanup_to_ixr_cmd_data; 834 835 delete [] r_cas_data; 836 delete [] r_cas_rdata; 837 838 delete [] r_ixr_cmd_wdata; 839 delete [] m_debug_previous_data; 840 delete [] m_debug_data; 841 842 print_stats(); 808 843 } 809 844 … … 821 856 r_tgt_cmd_fsm = TGT_CMD_IDLE; 822 857 r_config_fsm = CONFIG_IDLE; 823 r_tgt_rsp_fsm = TGT_RSP_ TGT_CMD_IDLE;858 r_tgt_rsp_fsm = TGT_RSP_READ_IDLE; 824 859 r_cc_send_fsm = CC_SEND_XRAM_RSP_IDLE; 825 860 r_cc_receive_fsm = CC_RECEIVE_IDLE; … … 833 868 r_alloc_trt_fsm = ALLOC_TRT_READ; 834 869 r_alloc_upt_fsm = ALLOC_UPT_WRITE; 835 r_alloc_ivt_fsm = ALLOC_IVT_ XRAM_RSP;870 r_alloc_ivt_fsm = ALLOC_IVT_WRITE; 836 871 r_ixr_rsp_fsm = IXR_RSP_IDLE; 837 872 r_xram_rsp_fsm = XRAM_RSP_IDLE; … … 951 986 // Activity counters 952 987 m_cpt_cycles = 0; 953 m_cpt_read = 0; 988 m_cpt_read_local = 0; 989 m_cpt_read_remote = 0; 990 m_cpt_read_cost = 0; 991 m_cpt_write_local = 0; 992 m_cpt_write_remote = 0; 993 m_cpt_write_flits_local = 0; 994 m_cpt_write_flits_remote = 0; 995 m_cpt_write_cost = 0; 996 m_cpt_ll_local = 0; 997 m_cpt_ll_remote = 0; 998 m_cpt_ll_cost = 0; 999 m_cpt_sc_local = 0; 1000 m_cpt_sc_remote = 0; 1001 m_cpt_sc_cost = 0; 1002 m_cpt_cas_local = 0; 1003 m_cpt_cas_remote = 0; 1004 m_cpt_cas_cost = 0; 1005 m_cpt_update = 0; 1006 m_cpt_update_local = 0; 1007 m_cpt_update_remote = 0; 1008 m_cpt_update_cost = 0; 1009 m_cpt_m_inval = 0; 1010 m_cpt_m_inval_local = 0; 1011 m_cpt_m_inval_remote = 0; 1012 m_cpt_m_inval_cost = 0; 1013 m_cpt_br_inval = 0; 1014 m_cpt_cleanup_local = 0; 1015 m_cpt_cleanup_remote = 0; 1016 m_cpt_cleanup_cost = 0; 1017 954 1018 m_cpt_read_miss = 0; 955 m_cpt_write = 0;956 1019 m_cpt_write_miss = 0; 957 m_cpt_write_cells = 0;958 1020 m_cpt_write_dirty = 0; 959 1021 m_cpt_update = 0; … … 967 1029 m_cpt_sc = 0; 968 1030 m_cpt_cas = 0; 1031 m_cpt_write_broadcast = 0; 1032 m_cpt_trt_rb = 0; 969 1033 m_cpt_trt_full = 0; 970 m_cpt_trt_rb = 0; 1034 m_cpt_get = 0; 1035 m_cpt_put = 0; 971 1036 m_cpt_dir_unused = 0; 972 1037 m_cpt_ivt_unused = 0; … … 1092 1157 //////////////////////////////////////////////////////////////////////////////////// 1093 1158 1094 //std::cout << std::endl << "tgt_cmd_fsm" << std::endl;1095 1159 1096 1160 switch(r_tgt_cmd_fsm.read()) … … 1114 1178 bool config = false; 1115 1179 1116 // register arguments for response (segmentation violation or config) 1117 r_tgt_cmd_to_tgt_rsp_srcid = p_vci_tgt.srcid.read(); 1118 r_tgt_cmd_to_tgt_rsp_trdid = p_vci_tgt.trdid.read(); 1119 r_tgt_cmd_to_tgt_rsp_pktid = p_vci_tgt.pktid.read(); 1120 1121 for(size_t seg_id = 0 ; (seg_id < m_nseg) and not found ; seg_id++) 1122 { 1123 if( m_seg[seg_id]->contains(address) and 1180 for (size_t seg_id = 0; (seg_id < m_nseg) && !found; seg_id++) 1181 { 1182 if (m_seg[seg_id]->contains(address) && 1124 1183 m_seg[seg_id]->contains(address + plen - vci_param_int::B) ) 1125 1184 { … … 1129 1188 } 1130 1189 1131 if ( not found) /////////// out of segment error1190 if (!found) /////////// out of segment error 1132 1191 { 1133 1192 r_tgt_cmd_fsm = TGT_CMD_ERROR; … … 1135 1194 else if ( config ) /////////// configuration command 1136 1195 { 1137 if ( not p_vci_tgt.eop.read()) r_tgt_cmd_fsm = TGT_CMD_ERROR;1196 if (!p_vci_tgt.eop.read()) r_tgt_cmd_fsm = TGT_CMD_ERROR; 1138 1197 else r_tgt_cmd_fsm = TGT_CMD_CONFIG; 1139 1198 } … … 1202 1261 if ( p_vci_tgt.cmdval and p_vci_tgt.eop ) 1203 1262 { 1263 r_tgt_cmd_to_tgt_rsp_srcid = p_vci_tgt.srcid.read(); 1264 r_tgt_cmd_to_tgt_rsp_trdid = p_vci_tgt.trdid.read(); 1265 r_tgt_cmd_to_tgt_rsp_pktid = p_vci_tgt.pktid.read(); 1204 1266 r_tgt_cmd_to_tgt_rsp_req = true; 1205 1267 r_tgt_cmd_to_tgt_rsp_error = 1; … … 1239 1301 error = 0; 1240 1302 r_config_lock = true; 1241 if ( rdata == 0 ) 1242 { 1243 r_tgt_cmd_srcid = p_vci_tgt.srcid.read(); 1244 r_tgt_cmd_trdid = p_vci_tgt.trdid.read(); 1245 r_tgt_cmd_pktid = p_vci_tgt.pktid.read(); 1246 } 1247 } 1303 } 1248 1304 else if ( (p_vci_tgt.cmd.read() == vci_param_int::CMD_WRITE) // release lock 1249 and (cell == MEMC_LOCK) 1250 and (p_vci_tgt.srcid.read() == r_tgt_cmd_srcid.read()) ) 1305 and (cell == MEMC_LOCK) ) 1251 1306 { 1252 1307 need_rsp = true; … … 1255 1310 } 1256 1311 else if ( (p_vci_tgt.cmd.read() == vci_param_int::CMD_WRITE) // set addr_lo 1257 and (cell == MEMC_ADDR_LO) 1258 and (p_vci_tgt.srcid.read() == r_tgt_cmd_srcid.read()) ) 1312 and (cell == MEMC_ADDR_LO) ) 1259 1313 { 1260 1314 assert( ((wdata % (m_words*vci_param_int::B)) == 0) and … … 1264 1318 error = 0; 1265 1319 r_config_address = (r_config_address.read() & 0xFFFFFFFF00000000LL) | 1266 ( addr_t)p_vci_tgt.wdata.read();1320 ((addr_t)wdata); 1267 1321 } 1268 1322 else if ( (p_vci_tgt.cmd.read() == vci_param_int::CMD_WRITE) // set addr_hi 1269 and (cell == MEMC_ADDR_HI) 1270 and (p_vci_tgt.srcid.read() == r_tgt_cmd_srcid.read()) ) 1323 and (cell == MEMC_ADDR_HI) ) 1271 1324 1272 1325 { … … 1274 1327 error = 0; 1275 1328 r_config_address = (r_config_address.read() & 0x00000000FFFFFFFFLL) | 1276 (( addr_t)p_vci_tgt.wdata.read())<<32;1329 (((addr_t) wdata) << 32); 1277 1330 } 1278 1331 else if ( (p_vci_tgt.cmd.read() == vci_param_int::CMD_WRITE) // set buf_lines 1279 and (cell == MEMC_BUF_LENGTH) 1280 and (p_vci_tgt.srcid.read() == r_tgt_cmd_srcid.read()) ) 1332 and (cell == MEMC_BUF_LENGTH) ) 1281 1333 { 1282 1334 need_rsp = true; 1283 1335 error = 0; 1284 size_t lines = (size_t)(p_vci_tgt.wdata.read()/(m_words<<2));1285 if ( r_config_address.read()%(m_words*4) ) lines++;1336 size_t lines = wdata/(m_words<<2); 1337 if ( wdata%(m_words<<2) ) lines++; 1286 1338 r_config_cmd_lines = lines; 1287 1339 r_config_rsp_lines = lines; 1288 1340 } 1289 1341 else if ( (p_vci_tgt.cmd.read() == vci_param_int::CMD_WRITE) // set cmd type 1290 and (cell == MEMC_CMD_TYPE) 1291 and (p_vci_tgt.srcid.read() == r_tgt_cmd_srcid.read()) ) 1342 and (cell == MEMC_CMD_TYPE) ) 1292 1343 { 1293 1344 need_rsp = false; 1294 1345 error = 0; 1295 r_config_cmd = p_vci_tgt.wdata.read();1346 r_config_cmd = wdata; 1296 1347 1297 1348 // prepare delayed response from CONFIG FSM … … 1311 1362 if ( r_tgt_cmd_to_tgt_rsp_req.read() ) break; 1312 1363 1364 r_tgt_cmd_to_tgt_rsp_srcid = p_vci_tgt.srcid.read(); 1365 r_tgt_cmd_to_tgt_rsp_trdid = p_vci_tgt.trdid.read(); 1366 r_tgt_cmd_to_tgt_rsp_pktid = p_vci_tgt.pktid.read(); 1313 1367 r_tgt_cmd_to_tgt_rsp_req = true; 1314 1368 r_tgt_cmd_to_tgt_rsp_error = error; … … 1371 1425 #endif 1372 1426 cmd_read_fifo_put = true; 1373 if(p_vci_tgt.cmd.read() == vci_param_int::CMD_LOCKED_READ) m_cpt_ll++; 1374 else m_cpt_read++; 1427 // <Activity counters> 1428 if (p_vci_tgt.cmd.read() == vci_param_int::CMD_LOCKED_READ) { 1429 if (is_local_req(p_vci_tgt.srcid.read())) m_cpt_ll_local++; 1430 else m_cpt_ll_remote++; 1431 m_cpt_ll_cost += req_distance(p_vci_tgt.srcid.read()); // LL on a single word 1432 } 1433 else { 1434 if (is_local_req(p_vci_tgt.srcid.read())) m_cpt_read_local++; 1435 else m_cpt_read_remote++; 1436 m_cpt_read_cost += m_words * req_distance(p_vci_tgt.srcid.read()); 1437 } 1438 // </Activity counters> 1375 1439 r_tgt_cmd_fsm = TGT_CMD_IDLE; 1376 1440 } … … 1394 1458 #endif 1395 1459 cmd_write_fifo_put = true; 1396 if(p_vci_tgt.eop) r_tgt_cmd_fsm = TGT_CMD_IDLE; 1460 // <Activity counters> 1461 if (p_vci_tgt.cmd.read() == vci_param_int::CMD_NOP) { 1462 m_cpt_sc_cost += req_distance(p_vci_tgt.srcid.read()); 1463 } 1464 else { 1465 if (is_local_req(p_vci_tgt.srcid.read())) m_cpt_write_flits_local++; 1466 else m_cpt_write_flits_remote++; 1467 m_cpt_write_cost += req_distance(p_vci_tgt.srcid.read()); 1468 } 1469 // </Activity counters> 1470 1471 if (p_vci_tgt.eop) { 1472 // <Activity counters> 1473 if (p_vci_tgt.cmd.read() == vci_param_int::CMD_NOP) { 1474 if (is_local_req(p_vci_tgt.srcid.read())) m_cpt_sc_local++; 1475 else m_cpt_sc_remote++; 1476 1477 } 1478 else { 1479 if (is_local_req(p_vci_tgt.srcid.read())) m_cpt_write_local++; 1480 else m_cpt_write_remote++; 1481 } 1482 // </Activity counters> 1483 r_tgt_cmd_fsm = TGT_CMD_IDLE; 1484 } 1397 1485 } 1398 1486 break; … … 1422 1510 #endif 1423 1511 cmd_cas_fifo_put = true; 1424 if(p_vci_tgt.eop) r_tgt_cmd_fsm = TGT_CMD_IDLE; 1512 if (p_vci_tgt.eop) { 1513 // <Activity counters> 1514 if (is_local_req(p_vci_tgt.srcid.read())) m_cpt_cas_local++; 1515 else m_cpt_cas_remote++; 1516 m_cpt_cas_cost += req_distance(p_vci_tgt.srcid.read()); 1517 // </Activity counters> 1518 r_tgt_cmd_fsm = TGT_CMD_IDLE; 1519 } 1425 1520 } 1426 1521 break; … … 1751 1846 DirectoryEntry entry = m_cache_directory.read(r_config_address.read(), way); 1752 1847 1753 if ( entry.valid and // hit & inval command1754 (r_config_cmd.read() == MEMC_CMD_INVAL) )1755 {1756 r_config_dir_way = way;1757 r_config_dir_copy_inst = entry.owner.inst;1758 r_config_dir_copy_srcid = entry.owner.srcid;1759 r_config_dir_is_cnt = entry.is_cnt;1760 r_config_dir_lock = entry.lock; 1761 r_config_dir_count = entry.count;1762 r_config_dir_ptr = entry.ptr;1763 1848 r_config_dir_way = way; 1849 r_config_dir_copy_inst = entry.owner.inst; 1850 r_config_dir_copy_srcid = entry.owner.srcid; 1851 r_config_dir_is_cnt = entry.is_cnt; 1852 r_config_dir_lock = entry.lock; 1853 r_config_dir_count = entry.count; 1854 r_config_dir_ptr = entry.ptr; 1855 1856 if (entry.valid and // hit & inval command 1857 (r_config_cmd.read() == MEMC_CMD_INVAL)) 1858 { 1764 1859 r_config_fsm = CONFIG_IVT_LOCK; 1765 1860 } … … 1774 1869 r_config_cmd_lines = r_config_cmd_lines.read() - 1; 1775 1870 r_config_rsp_lines = r_config_rsp_lines.read() - 1; 1776 r_config_cmd_lines = r_config_cmd_lines.read() - 1;1777 1871 r_config_address = r_config_address.read() + (m_words<<2); 1778 1872 r_config_fsm = CONFIG_LOOP; … … 1826 1920 entry.owner.inst = r_config_dir_copy_inst.read(); 1827 1921 entry.owner.srcid = r_config_dir_copy_srcid.read(); 1828 m_cache_directory.write( set, 1829 way, 1830 entry ); 1922 m_cache_directory.write( set, way, entry ); 1831 1923 1832 1924 r_config_trt_index = index; … … 1856 1948 size_t way = r_config_dir_way.read(); 1857 1949 size_t set = m_y[r_config_address.read()]; 1858 1859 sc_signal<data_t> config_data[16];1860 m_cache_data.read_line( way,1861 set,1862 config_data );1863 1864 // post a PUT request in TRT1865 1950 std::vector<data_t> data_vector; 1866 1951 data_vector.clear(); 1867 for(size_t i=0; i<m_words; i++) data_vector.push_back(config_data[i].read()); 1952 for(size_t word=0; word<m_words; word++) 1953 { 1954 uint32_t data = m_cache_data.read( way, set, word ); 1955 data_vector.push_back( data ); 1956 } 1957 1958 // post the PUT request in TRT 1868 1959 m_trt.set( r_config_trt_index.read(), 1869 false, // PUT 1870 m_nline[r_config_address.read()], // nline1960 false, // PUT transaction 1961 m_nline[r_config_address.read()], // line index 1871 1962 0, // srcid: unused 1872 1963 0, // trdid: unused … … 1875 1966 0, // read_length: unused 1876 1967 0, // word_index: unused 1877 std::vector<be_t>(m_words,0xF), 1878 data_vector); 1968 std::vector<be_t>(m_words,0xF), // byte-enable: unused 1969 data_vector, // data to be written 1970 0, // ll_key: unused 1971 true ); // requested by config FSM 1972 r_config_fsm = CONFIG_PUT_REQ; 1879 1973 1880 1974 #if DEBUG_MEMC_CONFIG … … 1887 1981 } 1888 1982 //////////////////// 1889 case CONFIG_PUT_REQ: // PUT request to IXR_CMD_FSM1983 case CONFIG_PUT_REQ: // post PUT request to IXR_CMD_FSM 1890 1984 { 1891 1985 if ( not r_config_to_ixr_cmd_req.read() ) … … 1901 1995 #if DEBUG_MEMC_CONFIG 1902 1996 if(m_debug) 1903 std::cout << " <MEMC " << name() << " CONFIG_PUT_REQ> PUT request to IXR_CMD_FSM"1997 std::cout << " <MEMC " << name() << " CONFIG_PUT_REQ> post PUT request to IXR_CMD_FSM" 1904 1998 << " / address = " << std::hex << r_config_address.read() << std::endl; 1905 1999 #endif … … 2706 2800 case WRITE_IDLE: // copy first word of a write burst in local buffer 2707 2801 { 2708 if(m_cmd_write_addr_fifo.rok()) 2709 { 2710 if((m_cmd_write_pktid_fifo.read() & 0x7) == TYPE_SC) 2711 { 2712 m_cpt_sc++; 2713 } 2714 else 2715 { 2716 m_cpt_write++; 2717 m_cpt_write_cells++; 2718 } 2802 if (not m_cmd_write_addr_fifo.rok()) break; 2719 2803 2720 2804 // consume a word in the FIFO & write it in the local buffer … … 2724 2808 r_write_address = (addr_t)(m_cmd_write_addr_fifo.read()); 2725 2809 r_write_word_index = index; 2726 r_write_word_count = 1;2810 r_write_word_count = 0; 2727 2811 r_write_data[index] = m_cmd_write_data_fifo.read(); 2728 2812 r_write_srcid = m_cmd_write_srcid_fifo.read(); 2729 2813 r_write_trdid = m_cmd_write_trdid_fifo.read(); 2730 2814 r_write_pktid = m_cmd_write_pktid_fifo.read(); 2731 r_write_pending_sc = false; 2815 2816 // if SC command, get the SC key 2817 if ((m_cmd_write_pktid_fifo.read() & 0x7) == TYPE_SC) 2818 { 2819 assert( not m_cmd_write_eop_fifo.read() && 2820 "MEMC ERROR in WRITE_IDLE state: " 2821 "invalid packet format for SC command"); 2822 2823 r_write_sc_key = m_cmd_write_data_fifo.read(); 2824 } 2732 2825 2733 2826 // initialize the be field for all words … … 2738 2831 } 2739 2832 2740 if (m_cmd_write_eop_fifo.read() or ((m_cmd_write_pktid_fifo.read() & 0x7) == TYPE_SC))2833 if (m_cmd_write_eop_fifo.read()) 2741 2834 { 2742 2835 r_write_fsm = WRITE_DIR_REQ; … … 2754 2847 << " / data = " << m_cmd_write_data_fifo.read() << std::endl; 2755 2848 #endif 2756 }2757 2849 break; 2758 2850 } … … 2760 2852 case WRITE_NEXT: // copy next word of a write burst in local buffer 2761 2853 { 2762 if(m_cmd_write_addr_fifo.rok()) 2763 { 2764 2765 #if DEBUG_MEMC_WRITE 2766 if(m_debug) 2767 std::cout << " <MEMC " << name() 2768 << " WRITE_NEXT> Write another word in local buffer" 2769 << std::endl; 2770 #endif 2771 m_cpt_write_cells++; 2854 if (not m_cmd_write_addr_fifo.rok()) break; 2772 2855 2773 2856 // check that the next word is in the same cache line 2774 2857 assert( (m_nline[(addr_t)(r_write_address.read())] == 2775 m_nline[(addr_t)(m_cmd_write_addr_fifo.read())]) and2858 m_nline[(addr_t)(m_cmd_write_addr_fifo.read())]) && 2776 2859 "MEMC ERROR in WRITE_NEXT state: Illegal write burst"); 2860 2861 size_t index = m_x[(addr_t)(m_cmd_write_addr_fifo.read())]; 2862 bool is_sc = ((m_cmd_write_pktid_fifo.read() & 0x7) == TYPE_SC); 2863 2864 // check that SC command has constant address 2865 assert((not is_sc or (index == r_write_word_index)) && 2866 "MEMC ERROR in WRITE_NEXT state: " 2867 "the address must be constant on a SC command"); 2868 2869 // check that SC command has two flits 2870 assert((not is_sc or m_cmd_write_eop_fifo.read()) && 2871 "MEMC ERROR in WRITE_NEXT state: " 2872 "invalid packet format for SC command"); 2777 2873 2778 2874 // consume a word in the FIFO & write it in the local buffer 2779 2875 cmd_write_fifo_get = true; 2780 size_t index = r_write_word_index.read() + r_write_word_count.read();2781 2876 2782 2877 r_write_be[index] = m_cmd_write_be_fifo.read(); 2783 2878 r_write_data[index] = m_cmd_write_data_fifo.read(); 2879 2880 // the first flit of a SC command is the reservation key and 2881 // therefore it must not be counted as a data to write 2882 if (not is_sc) 2883 { 2784 2884 r_write_word_count = r_write_word_count.read() + 1; 2885 } 2785 2886 2786 2887 if(m_cmd_write_eop_fifo.read()) r_write_fsm = WRITE_DIR_REQ; 2787 } 2888 2889 #if DEBUG_MEMC_WRITE 2890 if (m_debug) 2891 std::cout << " <MEMC " << name() 2892 << " WRITE_NEXT> Write another word in local buffer" 2893 << std::endl; 2894 #endif 2788 2895 break; 2789 2896 } … … 2792 2899 // and access the llsc_global_table 2793 2900 { 2794 if( r_alloc_dir_fsm.read() == ALLOC_DIR_WRITE ) 2795 { 2796 if(((r_write_pktid.read() & 0x7) == TYPE_SC) and not r_write_pending_sc.read()) 2797 { 2798 // We enter here if it is a new SC command 2799 // If r_write_pending_sc is set the SC is not new and has already been tested 2800 2801 if(not m_cmd_write_addr_fifo.rok()) break; 2802 2803 assert( m_cmd_write_eop_fifo.read() and 2804 "MEMC ERROR in WRITE_DIR_REQ state: invalid packet format for SC command"); 2805 2806 size_t index = r_write_word_index.read(); 2807 bool sc_success = m_llsc_table.sc(r_write_address.read() , 2808 r_write_data[index].read()); 2809 2810 // consume a word in the FIFO & write it in the local buffer 2811 cmd_write_fifo_get = true; 2812 r_write_data[index] = m_cmd_write_data_fifo.read(); 2813 r_write_sc_fail = not sc_success; 2814 r_write_pending_sc = true; 2815 2816 if(not sc_success) r_write_fsm = WRITE_RSP; 2817 else r_write_fsm = WRITE_DIR_LOCK; 2818 } 2819 else 2820 { 2821 // We enter here if it is a SW command or an already tested SC command 2822 2901 if (r_alloc_dir_fsm.read() != ALLOC_DIR_WRITE ) break; 2902 2903 if ((r_write_pktid.read() & 0x7) == TYPE_SC) 2904 { 2905 // test address and key match of the SC command on the 2906 // LL/SC table without removing reservation. The reservation 2907 // will be erased after in this FSM. 2908 bool sc_success = m_llsc_table.check(r_write_address.read(), 2909 r_write_sc_key.read()); 2910 2911 r_write_sc_fail = not sc_success; 2912 2913 if(not sc_success) r_write_fsm = WRITE_RSP; 2914 else r_write_fsm = WRITE_DIR_LOCK; 2915 } 2916 else 2917 { 2918 // write burst 2823 2919 #define L2 soclib::common::uint32_log2 2824 2825 2826 ((r_write_word_count.read()-1) << L2(vci_param_int::B));2920 addr_t min = r_write_address.read(); 2921 addr_t max = r_write_address.read() + 2922 (r_write_word_count.read() << L2(vci_param_int::B)); 2827 2923 #undef L2 2828 2924 2829 m_llsc_table.sw(min, max); 2830 2831 r_write_fsm = WRITE_DIR_LOCK; 2832 } 2925 m_llsc_table.sw(min, max); 2926 2927 r_write_fsm = WRITE_DIR_LOCK; 2833 2928 } 2834 2929 … … 2916 3011 bool no_update = ( (r_write_count.read() == 0) or 2917 3012 (owner and (r_write_count.read() ==1) and 2918 ( r_write_pktid.read() != TYPE_SC)));3013 ((r_write_pktid.read() & 0x7) != TYPE_SC))); 2919 3014 2920 3015 // write data in the cache if no coherence transaction 2921 3016 if(no_update) 2922 3017 { 3018 // SC command but zero copies 3019 if ((r_write_pktid.read() & 0x7) == TYPE_SC) 3020 { 3021 m_llsc_table.sc(r_write_address.read(), 3022 r_write_sc_key.read()); 3023 } 3024 2923 3025 for(size_t word=0 ; word<m_words ; word++) 2924 3026 { … … 2931 3033 } 2932 3034 2933 if (owner and not no_update and(r_write_pktid.read() != TYPE_SC))3035 if (owner and not no_update and ((r_write_pktid.read() & 0x7) != TYPE_SC)) 2934 3036 { 2935 3037 r_write_count = r_write_count.read() - 1; … … 3000 3102 if( wok ) // write data in cache 3001 3103 { 3104 3105 if ((r_write_pktid.read() & 0x7) == TYPE_SC) 3106 { 3107 m_llsc_table.sc(r_write_address.read(), 3108 r_write_sc_key.read()); 3109 } 3110 3002 3111 for(size_t word=0 ; word<m_words ; word++) 3003 3112 { … … 3067 3176 size_t min = r_write_word_index.read(); 3068 3177 size_t max = r_write_word_index.read() + r_write_word_count.read(); 3069 for(size_t i=min ; i< max ; i++) r_write_to_cc_send_data[i] = r_write_data[i];3178 for(size_t i=min ; i<=max ; i++) r_write_to_cc_send_data[i] = r_write_data[i]; 3070 3179 3071 3180 if( (r_write_copy.read() != r_write_srcid.read()) or 3072 (r_write_pktid.read() == TYPE_SC) or r_write_copy_inst.read()) 3181 ((r_write_pktid.read() & 0x7) == TYPE_SC) or 3182 r_write_copy_inst.read()) 3073 3183 { 3074 3184 // put the first srcid in the fifo … … 3128 3238 // put the next srcid in the fifo 3129 3239 if( (entry.owner.srcid != r_write_srcid.read()) or 3130 (r_write_pktid.read() == TYPE_SC) or entry.owner.inst) 3240 ((r_write_pktid.read() & 0x7) == TYPE_SC) or 3241 entry.owner.inst) 3131 3242 { 3132 3243 dec_upt_counter = false; … … 3208 3319 // a new request in the write FIFO 3209 3320 { 3210 if (!r_write_to_tgt_rsp_req.read())3321 if (not r_write_to_tgt_rsp_req.read()) 3211 3322 { 3212 3323 // post the request to TGT_RSP_FSM … … 3218 3329 3219 3330 // try to get a new write request from the FIFO 3220 if (m_cmd_write_addr_fifo.rok())3221 { 3222 if((m_cmd_write_pktid_fifo.read() & 0x7) == TYPE_SC)3223 m_cpt_sc++;3331 if (not m_cmd_write_addr_fifo.rok()) 3332 { 3333 r_write_fsm = WRITE_IDLE; 3334 } 3224 3335 else 3225 3336 { 3226 m_cpt_write++;3227 m_cpt_write_cells++;3228 }3229 3230 3337 // consume a word in the FIFO & write it in the local buffer 3231 3338 cmd_write_fifo_get = true; … … 3234 3341 r_write_address = (addr_t)(m_cmd_write_addr_fifo.read()); 3235 3342 r_write_word_index = index; 3236 r_write_word_count = 1;3343 r_write_word_count = 0; 3237 3344 r_write_data[index] = m_cmd_write_data_fifo.read(); 3238 3345 r_write_srcid = m_cmd_write_srcid_fifo.read(); 3239 3346 r_write_trdid = m_cmd_write_trdid_fifo.read(); 3240 3347 r_write_pktid = m_cmd_write_pktid_fifo.read(); 3241 r_write_pending_sc = false; 3348 3349 // if SC command, get the SC key 3350 if ((m_cmd_write_pktid_fifo.read() & 0x7) == TYPE_SC) 3351 { 3352 assert( not m_cmd_write_eop_fifo.read() && 3353 "MEMC ERROR in WRITE_RSP state: " 3354 "invalid packet format for SC command"); 3355 3356 r_write_sc_key = m_cmd_write_data_fifo.read(); 3357 } 3242 3358 3243 3359 // initialize the be field for all words … … 3248 3364 } 3249 3365 3250 if (m_cmd_write_eop_fifo.read() or ((m_cmd_write_pktid_fifo.read() & 0x7) == TYPE_SC))3366 if (m_cmd_write_eop_fifo.read()) 3251 3367 { 3252 3368 r_write_fsm = WRITE_DIR_REQ; … … 3256 3372 r_write_fsm = WRITE_NEXT; 3257 3373 } 3258 }3259 else3260 {3261 r_write_fsm = WRITE_IDLE;3262 3374 } 3263 3375 … … 3302 3414 bool wok = not m_trt.full(wok_index); 3303 3415 3304 if(hit_read) // register the modified data in TRT 3416 // wait an empty entry in TRT 3417 if(not hit_read and (not wok or hit_write)) 3418 { 3419 r_write_fsm = WRITE_WAIT; 3420 m_cpt_trt_full++; 3421 3422 break; 3423 } 3424 3425 if ((r_write_pktid.read() & 0x7) == TYPE_SC) 3426 { 3427 m_llsc_table.sc(r_write_address.read(), 3428 r_write_sc_key.read()); 3429 } 3430 3431 // register the modified data in TRT 3432 if (hit_read) 3305 3433 { 3306 3434 r_write_trt_index = hit_index; 3307 3435 r_write_fsm = WRITE_MISS_TRT_DATA; 3308 3436 m_cpt_write_miss++; 3309 } 3310 else if(wok and !hit_write) // set a new entry in TRT 3437 break; 3438 } 3439 3440 // set a new entry in TRT 3441 if (wok and not hit_write) 3311 3442 { 3312 3443 r_write_trt_index = wok_index; 3313 3444 r_write_fsm = WRITE_MISS_TRT_SET; 3314 3445 m_cpt_write_miss++; 3315 } 3316 else // wait an empty entry in TRT 3317 { 3318 r_write_fsm = WRITE_WAIT; 3319 m_cpt_trt_full++; 3320 } 3321 m_cpt_write_fsm_n_trt_lock++; 3322 } 3446 break; 3447 } 3448 3449 assert(false && "VCI_MEM_CACHE ERROR: this part must not be reached"); 3450 } 3323 3451 3324 3452 m_cpt_write_fsm_trt_lock++; … … 3406 3534 { 3407 3535 r_write_to_ixr_cmd_req = true; 3408 r_write_to_ixr_cmd_put = false;3409 3536 r_write_to_ixr_cmd_index = r_write_trt_index.read(); 3410 3537 r_write_fsm = WRITE_RSP; … … 3412 3539 #if DEBUG_MEMC_WRITE 3413 3540 if(m_debug) 3414 std::cout << " <MEMC " << name() << " WRITE_MISS_XRAM_REQ> Post a GET request to the IXR_CMD FSM" << std::endl; 3541 std::cout << " <MEMC " << name() 3542 << " WRITE_MISS_XRAM_REQ> Post a GET request to the" 3543 << " IXR_CMD FSM" << std::endl; 3415 3544 #endif 3416 3545 } … … 3420 3549 case WRITE_BC_DIR_READ: // enter this state if a broadcast-inval is required 3421 3550 // the cache line must be erased in mem-cache, and written 3422 // into XRAM. we read the cache and complete the buffer3551 // into XRAM. 3423 3552 { 3424 3553 assert( (r_alloc_dir_fsm.read() == ALLOC_DIR_WRITE) and 3425 3554 "MEMC ERROR in WRITE_BC_DIR_READ state: Bad DIR allocation"); 3426 3555 3427 // update local buffer 3556 m_cpt_write_broadcast++; 3557 3558 // write enable signal for data buffer. 3559 r_write_bc_data_we = true; 3560 3561 r_write_fsm = WRITE_BC_TRT_LOCK; 3562 3563 #if DEBUG_MEMC_WRITE 3564 if (m_debug) 3565 std::cout << " <MEMC " << name() << " WRITE_BC_DIR_READ>" 3566 << " Read the cache to complete local buffer" << std::endl; 3567 #endif 3568 break; 3569 } 3570 /////////////////////// 3571 case WRITE_BC_TRT_LOCK: // get TRT lock to check TRT not full 3572 { 3573 assert( (r_alloc_dir_fsm.read() == ALLOC_DIR_WRITE) and 3574 "MEMC ERROR in WRITE_BC_TRT_LOCK state: Bad DIR allocation"); 3575 3576 // We read the cache and complete the buffer. As the DATA cache uses a 3577 // synchronous RAM, the read DATA request has been performed in the 3578 // WRITE_BC_DIR_READ state but the data is available in this state. 3579 if (r_write_bc_data_we.read()) 3580 { 3428 3581 size_t set = m_y[(addr_t)(r_write_address.read())]; 3429 3582 size_t way = r_write_way.read(); … … 3437 3590 3438 3591 // complete only if mask is not null (for energy consumption) 3439 r_write_data[word] = (r_write_data[word].read() & mask) | 3592 r_write_data[word] = 3593 (r_write_data[word].read() & mask) | 3440 3594 (m_cache_data.read(way, set, word) & ~mask); 3441 } // end for 3442 3443 r_write_fsm = WRITE_BC_TRT_LOCK; 3444 3595 } 3445 3596 #if DEBUG_MEMC_WRITE 3446 3597 if(m_debug) 3447 std::cout << " <MEMC " << name() << " WRITE_BC_DIR_READ>" 3448 << " Read the cache to complete local buffer" << std::endl; 3449 #endif 3450 break; 3451 } 3452 /////////////////////// 3453 case WRITE_BC_TRT_LOCK: // get TRT lock to check TRT not full 3454 { 3455 assert( (r_alloc_dir_fsm.read() == ALLOC_DIR_WRITE) and 3456 "MEMC ERROR in WRITE_BC_TRT_LOCK state: Bad DIR allocation"); 3457 3458 if(r_alloc_trt_fsm.read() == ALLOC_TRT_WRITE) 3459 { 3598 std::cout 3599 << " <MEMC " << name() 3600 << " WRITE_BC_TRT_LOCK> Complete data buffer" << std::endl; 3601 #endif 3602 } 3603 3604 if (r_alloc_trt_fsm.read() != ALLOC_TRT_WRITE) 3605 { 3606 // if we loop in this state, the data does not need to be 3607 // rewritten (for energy consuption) 3608 r_write_bc_data_we = false; 3609 break; 3610 } 3611 3460 3612 size_t wok_index = 0; 3461 3613 bool wok = not m_trt.full(wok_index); … … 3472 3624 #if DEBUG_MEMC_WRITE 3473 3625 if(m_debug) 3474 std::cout << " <MEMC " << name() << " WRITE_BC_TRT_LOCK> Check TRT" 3475 << " : wok = " << wok << " / index = " << wok_index << std::endl; 3476 #endif 3477 m_cpt_write_fsm_n_trt_lock++; 3478 } 3479 3626 std::cout << " <MEMC " << name() 3627 << " WRITE_BC_TRT_LOCK> Check TRT : wok = " << wok 3628 << " / index = " << wok_index << std::endl; 3629 #endif 3480 3630 m_cpt_write_fsm_trt_lock++; 3481 3631 … … 3568 3718 m_cache_directory.write(set, way, entry); 3569 3719 3720 if ((r_write_pktid.read() & 0x7) == TYPE_SC) 3721 { 3722 m_llsc_table.sc(r_write_address.read(), 3723 r_write_sc_key.read()); 3724 } 3725 3570 3726 #if DEBUG_MEMC_WRITE 3571 3727 if(m_debug) … … 3611 3767 { 3612 3768 r_write_to_ixr_cmd_req = true; 3613 r_write_to_ixr_cmd_put = true;3614 3769 r_write_to_ixr_cmd_index = r_write_trt_index.read(); 3615 3770 r_write_fsm = WRITE_IDLE; … … 3765 3920 r_ixr_cmd_word = 0; 3766 3921 r_ixr_cmd_fsm = IXR_CMD_READ_SEND; 3767 for( size_t i=0 ; i<m_words ; i++ ) r_ixr_cmd_wdata[i] = entry.wdata[i];3768 3922 3769 3923 #if DEBUG_MEMC_IXR_CMD … … 3787 3941 r_ixr_cmd_word = 0; 3788 3942 r_ixr_cmd_fsm = IXR_CMD_WRITE_SEND; 3943 3944 // Read data from TRT if PUT transaction 3945 if (not entry.xram_read) 3946 { 3789 3947 for( size_t i=0 ; i<m_words ; i++ ) r_ixr_cmd_wdata[i] = entry.wdata[i]; 3948 } 3790 3949 3791 3950 #if DEBUG_MEMC_IXR_CMD … … 3809 3968 r_ixr_cmd_word = 0; 3810 3969 r_ixr_cmd_fsm = IXR_CMD_CAS_SEND; 3970 3971 // Read data from TRT if PUT transaction 3972 if (not entry.xram_read) 3973 { 3811 3974 for( size_t i=0 ; i<m_words ; i++ ) r_ixr_cmd_wdata[i] = entry.wdata[i]; 3975 } 3812 3976 3813 3977 #if DEBUG_MEMC_IXR_CMD … … 3909 4073 if(p_vci_ixr.cmdack) 3910 4074 { 3911 if (r_write_to_ixr_cmd_put.read()) // PUT4075 if (not r_ixr_cmd_get.read()) // PUT 3912 4076 { 3913 4077 if(r_ixr_cmd_word.read() == (m_words - 2)) … … 3946 4110 if(p_vci_ixr.cmdack) 3947 4111 { 3948 if (r_cas_to_ixr_cmd_put.read()) // PUT4112 if (not r_ixr_cmd_get.read()) // PUT 3949 4113 { 3950 4114 if(r_ixr_cmd_word.read() == (m_words - 2)) … … 4291 4455 r_xram_rsp_victim_way = way; 4292 4456 r_xram_rsp_victim_set = set; 4293 r_xram_rsp_victim_nline = victim.tag*m_sets + set;4457 r_xram_rsp_victim_nline = (addr_t)victim.tag*m_sets + set; 4294 4458 r_xram_rsp_victim_is_cnt = victim.is_cnt; 4295 4459 r_xram_rsp_victim_inval = inval ; … … 4808 4972 //////////////////////////////////////////////////////////////////////////////////// 4809 4973 4810 //std::cout << std::endl << "cleanup_fsm" << std::endl;4811 4812 4974 switch(r_cleanup_fsm.read()) 4813 4975 { … … 4842 5004 "MEMC ERROR in CLEANUP_IDLE state : illegal SRCID value"); 4843 5005 4844 m_cpt_cleanup++; 5006 // <Activity Counters> 5007 if (is_local_req(srcid)) { 5008 m_cpt_cleanup_local++; 5009 } 5010 else { 5011 m_cpt_cleanup_remote++; 5012 m_cpt_cleanup_cost += req_distance(srcid); 5013 } 5014 // </Activity Counters> 4845 5015 cc_receive_to_cleanup_fifo_get = true; 4846 5016 r_cleanup_fsm = CLEANUP_GET_NLINE; … … 5589 5759 if(m_cmd_cas_eop_fifo.read()) 5590 5760 { 5591 m_cpt_cas++;5592 5761 r_cas_fsm = CAS_DIR_REQ; 5593 5762 } … … 6135 6304 { 6136 6305 r_cas_to_ixr_cmd_req = true; 6137 r_cas_to_ixr_cmd_put = true;6138 6306 r_cas_to_ixr_cmd_index = r_cas_trt_index.read(); 6139 6307 r_cas_fsm = CAS_IDLE; … … 6272 6440 { 6273 6441 r_cas_to_ixr_cmd_req = true; 6274 r_cas_to_ixr_cmd_put = false;6275 6442 r_cas_to_ixr_cmd_index = r_cas_trt_index.read(); 6276 6443 r_cas_fsm = CAS_WAIT; … … 6328 6495 { 6329 6496 r_cc_send_fsm = CC_SEND_XRAM_RSP_INVAL_HEADER; 6330 m_cpt_inval++;6331 6497 break; 6332 6498 } … … 6334 6500 { 6335 6501 r_cc_send_fsm = CC_SEND_XRAM_RSP_BRDCAST_HEADER; 6336 m_cpt_inval++;6337 6502 break; 6338 6503 } … … 6342 6507 { 6343 6508 r_cc_send_fsm = CC_SEND_CAS_UPDT_HEADER; 6344 m_cpt_update++;6345 6509 break; 6346 6510 } … … 6348 6512 { 6349 6513 r_cc_send_fsm = CC_SEND_CAS_BRDCAST_HEADER; 6350 m_cpt_inval++;6351 6514 break; 6352 6515 } … … 6356 6519 { 6357 6520 r_cc_send_fsm = CC_SEND_WRITE_UPDT_HEADER; 6358 m_cpt_update++;6359 6521 break; 6360 6522 } … … 6362 6524 { 6363 6525 r_cc_send_fsm = CC_SEND_WRITE_BRDCAST_HEADER; 6364 m_cpt_inval++;6365 6526 break; 6366 6527 } … … 6369 6530 { 6370 6531 r_cc_send_fsm = CC_SEND_CONFIG_INVAL_HEADER; 6371 m_cpt_inval++;6372 6532 break; 6373 6533 } … … 6375 6535 { 6376 6536 r_cc_send_fsm = CC_SEND_CONFIG_BRDCAST_HEADER; 6377 m_cpt_inval++;6378 6537 break; 6379 6538 } … … 6387 6546 { 6388 6547 r_cc_send_fsm = CC_SEND_CONFIG_INVAL_HEADER; 6389 m_cpt_inval++;6390 6548 break; 6391 6549 } … … 6393 6551 { 6394 6552 r_cc_send_fsm = CC_SEND_CONFIG_BRDCAST_HEADER; 6395 m_cpt_inval++;6396 6553 break; 6397 6554 } … … 6401 6558 { 6402 6559 r_cc_send_fsm = CC_SEND_XRAM_RSP_INVAL_HEADER; 6403 m_cpt_inval++;6404 6560 break; 6405 6561 } … … 6407 6563 { 6408 6564 r_cc_send_fsm = CC_SEND_XRAM_RSP_BRDCAST_HEADER; 6409 m_cpt_inval++;6410 6565 break; 6411 6566 } … … 6415 6570 { 6416 6571 r_cc_send_fsm = CC_SEND_CAS_UPDT_HEADER; 6417 m_cpt_update++;6418 6572 break; 6419 6573 } … … 6421 6575 { 6422 6576 r_cc_send_fsm = CC_SEND_CAS_BRDCAST_HEADER; 6423 m_cpt_inval++;6424 6577 break; 6425 6578 } … … 6429 6582 { 6430 6583 r_cc_send_fsm = CC_SEND_WRITE_UPDT_HEADER; 6431 m_cpt_update++;6432 6584 break; 6433 6585 } … … 6435 6587 { 6436 6588 r_cc_send_fsm = CC_SEND_WRITE_BRDCAST_HEADER; 6437 m_cpt_inval++;6438 6589 break; 6439 6590 } … … 6448 6599 { 6449 6600 r_cc_send_fsm = CC_SEND_CAS_UPDT_HEADER; 6450 m_cpt_update++;6451 6601 break; 6452 6602 } … … 6454 6604 { 6455 6605 r_cc_send_fsm = CC_SEND_CAS_BRDCAST_HEADER; 6456 m_cpt_inval++;6457 6606 break; 6458 6607 } … … 6462 6611 { 6463 6612 r_cc_send_fsm = CC_SEND_WRITE_UPDT_HEADER; 6464 m_cpt_update++;6465 6613 break; 6466 6614 } … … 6469 6617 { 6470 6618 r_cc_send_fsm = CC_SEND_WRITE_BRDCAST_HEADER; 6471 m_cpt_inval++;6472 6619 break; 6473 6620 } … … 6476 6623 { 6477 6624 r_cc_send_fsm = CC_SEND_CONFIG_INVAL_HEADER; 6478 m_cpt_inval++;6479 6625 break; 6480 6626 } … … 6482 6628 { 6483 6629 r_cc_send_fsm = CC_SEND_CONFIG_BRDCAST_HEADER; 6484 m_cpt_inval++;6485 6630 break; 6486 6631 } … … 6490 6635 { 6491 6636 r_cc_send_fsm = CC_SEND_XRAM_RSP_INVAL_HEADER; 6492 m_cpt_inval++;6493 6637 break; 6494 6638 } … … 6496 6640 { 6497 6641 r_cc_send_fsm = CC_SEND_XRAM_RSP_BRDCAST_HEADER; 6498 m_cpt_inval++;6499 6642 break; 6500 6643 } … … 6508 6651 { 6509 6652 r_cc_send_fsm = CC_SEND_WRITE_UPDT_HEADER; 6510 m_cpt_update++;6511 6653 break; 6512 6654 } … … 6514 6656 { 6515 6657 r_cc_send_fsm = CC_SEND_WRITE_BRDCAST_HEADER; 6516 m_cpt_inval++;6517 6658 break; 6518 6659 } … … 6521 6662 { 6522 6663 r_cc_send_fsm = CC_SEND_CONFIG_INVAL_HEADER; 6523 m_cpt_inval++;6524 6664 break; 6525 6665 } … … 6527 6667 { 6528 6668 r_cc_send_fsm = CC_SEND_CONFIG_BRDCAST_HEADER; 6529 m_cpt_inval++;6530 6669 break; 6531 6670 } … … 6534 6673 { 6535 6674 r_cc_send_fsm = CC_SEND_XRAM_RSP_INVAL_HEADER; 6536 m_cpt_inval++;6537 6675 break; 6538 6676 } … … 6540 6678 { 6541 6679 r_cc_send_fsm = CC_SEND_XRAM_RSP_BRDCAST_HEADER; 6542 m_cpt_inval++;6543 6680 break; 6544 6681 } … … 6547 6684 { 6548 6685 r_cc_send_fsm = CC_SEND_CAS_UPDT_HEADER; 6549 m_cpt_update++;6550 6686 break; 6551 6687 } … … 6553 6689 { 6554 6690 r_cc_send_fsm = CC_SEND_CAS_BRDCAST_HEADER; 6555 m_cpt_inval++;6556 6691 break; 6557 6692 } … … 6564 6699 { 6565 6700 if(not p_dspin_m2p.read) break; 6701 // <Activity Counters> 6702 if (is_local_req(m_config_to_cc_send_srcid_fifo.read())) 6703 { 6704 m_cpt_m_inval_local++; 6705 } 6706 else 6707 { 6708 m_cpt_m_inval_remote++; 6709 m_cpt_m_inval_cost += req_distance(m_config_to_cc_send_srcid_fifo.read()); 6710 } 6711 // </Activity Counters> 6566 6712 r_cc_send_fsm = CC_SEND_CONFIG_INVAL_NLINE; 6567 6713 break; 6568 6714 } 6569 6715 if(r_config_to_cc_send_multi_req.read()) r_config_to_cc_send_multi_req = false; 6716 // <Activity Counters> 6717 m_cpt_m_inval++; 6718 // </Activity Counters> 6570 6719 r_cc_send_fsm = CC_SEND_CONFIG_IDLE; 6571 6720 break; … … 6575 6724 { 6576 6725 if(not p_dspin_m2p.read) break; 6577 m_cpt_inval_mult++;6578 6726 config_to_cc_send_fifo_get = true; 6579 6727 r_cc_send_fsm = CC_SEND_CONFIG_INVAL_HEADER; … … 6598 6746 { 6599 6747 if(not p_dspin_m2p.read) break; 6600 m_cpt_inval_brdcast++; 6748 // <Activity Counters> 6749 m_cpt_br_inval++; 6750 // </Activity Counters> 6601 6751 r_config_to_cc_send_brdcast_req = false; 6602 6752 r_cc_send_fsm = CC_SEND_CONFIG_IDLE; … … 6616 6766 { 6617 6767 if(not p_dspin_m2p.read) break; 6768 // <Activity Counters> 6769 if (is_local_req(m_xram_rsp_to_cc_send_srcid_fifo.read())) 6770 { 6771 m_cpt_m_inval_local++; 6772 } 6773 else 6774 { 6775 m_cpt_m_inval_remote++; 6776 m_cpt_m_inval_cost += req_distance(m_xram_rsp_to_cc_send_srcid_fifo.read()); 6777 } 6778 // </Activity Counters> 6618 6779 r_cc_send_fsm = CC_SEND_XRAM_RSP_INVAL_NLINE; 6619 6780 break; 6620 6781 } 6621 6782 if(r_xram_rsp_to_cc_send_multi_req.read()) r_xram_rsp_to_cc_send_multi_req = false; 6783 // <Activity Counters> 6784 m_cpt_m_inval++; 6785 // </Activity Counters> 6622 6786 r_cc_send_fsm = CC_SEND_XRAM_RSP_IDLE; 6623 6787 break; … … 6627 6791 { 6628 6792 if(not p_dspin_m2p.read) break; 6629 m_cpt_inval_mult++;6630 6793 xram_rsp_to_cc_send_fifo_get = true; 6631 6794 r_cc_send_fsm = CC_SEND_XRAM_RSP_INVAL_HEADER; … … 6650 6813 { 6651 6814 if(not p_dspin_m2p.read) break; 6652 m_cpt_inval_brdcast++; 6815 // <Activity Counters> 6816 m_cpt_br_inval++; 6817 // </Activity Counters> 6653 6818 r_xram_rsp_to_cc_send_brdcast_req = false; 6654 6819 r_cc_send_fsm = CC_SEND_XRAM_RSP_IDLE; … … 6674 6839 if(not p_dspin_m2p.read) break; 6675 6840 6676 m_cpt_inval_brdcast++; 6841 // <Activity Counters> 6842 m_cpt_br_inval++; 6843 // </Activity Counters> 6677 6844 6678 6845 r_write_to_cc_send_brdcast_req = false; … … 6693 6860 { 6694 6861 if(not p_dspin_m2p.read) break; 6862 // <Activity Counters> 6863 if (is_local_req(m_write_to_cc_send_srcid_fifo.read())) 6864 { 6865 m_cpt_update_local++; 6866 } 6867 else 6868 { 6869 m_cpt_update_remote++; 6870 m_cpt_update_cost += req_distance(m_write_to_cc_send_srcid_fifo.read()); 6871 } 6872 // </Activity Counters> 6695 6873 6696 6874 r_cc_send_fsm = CC_SEND_WRITE_UPDT_NLINE; … … 6703 6881 } 6704 6882 6883 // <Activity Counters> 6884 m_cpt_update++; 6885 // </Activity Counters> 6705 6886 r_cc_send_fsm = CC_SEND_WRITE_IDLE; 6706 6887 break; … … 6710 6891 { 6711 6892 if(not p_dspin_m2p.read) break; 6712 m_cpt_update_mult++;6713 6893 6714 6894 r_cc_send_cpt = 0; … … 6727 6907 { 6728 6908 if(not p_dspin_m2p.read) break; 6729 if (r_cc_send_cpt.read() == (r_write_to_cc_send_count.read()-1))6909 if (r_cc_send_cpt.read() == r_write_to_cc_send_count.read()) 6730 6910 { 6731 6911 write_to_cc_send_fifo_get = true; … … 6748 6928 { 6749 6929 if(not p_dspin_m2p.read) break; 6750 m_cpt_inval_brdcast++; 6930 // <Activity Counters> 6931 m_cpt_br_inval++; 6932 // </Activity Counters> 6751 6933 6752 6934 r_cas_to_cc_send_brdcast_req = false; … … 6767 6949 { 6768 6950 if(not p_dspin_m2p.read) break; 6769 6951 // <Activity Counters> 6952 if (is_local_req(m_cas_to_cc_send_srcid_fifo.read())) 6953 { 6954 m_cpt_update_local++; 6955 } 6956 else 6957 { 6958 m_cpt_update_remote++; 6959 m_cpt_update_cost += req_distance(m_cas_to_cc_send_srcid_fifo.read()); 6960 } 6961 // </Activity Counters> 6770 6962 r_cc_send_fsm = CC_SEND_CAS_UPDT_NLINE; 6771 6963 break; … … 6778 6970 } 6779 6971 6972 // <Activity Counters> 6973 m_cpt_update++; 6974 // </Activity Counters> 6780 6975 r_cc_send_fsm = CC_SEND_CAS_IDLE; 6781 6976 break; … … 6785 6980 { 6786 6981 if(not p_dspin_m2p.read) break; 6787 6788 m_cpt_update_mult++;6789 6790 6982 r_cc_send_cpt = 0; 6791 6983 r_cc_send_fsm = CC_SEND_CAS_UPDT_DATA; … … 7359 7551 ///////////////////////// 7360 7552 case ALLOC_UPT_MULTI_ACK: // allocated to MULTI_ACK FSM 7361 if ((r_multi_ack_fsm.read() != MULTI_ACK_UPT_LOCK ) and 7362 (r_multi_ack_fsm.read() != MULTI_ACK_UPT_CLEAR)) 7553 if (r_multi_ack_fsm.read() != MULTI_ACK_UPT_LOCK) 7363 7554 { 7364 7555 if (r_write_fsm.read() == WRITE_UPT_LOCK) … … 7814 8005 r_alloc_trt_fsm = ALLOC_TRT_IXR_CMD; 7815 8006 7816 if((r_xram_rsp_fsm.read() == XRAM_RSP_DIR_LOCK) and8007 else if ((r_xram_rsp_fsm.read() == XRAM_RSP_DIR_LOCK) and 7817 8008 (r_alloc_dir_fsm.read() == ALLOC_DIR_XRAM_RSP)) 7818 8009 r_alloc_trt_fsm = ALLOC_TRT_XRAM_RSP; … … 8201 8392 r_alloc_heap_fsm = ALLOC_HEAP_CLEANUP; 8202 8393 8203 if(r_xram_rsp_fsm.read() == XRAM_RSP_HEAP_REQ)8394 else if (r_xram_rsp_fsm.read() == XRAM_RSP_HEAP_REQ) 8204 8395 r_alloc_heap_fsm = ALLOC_HEAP_XRAM_RSP; 8205 8396 else … … 8353 8544 ///////////////////////////// 8354 8545 { 8546 #if MONITOR_MEMCACHE_FSM == 1 8547 p_read_fsm.write (r_read_fsm.read() ); 8548 p_write_fsm.write (r_write_fsm.read() ); 8549 p_xram_rsp_fsm.write (r_xram_rsp_fsm.read() ); 8550 p_cas_fsm.write (r_cas_fsm.read() ); 8551 p_cleanup_fsm.write (r_cleanup_fsm.read() ); 8552 p_config_fsm.write (r_config_fsm.read() ); 8553 p_alloc_heap_fsm.write (r_alloc_heap_fsm.read() ); 8554 p_alloc_dir_fsm.write (r_alloc_dir_fsm.read() ); 8555 p_alloc_trt_fsm.write (r_alloc_trt_fsm.read() ); 8556 p_alloc_upt_fsm.write (r_alloc_upt_fsm.read() ); 8557 p_alloc_ivt_fsm.write (r_alloc_ivt_fsm.read() ); 8558 p_tgt_cmd_fsm.write (r_tgt_cmd_fsm.read() ); 8559 p_tgt_rsp_fsm.write (r_tgt_rsp_fsm.read() ); 8560 p_ixr_cmd_fsm.write (r_ixr_cmd_fsm.read() ); 8561 p_ixr_rsp_fsm.write (r_ixr_rsp_fsm.read() ); 8562 p_cc_send_fsm.write (r_cc_send_fsm.read() ); 8563 p_cc_receive_fsm.write (r_cc_receive_fsm.read() ); 8564 p_multi_ack_fsm.write (r_multi_ack_fsm.read() ); 8565 #endif 8566 8355 8567 //////////////////////////////////////////////////////////// 8356 8568 // Command signals on the p_vci_ixr port … … 8898 9110 8899 9111 p_dspin_m2p.write = true; 8900 p_dspin_m2p.eop = (r_cc_send_cpt.read() == (r_write_to_cc_send_count.read()-1));9112 p_dspin_m2p.eop = (r_cc_send_cpt.read() == r_write_to_cc_send_count.read()); 8901 9113 p_dspin_m2p.data = flit; 8902 9114 … … 9039 9251 DspinDhccpParam::dspin_set( 9040 9252 flit, 9041 r_cleanup_nline.read() & 0xFFFF,9253 r_cleanup_nline.read(), 9042 9254 DspinDhccpParam::CLACK_SET); 9043 9255 … … 9093 9305 9094 9306 // Local Variables: 9095 // tab-width: 29096 // c-basic-offset: 29307 // tab-width: 4 9308 // c-basic-offset: 4 9097 9309 // c-file-offsets:((innamespace . 0)(inline-open . 0)) 9098 9310 // indent-tabs-mode: nil -
Property
svn:mergeinfo
set to
(toggle deleted branches)
Note: See TracChangeset
for help on using the changeset viewer.