- Timestamp:
- May 1, 2013, 4:13:23 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/modules/vci_mem_cache/caba/source/include/vci_mem_cache.h
r362 r385 58 58 using namespace sc_core; 59 59 60 template<typename vci_param> 60 template<typename vci_param_int, 61 typename vci_param_ext, 62 size_t dspin_in_width, 63 size_t dspin_out_width> 61 64 class VciMemCache 62 65 : public soclib::caba::BaseModule 63 66 { 64 typedef sc_dt::sc_uint<40> addr_t; 65 typedef typename vci_param::fast_addr_t vci_addr_t; 67 typedef typename vci_param_int::fast_addr_t addr_t; 68 69 typedef typename sc_dt::sc_uint<64> wide_data_t; 70 66 71 typedef uint32_t data_t; 67 72 typedef uint32_t tag_t; 68 typedef uint32_t size_t;69 73 typedef uint32_t be_t; 70 74 typedef uint32_t copy_t; … … 343 347 344 348 bool m_monitor_ok; 345 vci_addr_tm_monitor_base;346 vci_addr_tm_monitor_length;349 addr_t m_monitor_base; 350 addr_t m_monitor_length; 347 351 348 352 // instrumentation counters … … 373 377 374 378 public: 375 sc_in<bool> p_clk;376 sc_in<bool> p_resetn;377 soclib::caba::VciTarget<vci_param >p_vci_tgt;378 soclib::caba::VciInitiator<vci_param >p_vci_ixr;379 soclib::caba::DspinInput< 33>p_dspin_in;380 soclib::caba::DspinOutput< 40>p_dspin_out;379 sc_in<bool> p_clk; 380 sc_in<bool> p_resetn; 381 soclib::caba::VciTarget<vci_param_int> p_vci_tgt; 382 soclib::caba::VciInitiator<vci_param_ext> p_vci_ixr; 383 soclib::caba::DspinInput<dspin_in_width> p_dspin_in; 384 soclib::caba::DspinOutput<dspin_out_width> p_dspin_out; 381 385 382 386 VciMemCache( … … 401 405 void print_stats(); 402 406 void print_trace(); 403 void copies_monitor( vci_addr_t addr);404 void start_monitor( vci_addr_t addr, vci_addr_t length);407 void copies_monitor(addr_t addr); 408 void start_monitor(addr_t addr, addr_t length); 405 409 void stop_monitor(); 406 410 … … 409 413 void transition(); 410 414 void genMoore(); 411 void check_monitor( const char *buf, vci_addr_t addr, data_t data); 412 void check_monitor_read( const char *buf, vci_addr_t addr); 415 void check_monitor( const char *buf, addr_t addr, data_t data, bool read); 413 416 414 417 // Component attributes … … 436 439 < 32 , // number of slots 437 440 4096, // number of processors in the system 438 8000, // registratioçn life span (in # of LL operations) 439 typename vci_param::fast_addr_t > // address type 440 m_llsc_table; // ll/sc global registration table 441 8000, // registration life (# of LL operations) 442 addr_t > m_llsc_table; // ll/sc global registration table 441 443 442 444 // adress masks 443 const soclib::common::AddressMaskingTable< vci_addr_t> m_x;444 const soclib::common::AddressMaskingTable< vci_addr_t> m_y;445 const soclib::common::AddressMaskingTable< vci_addr_t> m_z;446 const soclib::common::AddressMaskingTable< vci_addr_t> m_nline;445 const soclib::common::AddressMaskingTable<addr_t> m_x; 446 const soclib::common::AddressMaskingTable<addr_t> m_y; 447 const soclib::common::AddressMaskingTable<addr_t> m_z; 448 const soclib::common::AddressMaskingTable<addr_t> m_nline; 447 449 448 450 // broadcast address … … 454 456 455 457 // Fifo between TGT_CMD fsm and READ fsm 456 GenericFifo< uint64_t>m_cmd_read_addr_fifo;458 GenericFifo<addr_t> m_cmd_read_addr_fifo; 457 459 GenericFifo<size_t> m_cmd_read_length_fifo; 458 460 GenericFifo<size_t> m_cmd_read_srcid_fifo; … … 461 463 462 464 // Fifo between TGT_CMD fsm and WRITE fsm 463 GenericFifo< uint64_t>m_cmd_write_addr_fifo;465 GenericFifo<addr_t> m_cmd_write_addr_fifo; 464 466 GenericFifo<bool> m_cmd_write_eop_fifo; 465 467 GenericFifo<size_t> m_cmd_write_srcid_fifo; … … 470 472 471 473 // Fifo between TGT_CMD fsm and CAS fsm 472 GenericFifo< uint64_t>m_cmd_cas_addr_fifo;474 GenericFifo<addr_t> m_cmd_cas_addr_fifo; 473 475 GenericFifo<bool> m_cmd_cas_eop_fifo; 474 476 GenericFifo<size_t> m_cmd_cas_srcid_fifo; … … 504 506 sc_signal<size_t> r_read_next_ptr; // Next entry to point to 505 507 sc_signal<bool> r_read_last_free; // Last free entry 506 sc_signal<typename vci_param::fast_addr_t> 507 r_read_ll_key; // LL key returned by the llsc_global_table 508 sc_signal<addr_t> r_read_ll_key; // LL key from the llsc_global_table 508 509 509 510 // Buffer between READ fsm and IXR_CMD fsm (ask a missing cache line to XRAM) … … 520 521 sc_signal<size_t> r_read_to_tgt_rsp_word; // first word of the response 521 522 sc_signal<size_t> r_read_to_tgt_rsp_length; // length of the response 522 sc_signal<typename vci_param::fast_addr_t> 523 r_read_to_tgt_rsp_ll_key; // LL key returned by the llsc_global_table 523 sc_signal<addr_t> r_read_to_tgt_rsp_ll_key; // LL key from the llsc_global_table 524 524 525 525 /////////////////////////////////////////////////////////////// … … 578 578 GenericFifo<bool> m_write_to_cc_send_inst_fifo; // fifo for the L1 type 579 579 GenericFifo<size_t> m_write_to_cc_send_srcid_fifo; // fifo for srcids 580 580 581 #if L1_MULTI_CACHE 581 582 GenericFifo<size_t> m_write_to_cc_send_cache_id_fifo; // fifo for srcids … … 703 704 GenericFifo<bool> m_cas_to_cc_send_inst_fifo; // fifo for the L1 type 704 705 GenericFifo<size_t> m_cas_to_cc_send_srcid_fifo; // fifo for srcids 706 705 707 #if L1_MULTI_CACHE 706 708 GenericFifo<size_t> m_cas_to_cc_send_cache_id_fifo; // fifo for srcids … … 749 751 sc_signal<size_t> r_xram_rsp_to_tgt_rsp_length; // length of the response 750 752 sc_signal<bool> r_xram_rsp_to_tgt_rsp_rerror; // send error to requester 751 sc_signal<typename vci_param::fast_addr_t> 752 r_xram_rsp_to_tgt_rsp_ll_key; // LL key returned by the llsc_global_table 753 sc_signal<addr_t> r_xram_rsp_to_tgt_rsp_ll_key; // LL key from llsc_global_table 753 754 754 755 // Buffer between XRAM_RSP fsm and CC_SEND fsm (Inval L1 Caches) … … 759 760 GenericFifo<bool> m_xram_rsp_to_cc_send_inst_fifo; // fifo for the L1 type 760 761 GenericFifo<size_t> m_xram_rsp_to_cc_send_srcid_fifo; // fifo for srcids 762 761 763 #if L1_MULTI_CACHE 762 764 GenericFifo<size_t> m_xram_rsp_to_cc_send_cache_id_fifo; // fifo for srcids
Note: See TracChangeset
for help on using the changeset viewer.