Changeset 783 for branches/RWT
- Timestamp:
- Aug 29, 2014, 11:41:01 AM (10 years ago)
- Location:
- branches/RWT/modules/vci_mem_cache/caba/source
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/RWT/modules/vci_mem_cache/caba/source/include/vci_mem_cache.h
r780 r783 399 399 // b1 accÚs table llsc type SW / other 400 400 // b2 WRITE/CAS/LL/SC 401 TYPE_READ_DATA_UNC 402 TYPE_READ_DATA_MISS 403 TYPE_READ_INS_UNC 404 TYPE_READ_INS_MISS 405 TYPE_WRITE 406 TYPE_CAS 407 TYPE_LL 408 TYPE_SC 401 TYPE_READ_DATA_UNC = 0x0, 402 TYPE_READ_DATA_MISS = 0x1, 403 TYPE_READ_INS_UNC = 0x2, 404 TYPE_READ_INS_MISS = 0x3, 405 TYPE_WRITE = 0x4, 406 TYPE_CAS = 0x5, 407 TYPE_LL = 0x6, 408 TYPE_SC = 0x7 409 409 }; 410 410 … … 412 412 enum sc_status_type_e 413 413 { 414 SC_SUCCESS =0x00000000,415 SC_FAIL =0x00000001414 SC_SUCCESS = 0x00000000, 415 SC_FAIL = 0x00000001 416 416 }; 417 417 418 418 // debug variables 419 bool 420 bool 421 size_t 422 bool 423 data_t * 424 data_t * 419 bool m_debug; 420 bool m_debug_previous_valid; 421 size_t m_debug_previous_count; 422 bool m_debug_previous_dirty; 423 data_t * m_debug_previous_data; 424 data_t * m_debug_data; 425 425 426 426 // instrumentation counters 427 uint32_t m_cpt_cycles; // Counter of cycles 428 429 // Counters accessible in software (not yet but eventually) 430 uint32_t m_cpt_reset_count; // Last cycle at which counters have been reset 431 uint32_t m_cpt_read_local; // Number of local READ transactions 432 uint32_t m_cpt_read_remote; // number of remote READ transactions 433 uint32_t m_cpt_read_cost; // Number of (flits * distance) for READs 434 435 uint32_t m_cpt_write_local; // Number of local WRITE transactions 436 uint32_t m_cpt_write_remote; // number of remote WRITE transactions 437 uint32_t m_cpt_write_flits_local; // number of flits for local WRITEs 438 uint32_t m_cpt_write_flits_remote; // number of flits for remote WRITEs 439 uint32_t m_cpt_write_cost; // Number of (flits * distance) for WRITEs 440 uint32_t m_cpt_write_ncc_miss; // Number of write on ncc line 441 442 uint32_t m_cpt_ll_local; // Number of local LL transactions 443 uint32_t m_cpt_ll_remote; // number of remote LL transactions 444 uint32_t m_cpt_ll_cost; // Number of (flits * distance) for LLs 445 446 uint32_t m_cpt_sc_local; // Number of local SC transactions 447 uint32_t m_cpt_sc_remote; // number of remote SC transactions 448 uint32_t m_cpt_sc_cost; // Number of (flits * distance) for SCs 449 450 uint32_t m_cpt_cas_local; // Number of local SC transactions 451 uint32_t m_cpt_cas_remote; // number of remote SC transactions 452 uint32_t m_cpt_cas_cost; // Number of (flits * distance) for SCs 453 454 uint32_t m_cpt_update; // Number of requests causing an UPDATE 455 uint32_t m_cpt_update_local; // Number of local UPDATE transactions 456 uint32_t m_cpt_update_remote; // Number of remote UPDATE transactions 457 uint32_t m_cpt_update_cost; // Number of (flits * distance) for UPDT 458 459 uint32_t m_cpt_minval; // Number of requests causing M_INV 460 uint32_t m_cpt_minval_local; // Number of local M_INV transactions 461 uint32_t m_cpt_minval_remote; // Number of remote M_INV transactions 462 uint32_t m_cpt_minval_cost; // Number of (flits * distance) for M_INV 463 464 uint32_t m_cpt_binval; // Number of BROADCAST INVAL 465 466 uint32_t m_cpt_cleanup_local; // Number of local CLEANUP transactions 467 uint32_t m_cpt_cleanup_remote; // Number of remote CLEANUP transactions 468 uint32_t m_cpt_cleanup_cost; // Number of (flits * distance) for CLEANUPs 469 470 // Counters not accessible by software 471 uint32_t m_cpt_read_miss; // Number of MISS READ 472 uint32_t m_cpt_write_miss; // Number of MISS WRITE 473 uint32_t m_cpt_write_dirty; // Cumulated length for WRITE transactions 474 uint32_t m_cpt_write_broadcast;// Number of BROADCAST INVAL because write 475 476 uint32_t m_cpt_trt_rb; // Read blocked by a hit in trt 477 uint32_t m_cpt_trt_full; // Transaction blocked due to a full trt 427 uint32_t m_cpt_cycles; // Counter of cycles 428 429 // Counters accessible in software (not yet but eventually) and tagged 430 uint32_t m_cpt_reset_count; // Last cycle at which counters have been reset 431 uint32_t m_cpt_read_local; // Number of local READ transactions 432 uint32_t m_cpt_read_remote; // number of remote READ transactions 433 uint32_t m_cpt_read_cost; // Number of (flits * distance) for READs 434 435 uint32_t m_cpt_write_local; // Number of local WRITE transactions 436 uint32_t m_cpt_write_remote; // number of remote WRITE transactions 437 uint32_t m_cpt_write_flits_local; // number of flits for local WRITEs 438 uint32_t m_cpt_write_flits_remote; // number of flits for remote WRITEs 439 uint32_t m_cpt_write_cost; // Number of (flits * distance) for WRITEs 440 uint32_t m_cpt_write_ncc_miss; // Number of write on ncc line 441 442 uint32_t m_cpt_ll_local; // Number of local LL transactions 443 uint32_t m_cpt_ll_remote; // number of remote LL transactions 444 uint32_t m_cpt_ll_cost; // Number of (flits * distance) for LLs 445 446 uint32_t m_cpt_sc_local; // Number of local SC transactions 447 uint32_t m_cpt_sc_remote; // number of remote SC transactions 448 uint32_t m_cpt_sc_cost; // Number of (flits * distance) for SCs 449 450 uint32_t m_cpt_cas_local; // Number of local SC transactions 451 uint32_t m_cpt_cas_remote; // number of remote SC transactions 452 uint32_t m_cpt_cas_cost; // Number of (flits * distance) for SCs 453 454 uint32_t m_cpt_update; // Number of requests causing an UPDATE 455 uint32_t m_cpt_update_local; // Number of local UPDATE transactions 456 uint32_t m_cpt_update_remote; // Number of remote UPDATE transactions 457 uint32_t m_cpt_update_cost; // Number of (flits * distance) for UPDT 458 459 uint32_t m_cpt_minval; // Number of requests causing M_INV 460 uint32_t m_cpt_minval_local; // Number of local M_INV transactions 461 uint32_t m_cpt_minval_remote; // Number of remote M_INV transactions 462 uint32_t m_cpt_minval_cost; // Number of (flits * distance) for M_INV 463 464 uint32_t m_cpt_binval; // Number of BROADCAST INVAL 465 466 uint32_t m_cpt_cleanup_local; // Number of local CLEANUP transactions (all cleanup types) 467 uint32_t m_cpt_cleanup_remote; // Number of remote CLEANUP transactions (all cleanup types) 468 uint32_t m_cpt_cleanup_cost; // Number of (flits * distance) for CLEANUPs (all types) 469 470 // Counters not accessible by software, but tagged 471 uint32_t m_cpt_read_miss; // Number of MISS READ 472 uint32_t m_cpt_write_miss; // Number of MISS WRITE 473 uint32_t m_cpt_write_dirty; // Cumulated length for WRITE transactions 474 uint32_t m_cpt_write_broadcast; // Number of BROADCAST INVAL because write 475 476 uint32_t m_cpt_trt_rb; // Read blocked by a hit in trt 477 uint32_t m_cpt_trt_full; // Transaction blocked due to a full trt 478 479 uint32_t m_cpt_heap_unused; // NB cycles HEAP LOCK unused 480 uint32_t m_cpt_heap_slot_available; // NB HEAP slot available refresh at each cycles 481 uint32_t m_cpt_heap_min_slot_available; // NB HEAP : Min of slot available 482 483 uint32_t m_cpt_ncc_to_cc_read; // NB change from NCC to CC caused by a READ 484 uint32_t m_cpt_ncc_to_cc_write; // NB change from NCC to CC caused by a WRITE 485 486 uint32_t m_cpt_cleanup_data_local; // Number of local cleanups with data 487 uint32_t m_cpt_cleanup_data_remote; // Number of remote cleanups with data 488 uint32_t m_cpt_cleanup_data_cost; // Cost for cleanups with data 489 490 uint32_t m_cpt_update_flits; // Number of flits for UPDATEs 491 uint32_t m_cpt_inval_cost; // Number of (flits * distance) for INVALs 492 493 uint32_t m_cpt_get; 494 uint32_t m_cpt_put; 495 496 // TODO: clean the following counters (not necessarily useful and well-implemented) 497 uint32_t m_cpt_read_fsm_dir_lock; // wait DIR LOCK 498 uint32_t m_cpt_read_fsm_n_dir_lock; // NB DIR LOCK 499 uint32_t m_cpt_write_fsm_dir_lock; // wait DIR LOCK 500 uint32_t m_cpt_write_fsm_n_dir_lock; // NB DIR LOCK 501 uint32_t m_cpt_xram_rsp_fsm_dir_lock; // wait DIR LOCK 502 uint32_t m_cpt_xram_rsp_fsm_n_dir_lock; // NB DIR LOCK 503 uint32_t m_cpt_cas_fsm_dir_lock; // wait DIR LOCK 504 uint32_t m_cpt_cas_fsm_n_dir_lock; // NB DIR LOCK 505 uint32_t m_cpt_cleanup_fsm_dir_lock; // wait DIR LOCK 506 uint32_t m_cpt_cleanup_fsm_n_dir_lock; // NB DIR LOCK 478 507 479 uint32_t m_cpt_read_fsm_dir_lock; // wait DIR LOCK 480 uint32_t m_cpt_read_fsm_n_dir_lock; // NB DIR LOCK 481 uint32_t m_cpt_write_fsm_dir_lock; // wait DIR LOCK 482 uint32_t m_cpt_write_fsm_n_dir_lock; // NB DIR LOCK 483 uint32_t m_cpt_xram_rsp_fsm_dir_lock; // wait DIR LOCK 484 uint32_t m_cpt_xram_rsp_fsm_n_dir_lock; // NB DIR LOCK 485 uint32_t m_cpt_cas_fsm_dir_lock; // wait DIR LOCK 486 uint32_t m_cpt_cas_fsm_n_dir_lock; // NB DIR LOCK 487 uint32_t m_cpt_cleanup_fsm_dir_lock; // wait DIR LOCK 488 uint32_t m_cpt_cleanup_fsm_n_dir_lock; // NB DIR LOCK 508 uint32_t m_cpt_dir_unused; // NB cycles DIR LOCK unused 509 uint32_t m_cpt_read_fsm_dir_used; // NB cycles DIR LOCK used 510 uint32_t m_cpt_write_fsm_dir_used; // NB cycles DIR LOCK used 511 uint32_t m_cpt_cas_fsm_dir_used; // NB cycles DIR LOCK used 512 uint32_t m_cpt_xram_rsp_fsm_dir_used; // NB cycles DIR LOCK used 513 uint32_t m_cpt_cleanup_fsm_dir_used; // NB cycles DIR LOCK used 514 515 uint32_t m_cpt_read_fsm_trt_lock; // wait TRT LOCK 516 uint32_t m_cpt_write_fsm_trt_lock; // wait TRT LOCK 517 uint32_t m_cpt_cas_fsm_trt_lock; // wait TRT LOCK 518 uint32_t m_cpt_xram_rsp_fsm_trt_lock; // wait TRT LOCK 519 uint32_t m_cpt_ixr_fsm_trt_lock; // wait TRT LOCK 489 520 490 uint32_t m_cpt_dir_unused; // NB cycles DIR LOCK unused 491 uint32_t m_cpt_read_fsm_dir_used; // NB cycles DIR LOCK used 492 uint32_t m_cpt_write_fsm_dir_used; // NB cycles DIR LOCK used 493 uint32_t m_cpt_cas_fsm_dir_used; // NB cycles DIR LOCK used 494 uint32_t m_cpt_xram_rsp_fsm_dir_used; // NB cycles DIR LOCK used 495 uint32_t m_cpt_cleanup_fsm_dir_used; // NB cycles DIR LOCK used 496 497 uint32_t m_cpt_read_fsm_trt_lock; // wait TRT LOCK 498 uint32_t m_cpt_write_fsm_trt_lock; // wait TRT LOCK 499 uint32_t m_cpt_cas_fsm_trt_lock; // wait TRT LOCK 500 uint32_t m_cpt_xram_rsp_fsm_trt_lock; // wait TRT LOCK 501 uint32_t m_cpt_ixr_fsm_trt_lock; // wait TRT LOCK 521 uint32_t m_cpt_read_fsm_n_trt_lock; // NB TRT LOCK 522 uint32_t m_cpt_write_fsm_n_trt_lock; // NB TRT LOCK 523 uint32_t m_cpt_cas_fsm_n_trt_lock; // NB TRT LOCK 524 uint32_t m_cpt_xram_rsp_fsm_n_trt_lock; // NB TRT LOCK 525 uint32_t m_cpt_ixr_fsm_n_trt_lock; // NB TRT LOCK 526 527 uint32_t m_cpt_read_fsm_trt_used; // NB cycles TRT LOCK used 528 uint32_t m_cpt_write_fsm_trt_used; // NB cycles TRT LOCK used 529 uint32_t m_cpt_cas_fsm_trt_used; // NB cycles TRT LOCK used 530 uint32_t m_cpt_xram_rsp_fsm_trt_used; // NB cycles TRT LOCK used 531 uint32_t m_cpt_ixr_fsm_trt_used; // NB cycles TRT LOCK used 502 532 503 uint32_t m_cpt_read_fsm_n_trt_lock; // NB TRT LOCK 504 uint32_t m_cpt_write_fsm_n_trt_lock; // NB TRT LOCK 505 uint32_t m_cpt_cas_fsm_n_trt_lock; // NB TRT LOCK 506 uint32_t m_cpt_xram_rsp_fsm_n_trt_lock; // NB TRT LOCK 507 uint32_t m_cpt_ixr_fsm_n_trt_lock; // NB TRT LOCK 508 509 uint32_t m_cpt_read_fsm_trt_used; // NB cycles TRT LOCK used 510 uint32_t m_cpt_write_fsm_trt_used; // NB cycles TRT LOCK used 511 uint32_t m_cpt_cas_fsm_trt_used; // NB cycles TRT LOCK used 512 uint32_t m_cpt_xram_rsp_fsm_trt_used; // NB cycles TRT LOCK used 513 uint32_t m_cpt_ixr_fsm_trt_used; // NB cycles TRT LOCK used 533 uint32_t m_cpt_trt_unused; // NB cycles TRT LOCK unused 534 535 uint32_t m_cpt_write_fsm_upt_lock; // wait UPT LOCK 536 uint32_t m_cpt_xram_rsp_fsm_upt_lock; // wait UPT LOCK 537 uint32_t m_cpt_multi_ack_fsm_upt_lock; // wait UPT LOCK 538 uint32_t m_cpt_cleanup_fsm_ivt_lock; // wait UPT LOCK 539 uint32_t m_cpt_cas_fsm_upt_lock; // wait UPT LOCK 514 540 515 uint32_t m_cpt_trt_unused; // NB cycles TRT LOCK unused 516 517 uint32_t m_cpt_write_fsm_upt_lock; // wait UPT LOCK 518 uint32_t m_cpt_xram_rsp_fsm_upt_lock; // wait UPT LOCK 519 uint32_t m_cpt_multi_ack_fsm_upt_lock; // wait UPT LOCK 520 uint32_t m_cpt_cleanup_fsm_ivt_lock; // wait UPT LOCK 521 uint32_t m_cpt_cas_fsm_upt_lock; // wait UPT LOCK 541 uint32_t m_cpt_write_fsm_n_upt_lock; // NB UPT LOCK 542 uint32_t m_cpt_xram_rsp_fsm_n_upt_lock; // NB UPT LOCK 543 uint32_t m_cpt_multi_ack_fsm_n_upt_lock; // NB UPT LOCK 544 uint32_t m_cpt_cleanup_fsm_n_upt_lock; // NB UPT LOCK 545 uint32_t m_cpt_cas_fsm_n_upt_lock; // NB UPT LOCK 522 546 523 uint32_t m_cpt_write_fsm_n_upt_lock; // NB UPT LOCK524 uint32_t m_cpt_xram_rsp_fsm_n_upt_lock; // NB UPT LOCK525 uint32_t m_cpt_multi_ack_fsm_n_upt_lock; // NB UPT LOCK526 uint32_t m_cpt_cleanup_fsm_n_upt_lock; // NB UPT LOCK527 uint32_t m_cpt_cas_fsm_n_upt_lock; // NB UPT LOCK547 uint32_t m_cpt_write_fsm_upt_used; // NB cycles UPT LOCK used 548 uint32_t m_cpt_xram_rsp_fsm_upt_used; // NB cycles UPT LOCK used 549 uint32_t m_cpt_multi_ack_fsm_upt_used; // NB cycles UPT LOCK used 550 uint32_t m_cpt_cleanup_fsm_ivt_used; // NB cycles UPT LOCK used 551 uint32_t m_cpt_cas_fsm_upt_used; // NB cycles UPT LOCK used 528 552 529 uint32_t m_cpt_write_fsm_upt_used; // NB cycles UPT LOCK used 530 uint32_t m_cpt_xram_rsp_fsm_upt_used; // NB cycles UPT LOCK used 531 uint32_t m_cpt_multi_ack_fsm_upt_used; // NB cycles UPT LOCK used 532 uint32_t m_cpt_cleanup_fsm_ivt_used; // NB cycles UPT LOCK used 533 uint32_t m_cpt_cas_fsm_upt_used; // NB cycles UPT LOCK used 553 uint32_t m_cpt_ivt_unused; // NB cycles UPT LOCK unused 554 uint32_t m_cpt_upt_unused; // NB cycles UPT LOCK unused 555 556 uint32_t m_cpt_read_fsm_heap_lock; // wait HEAP LOCK 557 uint32_t m_cpt_write_fsm_heap_lock; // wait HEAP LOCK 558 uint32_t m_cpt_cas_fsm_heap_lock; // wait HEAP LOCK 559 uint32_t m_cpt_cleanup_fsm_heap_lock; // wait HEAP LOCK 560 uint32_t m_cpt_xram_rsp_fsm_heap_lock; // wait HEAP LOCK 534 561 535 uint32_t m_cpt_ivt_unused; // NB cycles UPT LOCK unused 536 uint32_t m_cpt_upt_unused; // NB cycles UPT LOCK unused 537 538 uint32_t m_cpt_read_fsm_heap_lock; // wait HEAP LOCK 539 uint32_t m_cpt_write_fsm_heap_lock; // wait HEAP LOCK 540 uint32_t m_cpt_cas_fsm_heap_lock; // wait HEAP LOCK 541 uint32_t m_cpt_cleanup_fsm_heap_lock; // wait HEAP LOCK 542 uint32_t m_cpt_xram_rsp_fsm_heap_lock; // wait HEAP LOCK 562 uint32_t m_cpt_read_fsm_n_heap_lock; // NB HEAP LOCK 563 uint32_t m_cpt_write_fsm_n_heap_lock; // NB HEAP LOCK 564 uint32_t m_cpt_cas_fsm_n_heap_lock; // NB HEAP LOCK 565 uint32_t m_cpt_cleanup_fsm_n_heap_lock; // NB HEAP LOCK 566 uint32_t m_cpt_xram_rsp_fsm_n_heap_lock; // NB HEAP LOCK 543 567 544 uint32_t m_cpt_read_fsm_n_heap_lock; // NB HEAP LOCK545 uint32_t m_cpt_write_fsm_n_heap_lock; // NB HEAP LOCK546 uint32_t m_cpt_cas_fsm_n_heap_lock; // NB HEAP LOCK547 uint32_t m_cpt_cleanup_fsm_n_heap_lock; // NB HEAP LOCK548 uint32_t m_cpt_xram_rsp_fsm_n_heap_lock; // NB HEAP LOCK568 uint32_t m_cpt_read_fsm_heap_used; // NB cycles HEAP LOCK used 569 uint32_t m_cpt_write_fsm_heap_used; // NB cycles HEAP LOCK used 570 uint32_t m_cpt_cas_fsm_heap_used; // NB cycles HEAP LOCK used 571 uint32_t m_cpt_cleanup_fsm_heap_used; // NB cycles HEAP LOCK used 572 uint32_t m_cpt_xram_rsp_fsm_heap_used; // NB cycles HEAP LOCK used 549 573 550 uint32_t m_cpt_read_fsm_heap_used; // NB cycles HEAP LOCK used 551 uint32_t m_cpt_write_fsm_heap_used; // NB cycles HEAP LOCK used 552 uint32_t m_cpt_cas_fsm_heap_used; // NB cycles HEAP LOCK used 553 uint32_t m_cpt_cleanup_fsm_heap_used; // NB cycles HEAP LOCK used 554 uint32_t m_cpt_xram_rsp_fsm_heap_used; // NB cycles HEAP LOCK used 555 556 uint32_t m_cpt_heap_unused; // NB cycles HEAP LOCK unused 557 uint32_t m_cpt_heap_slot_available; // NB HEAP slot available refresh at each cycles 558 uint32_t m_cpt_heap_min_slot_available; // NB HEAP : Min of slot available 559 560 //RWT 561 uint32_t m_cpt_cleanup_data; 562 uint32_t m_cpt_ncc_to_cc_read; // NB change from NCC to CC caused by a READ 563 uint32_t m_cpt_ncc_to_cc_write; // NB change from NCC to CC caused by a WRITE 564 565 uint32_t m_cpt_read_data_unc; 566 uint32_t m_cpt_read_data_miss_CC; 567 uint32_t m_cpt_read_ins_unc; 568 uint32_t m_cpt_read_ins_miss; 569 uint32_t m_cpt_read_ll_CC; 570 uint32_t m_cpt_read_data_miss_NCC; 571 uint32_t m_cpt_read_ll_NCC; 572 uint32_t m_cpt_read_WTF; 573 574 uint32_t m_cpt_update_flits; // Number of flits for UPDATEs 575 uint32_t m_cpt_inval_cost; // Number of (flits * distance) for INVALs 576 577 uint32_t m_cpt_get; 578 uint32_t m_cpt_put; 579 580 size_t m_prev_count; 574 uint32_t m_cpt_read_data_unc; 575 uint32_t m_cpt_read_data_miss_CC; 576 uint32_t m_cpt_read_ins_unc; 577 uint32_t m_cpt_read_ins_miss; 578 uint32_t m_cpt_read_ll_CC; 579 uint32_t m_cpt_read_data_miss_NCC; 580 uint32_t m_cpt_read_ll_NCC; 581 582 size_t m_prev_count; 581 583 582 584 protected: -
branches/RWT/modules/vci_mem_cache/caba/source/src/vci_mem_cache.cpp
r780 r783 616 616 ///////////////////////////////////////////////////// 617 617 tmpl(void) ::cache_monitor(addr_t addr) 618 618 ///////////////////////////////////////////////////// 619 619 { 620 620 size_t way = 0; … … 678 678 ///////////////////////////////////////////////////// 679 679 tmpl(uint32_t)::min_value(uint32_t old_value, uint32_t new_value) 680 680 ///////////////////////////////////////////////////// 681 681 { 682 682 if (old_value < new_value) … … 688 688 ///////////////////////////////////////////////////// 689 689 tmpl(uint32_t)::req_distance(uint32_t req_srcid) 690 690 ///////////////////////////////////////////////////// 691 691 { 692 692 const uint32_t srcid_width = vci_param_int::S; … … 701 701 ///////////////////////////////////////////////////// 702 702 tmpl(bool)::is_local_req(uint32_t req_srcid) 703 703 ///////////////////////////////////////////////////// 704 704 { 705 705 return req_distance(req_srcid) == 0; … … 845 845 ///////////////////////////////////////// 846 846 { 847 m_cpt_reset_count = m_cpt_cycles; 848 m_cpt_read_local = 0; 849 m_cpt_read_remote = 0; 850 m_cpt_read_cost = 0; 851 m_cpt_write_local = 0; 852 m_cpt_write_remote = 0; 853 m_cpt_write_flits_local = 0; 854 m_cpt_write_flits_remote = 0; 855 m_cpt_write_cost = 0; 856 m_cpt_ll_local = 0; 857 m_cpt_ll_remote = 0; 858 m_cpt_ll_cost = 0; 859 m_cpt_sc_local = 0; 860 m_cpt_sc_remote = 0; 861 m_cpt_sc_cost = 0; 862 m_cpt_cas_local = 0; 863 m_cpt_cas_remote = 0; 864 m_cpt_cas_cost = 0; 865 m_cpt_update = 0; 866 m_cpt_update_local = 0; 867 m_cpt_update_remote = 0; 868 m_cpt_update_cost = 0; 869 m_cpt_minval = 0; 870 m_cpt_minval_local = 0; 871 m_cpt_minval_remote = 0; 872 m_cpt_minval_cost = 0; 873 m_cpt_binval = 0; 874 m_cpt_cleanup_local = 0; 875 m_cpt_cleanup_remote = 0; 876 m_cpt_cleanup_cost = 0; 877 m_cpt_read_miss = 0; 878 m_cpt_write_miss = 0; 879 m_cpt_write_dirty = 0; 880 m_cpt_trt_rb = 0; 881 m_cpt_trt_full = 0; 882 m_cpt_get = 0; 883 m_cpt_put = 0; 884 m_cpt_ncc_to_cc_read = 0; 885 m_cpt_ncc_to_cc_write = 0; 886 m_cpt_write_ncc_miss = 0; 847 m_cpt_reset_count = m_cpt_cycles; 848 m_cpt_read_local = 0; 849 m_cpt_read_remote = 0; 850 m_cpt_read_cost = 0; 851 m_cpt_write_local = 0; 852 m_cpt_write_remote = 0; 853 m_cpt_write_flits_local = 0; 854 m_cpt_write_flits_remote = 0; 855 m_cpt_write_cost = 0; 856 m_cpt_write_ncc_miss = 0; 857 m_cpt_ll_local = 0; 858 m_cpt_ll_remote = 0; 859 m_cpt_ll_cost = 0; 860 m_cpt_sc_local = 0; 861 m_cpt_sc_remote = 0; 862 m_cpt_sc_cost = 0; 863 m_cpt_cas_local = 0; 864 m_cpt_cas_remote = 0; 865 m_cpt_cas_cost = 0; 866 m_cpt_update = 0; 867 m_cpt_update_local = 0; 868 m_cpt_update_remote = 0; 869 m_cpt_update_cost = 0; 870 m_cpt_minval = 0; 871 m_cpt_minval_local = 0; 872 m_cpt_minval_remote = 0; 873 m_cpt_minval_cost = 0; 874 m_cpt_binval = 0; 875 m_cpt_write_broadcast = 0; 876 m_cpt_cleanup_local = 0; 877 m_cpt_cleanup_remote = 0; 878 m_cpt_cleanup_cost = 0; 879 m_cpt_read_miss = 0; 880 m_cpt_write_miss = 0; 881 m_cpt_write_dirty = 0; 882 m_cpt_trt_rb = 0; 883 m_cpt_trt_full = 0; 884 m_cpt_get = 0; 885 m_cpt_put = 0; 886 m_cpt_ncc_to_cc_read = 0; 887 m_cpt_ncc_to_cc_write = 0; 888 m_cpt_cleanup_data_local = 0; 889 m_cpt_cleanup_data_remote = 0; 890 m_cpt_cleanup_data_cost = 0; 887 891 } 888 892 … … 941 945 << "[091] REMOTE CLEANUP = " << m_cpt_cleanup_remote << std::endl 942 946 << "[092] CLNUP COST (FLITS * DIST) = " << m_cpt_cleanup_cost << std::endl 943 << "[093] CLEANUP DATA = " << m_cpt_cleanup_data << std::endl 947 << "[093] LOCAL CLEANUP DATA = " << m_cpt_cleanup_data_local << std::endl 948 << "[094] REMOTE CLEANUP DATA = " << m_cpt_cleanup_data_remote << std::endl 949 << "[095] CLEANUP DATA COST = " << m_cpt_cleanup_data_cost << std::endl 944 950 << std::endl 945 951 << "[100] READ MISS = " << m_cpt_read_miss << std::endl … … 1012 1018 ///////////////////////////////// 1013 1019 tmpl(/**/) ::~VciMemCache() 1014 1020 ///////////////////////////////// 1015 1021 { 1016 1022 delete [] m_seg; … … 1042 1048 ////////////////////////////////// 1043 1049 tmpl(void) ::transition() 1044 1050 ////////////////////////////////// 1045 1051 { 1046 1052 using soclib::common::uint32_log2; … … 1187 1193 1188 1194 // Activity counters 1189 m_cpt_reset_count = 0; 1190 m_cpt_cycles = 0; 1191 m_cpt_read_local = 0; 1192 m_cpt_read_remote = 0; 1193 m_cpt_read_cost = 0; 1194 m_cpt_write_local = 0; 1195 m_cpt_write_remote = 0; 1196 m_cpt_write_flits_local = 0; 1197 m_cpt_write_flits_remote = 0; 1198 m_cpt_write_ncc_miss = 0; 1199 m_cpt_write_cost = 0; 1200 m_cpt_ll_local = 0; 1201 m_cpt_ll_remote = 0; 1202 m_cpt_ll_cost = 0; 1203 m_cpt_sc_local = 0; 1204 m_cpt_sc_remote = 0; 1205 m_cpt_sc_cost = 0; 1206 m_cpt_cas_local = 0; 1207 m_cpt_cas_remote = 0; 1208 m_cpt_cas_cost = 0; 1209 m_cpt_update = 0; 1210 m_cpt_update_local = 0; 1211 m_cpt_update_remote = 0; 1212 m_cpt_update_cost = 0; 1213 m_cpt_minval = 0; 1214 m_cpt_minval_local = 0; 1215 m_cpt_minval_remote = 0; 1216 m_cpt_minval_cost = 0; 1217 m_cpt_binval = 0; 1218 m_cpt_cleanup_local = 0; 1219 m_cpt_cleanup_remote = 0; 1220 m_cpt_cleanup_cost = 0; 1195 m_cpt_reset_count = 0; 1196 m_cpt_cycles = 0; 1197 m_cpt_read_local = 0; 1198 m_cpt_read_remote = 0; 1199 m_cpt_read_cost = 0; 1200 m_cpt_write_local = 0; 1201 m_cpt_write_remote = 0; 1202 m_cpt_write_flits_local = 0; 1203 m_cpt_write_flits_remote = 0; 1204 m_cpt_write_ncc_miss = 0; 1205 m_cpt_write_cost = 0; 1206 m_cpt_ll_local = 0; 1207 m_cpt_ll_remote = 0; 1208 m_cpt_ll_cost = 0; 1209 m_cpt_sc_local = 0; 1210 m_cpt_sc_remote = 0; 1211 m_cpt_sc_cost = 0; 1212 m_cpt_cas_local = 0; 1213 m_cpt_cas_remote = 0; 1214 m_cpt_cas_cost = 0; 1215 m_cpt_update = 0; 1216 m_cpt_update_local = 0; 1217 m_cpt_update_remote = 0; 1218 m_cpt_update_cost = 0; 1219 m_cpt_minval = 0; 1220 m_cpt_minval_local = 0; 1221 m_cpt_minval_remote = 0; 1222 m_cpt_minval_cost = 0; 1223 m_cpt_binval = 0; 1224 m_cpt_cleanup_local = 0; 1225 m_cpt_cleanup_remote = 0; 1226 m_cpt_cleanup_cost = 0; 1227 m_cpt_cleanup_data_local = 0; 1228 m_cpt_cleanup_data_remote = 0; 1229 m_cpt_cleanup_data_cost = 0; 1230 1221 1231 1222 1232 m_cpt_read_miss = 0; … … 1270 1280 m_cpt_read_data_miss_NCC = 0; 1271 1281 m_cpt_read_ll_NCC = 0; 1272 m_cpt_read_WTF = 0;1273 m_cpt_cleanup_data = 0;1274 1282 m_cpt_ncc_to_cc_read = 0; 1275 1283 m_cpt_ncc_to_cc_write = 0; … … 5688 5696 "MEMC ERROR in CLEANUP_IDLE state : illegal SRCID value"); 5689 5697 5690 // <Activity Counters>5691 if (is_local_req(srcid)) {5692 m_cpt_cleanup_local++;5693 }5694 else {5695 m_cpt_cleanup_remote++;5696 m_cpt_cleanup_cost += req_distance(srcid);5697 }5698 // </Activity Counters>5699 5698 cc_receive_to_cleanup_fifo_get = true; 5700 5699 r_cleanup_fsm = CLEANUP_GET_NLINE; … … 5720 5719 case CLEANUP_GET_NLINE: // GET second DSPIN flit of the cleanup command 5721 5720 { 5722 if (not m_cc_receive_to_cleanup_fifo.rok()) break;5721 if (not m_cc_receive_to_cleanup_fifo.rok()) break; 5723 5722 5724 5723 uint64_t flit = m_cc_receive_to_cleanup_fifo.read(); 5724 uint32_t srcid = r_cleanup_srcid.read(); 5725 5725 5726 5726 addr_t nline = r_cleanup_nline.read() | 5727 5727 DspinRwtParam::dspin_get(flit, DspinRwtParam::CLEANUP_NLINE_LSB); 5728 5728 5729 bool eop = 5730 DspinRwtParam::dspin_get(flit, DspinRwtParam::P2M_EOP) == 0x1; 5729 bool eop = DspinRwtParam::dspin_get(flit, DspinRwtParam::P2M_EOP) == 0x1; 5731 5730 5732 5731 if (! eop) … … 5735 5734 r_cleanup_data_index = 0; 5736 5735 r_cleanup_contains_data = true; 5736 // <Activity Counters> 5737 if (is_local_req(srcid)) { 5738 m_cpt_cleanup_local++; 5739 m_cpt_cleanup_data_local++; 5740 } 5741 else { 5742 m_cpt_cleanup_remote++; 5743 m_cpt_cleanup_data_remote++; 5744 } 5745 m_cpt_cleanup_cost += m_words * req_distance(srcid); 5746 m_cpt_cleanup_data_cost += m_words * req_distance(srcid); 5747 // </Activity Counters> 5737 5748 } 5738 5749 else 5739 5750 { 5740 5751 r_cleanup_fsm = CLEANUP_DIR_REQ; 5752 // <Activity Counters> 5753 if (is_local_req(srcid)) { 5754 m_cpt_cleanup_local++; 5755 } 5756 else { 5757 m_cpt_cleanup_remote++; 5758 } 5759 m_cpt_cleanup_cost += req_distance(srcid); 5760 // </Activity Counters> 5741 5761 } 5742 5762 cc_receive_to_cleanup_fifo_get = true; … … 5774 5794 { 5775 5795 r_cleanup_contains_data = true; 5776 m_cpt_cleanup_data ++;5777 5796 r_cleanup_fsm = CLEANUP_DIR_REQ; 5778 5797 } … … 7782 7801 { 7783 7802 m_cpt_minval_remote++; 7784 m_cpt_minval_cost += req_distance(m_config_to_cc_send_srcid_fifo.read());7785 }7803 } 7804 m_cpt_minval_cost += req_distance(m_config_to_cc_send_srcid_fifo.read()); 7786 7805 // </Activity Counters> 7787 7806 r_cc_send_fsm = CC_SEND_CONFIG_INVAL_NLINE; … … 7849 7868 { 7850 7869 m_cpt_minval_remote++; 7851 m_cpt_minval_cost += req_distance(m_xram_rsp_to_cc_send_srcid_fifo.read());7852 }7870 } 7871 m_cpt_minval_cost += req_distance(m_xram_rsp_to_cc_send_srcid_fifo.read()); 7853 7872 // </Activity Counters> 7854 7873 r_cc_send_fsm = CC_SEND_XRAM_RSP_INVAL_NLINE; … … 8002 8021 { 8003 8022 m_cpt_update_remote++; 8004 m_cpt_update_cost += req_distance(m_write_to_cc_send_srcid_fifo.read());8005 }8023 } 8024 m_cpt_update_cost += req_distance(m_write_to_cc_send_srcid_fifo.read()); 8006 8025 // </Activity Counters> 8007 8026 … … 8091 8110 { 8092 8111 m_cpt_update_remote++; 8093 m_cpt_update_cost += req_distance(m_cas_to_cc_send_srcid_fifo.read());8094 }8112 } 8113 m_cpt_update_cost += req_distance(m_cas_to_cc_send_srcid_fifo.read()); 8095 8114 // </Activity Counters> 8096 8115 r_cc_send_fsm = CC_SEND_CAS_UPDT_NLINE; … … 8566 8585 else 8567 8586 { 8568 m_cpt_read_WTF ++;8587 assert(false); 8569 8588 } 8570 8589 } … … 8658 8677 else if (!r_cleanup_to_tgt_rsp_type.read()) 8659 8678 { 8660 m_cpt_read_WTF ++;8679 assert(false); 8661 8680 } 8662 8681 … … 8754 8773 else 8755 8774 { 8756 m_cpt_read_WTF ++;8775 assert(false); 8757 8776 } 8758 8777
Note: See TracChangeset
for help on using the changeset viewer.