Changeset 313 for branches/v5/modules/vci_mem_cache_dspin_coherence
- Timestamp:
- Mar 12, 2013, 3:20:33 PM (12 years ago)
- Location:
- branches/v5/modules/vci_mem_cache_dspin_coherence/caba
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/v5/modules/vci_mem_cache_dspin_coherence/caba/metadata/vci_mem_cache.sd
r309 r313 9 9 10 10 tmpl_parameters = [ 11 parameter.Module('vci_param' , default = 'caba:vci_param'), 12 parameter.Int('from_mc_flit_width', default = 40), 13 parameter.Int('from_l1_flit_width', default = 33) 11 parameter.Module('vci_param' , default = 'caba:vci_param') 14 12 ], 15 13 … … 29 27 Uses('caba:generic_fifo'), 30 28 Uses('caba:generic_llsc_global_table'), 31 Uses( 32 'caba:dspin_dhccp_param', 33 from_mc_flit_width_t = parameter.Reference('from_mc_flit_width'), 34 from_l1_flit_width_t = parameter.Reference('from_l1_flit_width'), 35 ), 29 Uses('caba:dspin_dhccp_param') 36 30 ], 37 31 … … 41 35 'caba:dspin_input', 42 36 'p_dspin_in', 43 dspin_data_size = parameter.Reference('from_l1_flit_width'),37 dspin_data_size = 33, 44 38 ), 45 39 Port( 46 40 'caba:dspin_output', 47 41 'p_dspin_out', 48 dspin_data_size = parameter.Reference('from_mc_flit_width'),42 dspin_data_size = 40, 49 43 ), 50 44 Port( 'caba:vci_initiator', 'p_vci_ixr' ), -
branches/v5/modules/vci_mem_cache_dspin_coherence/caba/source/include/vci_mem_cache.h
r307 r313 58 58 using namespace sc_core; 59 59 60 template<typename vci_param , int from_mc_flit_width, int from_l1_flit_width>60 template<typename vci_param> 61 61 class VciMemCache 62 62 : public soclib::caba::BaseModule … … 69 69 typedef uint32_t be_t; 70 70 typedef uint32_t copy_t; 71 72 typedef soclib::caba::DspinDhccpParam73 <from_mc_flit_width74 ,from_l1_flit_width> dspin_param;75 71 76 72 /* States of the TGT_CMD fsm */ … … 225 221 CAS_DIR_LOCK, 226 222 CAS_DIR_HIT_READ, 223 CAS_DIR_HIT_COMPARE, 227 224 CAS_DIR_HIT_WRITE, 228 225 CAS_UPT_LOCK, … … 383 380 soclib::caba::VciInitiator<vci_param> p_vci_ixr; 384 381 385 soclib::caba::DspinInput <from_l1_flit_width>p_dspin_in;386 soclib::caba::DspinOutput< from_mc_flit_width>p_dspin_out;382 soclib::caba::DspinInput<33> p_dspin_in; 383 soclib::caba::DspinOutput<40> p_dspin_out; 387 384 388 385 VciMemCache( … … 690 687 sc_signal<size_t> r_cas_trt_index; // Transaction Table index 691 688 sc_signal<size_t> r_cas_upt_index; // Update Table index 689 sc_signal<data_t> * r_cas_data; // cache line data 692 690 693 691 // Buffer between CAS fsm and IXR_CMD fsm (XRAM write) -
branches/v5/modules/vci_mem_cache_dspin_coherence/caba/source/src/vci_mem_cache.cpp
r310 r313 196 196 "CAS_DIR_LOCK", 197 197 "CAS_DIR_HIT_READ", 198 "CAS_DIR_HIT_COMPARE", 198 199 "CAS_DIR_HIT_WRITE", 199 200 "CAS_UPT_LOCK", … … 267 268 268 269 #define tmpl(x) \ 269 template<typename vci_param , int from_mc_flit_width, int from_l1_flit_width> x \270 VciMemCache<vci_param , from_mc_flit_width, from_l1_flit_width>270 template<typename vci_param> x \ 271 VciMemCache<vci_param> 271 272 272 273 using soclib::common::uint32_log2; … … 468 469 r_write_data = new sc_signal<data_t>[nwords]; 469 470 r_write_be = new sc_signal<be_t>[nwords]; 470 r_write_to_cc_send_data = new sc_signal<data_t>[nwords];471 r_write_to_cc_send_be = new sc_signal<be_t>[nwords];471 r_write_to_cc_send_data = new sc_signal<data_t>[nwords]; 472 r_write_to_cc_send_be = new sc_signal<be_t>[nwords]; 472 473 r_write_to_ixr_cmd_data = new sc_signal<data_t>[nwords]; 473 474 474 475 // Allocation for CAS FSM 475 476 r_cas_to_ixr_cmd_data = new sc_signal<data_t>[nwords]; 477 r_cas_data = new sc_signal<data_t>[nwords]; 476 478 r_cas_rdata = new sc_signal<data_t>[2]; 477 479 … … 1104 1106 1105 1107 uint8_t updt_index = 1106 dspin_param::dspin_get(flit, dspin_param::MULTI_ACK_UPDT_INDEX);1108 DspinDhccpParam::dspin_get(flit, DspinDhccpParam::MULTI_ACK_UPDT_INDEX); 1107 1109 1108 1110 bool eop = 1109 ( dspin_param::dspin_get(flit, dspin_param::FROM_L1_EOP) == 0x1);1111 (DspinDhccpParam::dspin_get(flit, DspinDhccpParam::FROM_L1_EOP) == 0x1); 1110 1112 1111 1113 if(updt_index >= m_update_tab.size()) … … 3743 3745 3744 3746 uint32_t srcid = 3745 dspin_param::dspin_get(3747 DspinDhccpParam::dspin_get( 3746 3748 flit, 3747 dspin_param::CLEANUP_SRCID);3749 DspinDhccpParam::CLEANUP_SRCID); 3748 3750 3749 3751 uint8_t type = 3750 dspin_param::dspin_get(3752 DspinDhccpParam::dspin_get( 3751 3753 flit, 3752 dspin_param::FROM_L1_TYPE);3754 DspinDhccpParam::FROM_L1_TYPE); 3753 3755 3754 3756 r_cleanup_way_index = 3755 dspin_param::dspin_get(3757 DspinDhccpParam::dspin_get( 3756 3758 flit, 3757 dspin_param::CLEANUP_WAY_INDEX);3759 DspinDhccpParam::CLEANUP_WAY_INDEX); 3758 3760 3759 3761 r_cleanup_nline = 3760 dspin_param::dspin_get(3762 DspinDhccpParam::dspin_get( 3761 3763 flit, 3762 dspin_param::CLEANUP_NLINE_MSB)3764 DspinDhccpParam::CLEANUP_NLINE_MSB) 3763 3765 << 32; 3764 3766 3765 r_cleanup_inst = (type == dspin_param::TYPE_CLEANUP_INST);3767 r_cleanup_inst = (type == DspinDhccpParam::TYPE_CLEANUP_INST); 3766 3768 r_cleanup_srcid = srcid; 3767 3769 … … 3787 3789 << ".CLEANUP_IDLE> Cleanup request:" << std::hex 3788 3790 << " / owner_id = " << srcid 3789 << " / owner_ins = " << (type == dspin_param::TYPE_CLEANUP_INST)3791 << " / owner_ins = " << (type == DspinDhccpParam::TYPE_CLEANUP_INST) 3790 3792 << std::endl; 3791 3793 } … … 3803 3805 addr_t nline = 3804 3806 r_cleanup_nline.read() | 3805 dspin_param::dspin_get(flit, dspin_param::CLEANUP_NLINE_LSB);3807 DspinDhccpParam::dspin_get(flit, DspinDhccpParam::CLEANUP_NLINE_LSB); 3806 3808 3807 3809 bool eop = 3808 dspin_param::dspin_get(flit, dspin_param::FROM_L1_EOP) == 0x1;3810 DspinDhccpParam::dspin_get(flit, DspinDhccpParam::FROM_L1_EOP) == 0x1; 3809 3811 3810 3812 assert( … … 4661 4663 4662 4664 if(entry.valid) r_cas_fsm = CAS_DIR_HIT_READ; 4663 else r_cas_fsm = CAS_MISS_TRT_LOCK;4665 else r_cas_fsm = CAS_MISS_TRT_LOCK; 4664 4666 4665 4667 #if DEBUG_MEMC_CAS … … 4688 4690 ///////////////////// 4689 4691 case CAS_DIR_HIT_READ: // update directory for lock and dirty bit 4690 // and check data change in cache4692 // and check data change in cache 4691 4693 { 4692 4694 size_t way = r_cas_way.read(); 4693 4695 size_t set = m_y[(vci_addr_t)(m_cmd_cas_addr_fifo.read())]; 4694 size_t word = m_x[(vci_addr_t)(m_cmd_cas_addr_fifo.read())];4695 4696 4696 4697 // update directory (lock & dirty bits) … … 4700 4701 entry.dirty = true; 4701 4702 entry.lock = true; 4702 entry.tag = r_cas_tag.read();4703 entry.tag = r_cas_tag.read(); 4703 4704 entry.owner.srcid = r_cas_copy.read(); 4704 4705 #if L1_MULTI_CACHE … … 4711 4712 m_cache_directory.write(set, way, entry); 4712 4713 4713 // read data in cache & check data change 4714 bool ok = (r_cas_rdata[0].read() == m_cache_data.read(way, set, word)); 4715 if(r_cas_cpt.read() ==4) // 64 bits CAS 4716 ok &= (r_cas_rdata[1] == m_cache_data.read(way, set, word+1)); 4714 // Stored data from cache in buffer to do the comparison in next state 4715 m_cache_data.read_line(way, set, r_cas_data); 4716 4717 r_cas_fsm = CAS_DIR_HIT_COMPARE; 4718 4719 #if DEBUG_MEMC_CAS 4720 if(m_debug_cas_fsm) 4721 { 4722 std::cout 4723 << " <MEMC " << name() << ".CAS_DIR_HIT_READ> Read data from " 4724 << " cache and store it in buffer" 4725 << std::endl; 4726 } 4727 #endif 4728 break; 4729 } 4730 4731 case CAS_DIR_HIT_COMPARE: 4732 { 4733 size_t word = m_x[(vci_addr_t)(m_cmd_cas_addr_fifo.read())]; 4734 4735 // Read data in buffer & check data change 4736 bool ok = (r_cas_rdata[0].read() == r_cas_data[word].read()); 4737 4738 if(r_cas_cpt.read() == 4) // 64 bits CAS 4739 ok &= (r_cas_rdata[1] == r_cas_data[word+1]); 4717 4740 4718 4741 // to avoid livelock, force the atomic access to fail pseudo-randomly 4719 4742 bool forced_fail = ((r_cas_lfsr % (64) == 0) && RANDOMIZE_CAS); 4720 r_cas_lfsr = (r_cas_lfsr >> 1) ^((- (r_cas_lfsr & 1)) & 0xd0000001); 4721 4722 if(ok and not forced_fail) // no data change 4743 r_cas_lfsr = (r_cas_lfsr >> 1) ^ ((- (r_cas_lfsr & 1)) & 0xd0000001); 4744 4745 // cas success 4746 if(ok and not forced_fail) 4723 4747 { 4724 4748 r_cas_fsm = CAS_DIR_HIT_WRITE; 4725 4749 } 4726 else // return failure 4750 // cas failure 4751 else 4727 4752 { 4728 4753 r_cas_fsm = CAS_RSP_FAIL; … … 4732 4757 if(m_debug_cas_fsm) 4733 4758 { 4734 std::cout << " <MEMC " << name() << ".CAS_DIR_HIT_READ> Test if CAS success:" 4759 std::cout << " <MEMC " << name() << ".CAS_DIR_HIT_COMPARE> Compare the old" 4760 << " and the new data" 4735 4761 << " / expected value = " << r_cas_rdata[0].read() 4736 << " / actual value = " << m_cache_data.read(way, set, word)4737 << " / forced_fail = " << forced_fail << std::endl;4762 << " / actual value = " << r_cas_data[word].read() 4763 << " / forced_fail = " << forced_fail << std::endl; 4738 4764 } 4739 4765 #endif … … 4772 4798 // cache update 4773 4799 m_cache_data.write(way, set, word, r_cas_wdata.read()); 4774 if(r_cas_cpt.read() == 4)4800 if(r_cas_cpt.read() == 4) 4775 4801 m_cache_data.write(way, set, word+1, m_cmd_cas_wdata_fifo.read()); 4802 4803 r_cas_fsm = CAS_RSP_SUCCESS; 4776 4804 4777 4805 // monitor … … 4782 4810 snprintf(buf, 80, "CAS_DIR_HIT_WRITE srcid %d", m_cmd_cas_srcid_fifo.read()); 4783 4811 check_monitor(buf, address, r_cas_wdata.read()); 4784 if(r_cas_cpt.read() ==4) 4812 4813 if(r_cas_cpt.read() == 4) 4785 4814 check_monitor(buf, address+4, m_cmd_cas_wdata_fifo.read()); 4786 4815 } 4787 r_cas_fsm = CAS_RSP_SUCCESS;4788 4816 4789 4817 #if DEBUG_MEMC_CAS … … 4838 4866 m_cache_data.write(way, set, word+1, m_cmd_cas_wdata_fifo.read()); 4839 4867 4868 r_cas_upt_index = index; 4869 r_cas_fsm = CAS_UPT_HEAP_LOCK; 4870 4840 4871 // monitor 4841 4872 if(m_monitor_ok) … … 4845 4876 snprintf(buf, 80, "CAS_DIR_HIT_WRITE srcid %d", m_cmd_cas_srcid_fifo.read()); 4846 4877 check_monitor(buf, address, r_cas_wdata.read()); 4878 4847 4879 if(r_cas_cpt.read() ==4) 4848 4880 check_monitor(buf, address+4, m_cmd_cas_wdata_fifo.read()); 4849 4881 } 4850 4851 r_cas_upt_index = index;4852 r_cas_fsm = CAS_UPT_HEAP_LOCK;4853 4882 } 4854 4883 else // releases the locks protecting UPT and DIR UPT full … … 5006 5035 { 5007 5036 // fill the data buffer 5008 size_t way = r_cas_way.read();5009 size_t set = m_y[(vci_addr_t)(m_cmd_cas_addr_fifo.read())];5010 5037 size_t word = m_x[(vci_addr_t)(m_cmd_cas_addr_fifo.read())]; 5011 5038 for(size_t i = 0; i<m_words; i++) … … 5015 5042 r_cas_to_ixr_cmd_data[i] = r_cas_wdata.read(); 5016 5043 } 5017 else if((i == word+1) && (r_cas_cpt.read() == 4)) // 64 bit CAS5044 else if((i == word+1) && (r_cas_cpt.read() == 4)) // 64 bit CAS 5018 5045 { 5019 5046 r_cas_to_ixr_cmd_data[i] = m_cmd_cas_wdata_fifo.read(); … … 5021 5048 else 5022 5049 { 5023 r_cas_to_ixr_cmd_data[i] = m_cache_data.read(way, set, i);5050 r_cas_to_ixr_cmd_data[i] = r_cas_data[i].read(); 5024 5051 } 5025 5052 } … … 5910 5937 5911 5938 uint8_t type = 5912 dspin_param::dspin_get(5939 DspinDhccpParam::dspin_get( 5913 5940 p_dspin_in.data.read(), 5914 dspin_param::FROM_L1_TYPE);5915 5916 if(type == dspin_param::TYPE_CLEANUP)5941 DspinDhccpParam::FROM_L1_TYPE); 5942 5943 if(type == DspinDhccpParam::TYPE_CLEANUP) 5917 5944 { 5918 5945 r_cc_receive_fsm = CC_RECEIVE_CLEANUP; … … 5920 5947 } 5921 5948 5922 if(type == dspin_param::TYPE_MULTI_ACK)5949 if(type == DspinDhccpParam::TYPE_MULTI_ACK) 5923 5950 { 5924 5951 r_cc_receive_fsm = CC_RECEIVE_MULTI_ACK; … … 5940 5967 5941 5968 bool eop = ( 5942 dspin_param::dspin_get(5969 DspinDhccpParam::dspin_get( 5943 5970 p_dspin_in.data.read(), 5944 dspin_param::FROM_L1_EOP)5971 DspinDhccpParam::FROM_L1_EOP) 5945 5972 == 0x1); 5946 5973 … … 5960 5987 5961 5988 bool eop = ( 5962 dspin_param::dspin_get(5989 DspinDhccpParam::dspin_get( 5963 5990 p_dspin_in.data.read(), 5964 dspin_param::FROM_L1_EOP)5991 DspinDhccpParam::FROM_L1_EOP) 5965 5992 == 0x1); 5966 5993 … … 6400 6427 //////////////////// 6401 6428 case ALLOC_DIR_READ: 6402 if(((r_read_fsm.read() != READ_DIR_REQ) &&6403 (r_read_fsm.read() != READ_DIR_LOCK) &&6404 (r_read_fsm.read() != READ_TRT_LOCK) &&6405 (r_read_fsm.read() != READ_HEAP_REQ))6429 if(((r_read_fsm.read() != READ_DIR_REQ) && 6430 (r_read_fsm.read() != READ_DIR_LOCK) && 6431 (r_read_fsm.read() != READ_TRT_LOCK) && 6432 (r_read_fsm.read() != READ_HEAP_REQ)) 6406 6433 || 6407 6434 ((r_read_fsm.read() == READ_TRT_LOCK) && … … 6424 6451 ///////////////////// 6425 6452 case ALLOC_DIR_WRITE: 6426 if(((r_write_fsm.read() != WRITE_DIR_REQ) &&6427 (r_write_fsm.read() != WRITE_DIR_LOCK) &&6428 (r_write_fsm.read() != WRITE_DIR_READ) &&6429 (r_write_fsm.read() != WRITE_DIR_HIT) &&6430 (r_write_fsm.read() != WRITE_BC_TRT_LOCK) &&6431 (r_write_fsm.read() != WRITE_BC_UPT_LOCK) &&6432 (r_write_fsm.read() != WRITE_MISS_TRT_LOCK) &&6433 (r_write_fsm.read() != WRITE_UPT_LOCK) &&6434 (r_write_fsm.read() != WRITE_UPT_HEAP_LOCK))6453 if(((r_write_fsm.read() != WRITE_DIR_REQ) && 6454 (r_write_fsm.read() != WRITE_DIR_LOCK) && 6455 (r_write_fsm.read() != WRITE_DIR_READ) && 6456 (r_write_fsm.read() != WRITE_DIR_HIT) && 6457 (r_write_fsm.read() != WRITE_BC_TRT_LOCK) && 6458 (r_write_fsm.read() != WRITE_BC_UPT_LOCK) && 6459 (r_write_fsm.read() != WRITE_MISS_TRT_LOCK) && 6460 (r_write_fsm.read() != WRITE_UPT_LOCK) && 6461 (r_write_fsm.read() != WRITE_UPT_HEAP_LOCK)) 6435 6462 || 6436 6463 ((r_write_fsm.read() == WRITE_UPT_HEAP_LOCK) && … … 6456 6483 //////////////////// 6457 6484 case ALLOC_DIR_CAS: 6458 if(((r_cas_fsm.read() != CAS_DIR_REQ) && 6459 (r_cas_fsm.read() != CAS_DIR_LOCK) && 6460 (r_cas_fsm.read() != CAS_DIR_HIT_READ) && 6461 (r_cas_fsm.read() != CAS_DIR_HIT_WRITE) && 6462 (r_cas_fsm.read() != CAS_BC_TRT_LOCK) && 6463 (r_cas_fsm.read() != CAS_BC_UPT_LOCK) && 6464 (r_cas_fsm.read() != CAS_MISS_TRT_LOCK) && 6465 (r_cas_fsm.read() != CAS_UPT_LOCK) && 6466 (r_cas_fsm.read() != CAS_UPT_HEAP_LOCK)) 6485 if(((r_cas_fsm.read() != CAS_DIR_REQ) && 6486 (r_cas_fsm.read() != CAS_DIR_LOCK) && 6487 (r_cas_fsm.read() != CAS_DIR_HIT_READ) && 6488 (r_cas_fsm.read() != CAS_DIR_HIT_COMPARE) && 6489 (r_cas_fsm.read() != CAS_DIR_HIT_WRITE) && 6490 (r_cas_fsm.read() != CAS_BC_TRT_LOCK) && 6491 (r_cas_fsm.read() != CAS_BC_UPT_LOCK) && 6492 (r_cas_fsm.read() != CAS_MISS_TRT_LOCK) && 6493 (r_cas_fsm.read() != CAS_UPT_LOCK) && 6494 (r_cas_fsm.read() != CAS_UPT_HEAP_LOCK)) 6467 6495 || 6468 6496 ((r_cas_fsm.read() == CAS_UPT_HEAP_LOCK) && … … 7297 7325 uint64_t flit = 0; 7298 7326 7299 dspin_param::dspin_set(7327 DspinDhccpParam::dspin_set( 7300 7328 flit, 7301 7329 1ULL, 7302 dspin_param::FROM_MC_EOP);7303 7304 dspin_param::dspin_set(7330 DspinDhccpParam::FROM_MC_EOP); 7331 7332 DspinDhccpParam::dspin_set( 7305 7333 flit, 7306 7334 r_cleanup_to_cc_send_srcid.read(), 7307 dspin_param::CLEANUP_ACK_DEST);7308 7309 dspin_param::dspin_set(7335 DspinDhccpParam::CLEANUP_ACK_DEST); 7336 7337 DspinDhccpParam::dspin_set( 7310 7338 flit, 7311 7339 r_cleanup_to_cc_send_set_index.read(), 7312 dspin_param::CLEANUP_ACK_SET);7313 7314 dspin_param::dspin_set(7340 DspinDhccpParam::CLEANUP_ACK_SET); 7341 7342 DspinDhccpParam::dspin_set( 7315 7343 flit, 7316 7344 r_cleanup_to_cc_send_way_index.read(), 7317 dspin_param::CLEANUP_ACK_WAY);7318 7319 dspin_param::dspin_set(7345 DspinDhccpParam::CLEANUP_ACK_WAY); 7346 7347 DspinDhccpParam::dspin_set( 7320 7348 flit, 7321 dspin_param::TYPE_CLEANUP_ACK,7322 dspin_param::FROM_MC_TYPE);7349 DspinDhccpParam::TYPE_CLEANUP_ACK, 7350 DspinDhccpParam::FROM_MC_TYPE); 7323 7351 7324 7352 p_dspin_out.write = true; … … 7333 7361 if(m_xram_rsp_to_cc_send_inst_fifo.read()) 7334 7362 { 7335 multi_inval_type = dspin_param::TYPE_MULTI_INVAL_INST;7363 multi_inval_type = DspinDhccpParam::TYPE_MULTI_INVAL_INST; 7336 7364 } 7337 7365 else 7338 7366 { 7339 multi_inval_type = dspin_param::TYPE_MULTI_INVAL_DATA;7367 multi_inval_type = DspinDhccpParam::TYPE_MULTI_INVAL_DATA; 7340 7368 } 7341 7369 7342 7370 uint64_t flit = 0; 7343 7371 7344 dspin_param::dspin_set(7372 DspinDhccpParam::dspin_set( 7345 7373 flit, 7346 7374 m_xram_rsp_to_cc_send_srcid_fifo.read(), 7347 dspin_param::MULTI_INVAL_DEST);7348 7349 dspin_param::dspin_set(7375 DspinDhccpParam::MULTI_INVAL_DEST); 7376 7377 DspinDhccpParam::dspin_set( 7350 7378 flit, 7351 7379 m_srcid_ini, 7352 dspin_param::MULTI_INVAL_SRCID);7353 7354 dspin_param::dspin_set(7380 DspinDhccpParam::MULTI_INVAL_SRCID); 7381 7382 DspinDhccpParam::dspin_set( 7355 7383 flit, 7356 7384 r_xram_rsp_to_cc_send_trdid.read(), 7357 dspin_param::MULTI_INVAL_UPDT_INDEX);7358 7359 dspin_param::dspin_set(7385 DspinDhccpParam::MULTI_INVAL_UPDT_INDEX); 7386 7387 DspinDhccpParam::dspin_set( 7360 7388 flit, 7361 7389 multi_inval_type, 7362 dspin_param::FROM_MC_TYPE);7390 DspinDhccpParam::FROM_MC_TYPE); 7363 7391 7364 7392 p_dspin_out.write = true; … … 7372 7400 uint64_t flit = 0; 7373 7401 7374 dspin_param::dspin_set(7402 DspinDhccpParam::dspin_set( 7375 7403 flit, 7376 7404 1ULL, 7377 dspin_param::FROM_MC_EOP);7378 7379 dspin_param::dspin_set(7405 DspinDhccpParam::FROM_MC_EOP); 7406 7407 DspinDhccpParam::dspin_set( 7380 7408 flit, 7381 7409 r_xram_rsp_to_cc_send_nline.read(), 7382 dspin_param::MULTI_INVAL_NLINE);7410 DspinDhccpParam::MULTI_INVAL_NLINE); 7383 7411 7384 7412 … … 7395 7423 uint64_t flit = 0; 7396 7424 7397 dspin_param::dspin_set(7425 DspinDhccpParam::dspin_set( 7398 7426 flit, 7399 7427 m_broadcast_address, 7400 dspin_param::BROADCAST_BOX);7401 7402 dspin_param::dspin_set(7428 DspinDhccpParam::BROADCAST_BOX); 7429 7430 DspinDhccpParam::dspin_set( 7403 7431 flit, 7404 7432 m_srcid_ini, 7405 dspin_param::BROADCAST_SRCID);7406 7407 dspin_param::dspin_set(7433 DspinDhccpParam::BROADCAST_SRCID); 7434 7435 DspinDhccpParam::dspin_set( 7408 7436 flit, 7409 7437 1ULL, 7410 dspin_param::FROM_MC_BC);7438 DspinDhccpParam::FROM_MC_BC); 7411 7439 7412 7440 p_dspin_out.write = true; … … 7420 7448 uint64_t flit = 0; 7421 7449 7422 dspin_param::dspin_set(7450 DspinDhccpParam::dspin_set( 7423 7451 flit, 7424 7452 1ULL, 7425 dspin_param::FROM_MC_EOP); 7426 7427 dspin_param::dspin_set( 7428 flit, 7429 r_xram_rsp_to_cc_send_trdid.read(), 7430 dspin_param::BROADCAST_UPDT_INDEX); 7431 7432 dspin_param::dspin_set( 7453 DspinDhccpParam::FROM_MC_EOP); 7454 7455 DspinDhccpParam::dspin_set( 7433 7456 flit, 7434 7457 r_xram_rsp_to_cc_send_nline.read(), 7435 dspin_param::BROADCAST_NLINE);7458 DspinDhccpParam::BROADCAST_NLINE); 7436 7459 7437 7460 p_dspin_out.write = true; … … 7445 7468 uint64_t flit = 0; 7446 7469 7447 dspin_param::dspin_set(7470 DspinDhccpParam::dspin_set( 7448 7471 flit, 7449 7472 1ULL, 7450 dspin_param::FROM_MC_EOP); 7451 7452 dspin_param::dspin_set( 7473 DspinDhccpParam::FROM_MC_EOP); 7474 7475 DspinDhccpParam::dspin_set( 7476 flit, 7477 r_write_to_cc_send_nline.read(), 7478 DspinDhccpParam::BROADCAST_NLINE); 7479 7480 p_dspin_out.write = true; 7481 p_dspin_out.data = flit; 7482 7483 break; 7484 } 7485 7486 case CC_SEND_CAS_BRDCAST_NLINE: 7487 { 7488 uint64_t flit = 0; 7489 7490 DspinDhccpParam::dspin_set( 7491 flit, 7492 1ULL, 7493 DspinDhccpParam::FROM_MC_EOP); 7494 7495 DspinDhccpParam::dspin_set( 7496 flit, 7497 r_cas_to_cc_send_nline.read(), 7498 DspinDhccpParam::BROADCAST_NLINE); 7499 7500 p_dspin_out.write = true; 7501 p_dspin_out.data = flit; 7502 7503 break; 7504 } 7505 7506 case CC_SEND_WRITE_UPDT_HEADER: 7507 { 7508 uint8_t multi_updt_type; 7509 if(m_write_to_cc_send_inst_fifo.read()) 7510 { 7511 multi_updt_type = DspinDhccpParam::TYPE_MULTI_UPDT_INST; 7512 } 7513 else 7514 { 7515 multi_updt_type = DspinDhccpParam::TYPE_MULTI_UPDT_DATA; 7516 } 7517 7518 uint64_t flit = 0; 7519 7520 DspinDhccpParam::dspin_set( 7521 flit, 7522 m_write_to_cc_send_srcid_fifo.read(), 7523 DspinDhccpParam::MULTI_UPDT_DEST); 7524 7525 DspinDhccpParam::dspin_set( 7526 flit, 7527 m_srcid_ini, 7528 DspinDhccpParam::MULTI_UPDT_SRCID); 7529 7530 DspinDhccpParam::dspin_set( 7453 7531 flit, 7454 7532 r_write_to_cc_send_trdid.read(), 7455 dspin_param::BROADCAST_UPDT_INDEX); 7456 7457 dspin_param::dspin_set( 7533 DspinDhccpParam::MULTI_UPDT_UPDT_INDEX); 7534 7535 DspinDhccpParam::dspin_set( 7536 flit, 7537 multi_updt_type, 7538 DspinDhccpParam::FROM_MC_TYPE); 7539 7540 p_dspin_out.write = true; 7541 p_dspin_out.data = flit; 7542 7543 break; 7544 } 7545 7546 case CC_SEND_WRITE_UPDT_NLINE: 7547 { 7548 uint64_t flit = 0; 7549 7550 DspinDhccpParam::dspin_set( 7551 flit, 7552 r_write_to_cc_send_index.read(), 7553 DspinDhccpParam::MULTI_UPDT_WORD_INDEX); 7554 7555 DspinDhccpParam::dspin_set( 7458 7556 flit, 7459 7557 r_write_to_cc_send_nline.read(), 7460 dspin_param::BROADCAST_NLINE); 7461 7462 p_dspin_out.write = true; 7463 p_dspin_out.data = flit; 7464 7465 break; 7466 } 7467 7468 case CC_SEND_CAS_BRDCAST_NLINE: 7469 { 7470 uint64_t flit = 0; 7471 7472 dspin_param::dspin_set( 7473 flit, 7474 1ULL, 7475 dspin_param::FROM_MC_EOP); 7476 7477 dspin_param::dspin_set( 7478 flit, 7479 r_cas_to_cc_send_trdid.read(), 7480 dspin_param::BROADCAST_UPDT_INDEX); 7481 7482 dspin_param::dspin_set( 7483 flit, 7484 r_cas_to_cc_send_nline.read(), 7485 dspin_param::BROADCAST_NLINE); 7486 7487 p_dspin_out.write = true; 7488 p_dspin_out.data = flit; 7489 7490 break; 7491 } 7492 7493 case CC_SEND_WRITE_UPDT_HEADER: 7494 { 7495 uint8_t multi_updt_type; 7496 if(m_write_to_cc_send_inst_fifo.read()) 7497 { 7498 multi_updt_type = dspin_param::TYPE_MULTI_UPDT_INST; 7499 } 7500 else 7501 { 7502 multi_updt_type = dspin_param::TYPE_MULTI_UPDT_DATA; 7503 } 7504 7505 uint64_t flit = 0; 7506 7507 dspin_param::dspin_set( 7508 flit, 7509 m_write_to_cc_send_srcid_fifo.read(), 7510 dspin_param::MULTI_UPDT_DEST); 7511 7512 dspin_param::dspin_set( 7513 flit, 7514 m_srcid_ini, 7515 dspin_param::MULTI_UPDT_SRCID); 7516 7517 dspin_param::dspin_set( 7518 flit, 7519 r_write_to_cc_send_trdid.read(), 7520 dspin_param::MULTI_UPDT_UPDT_INDEX); 7521 7522 dspin_param::dspin_set( 7523 flit, 7524 multi_updt_type, 7525 dspin_param::FROM_MC_TYPE); 7526 7527 p_dspin_out.write = true; 7528 p_dspin_out.data = flit; 7529 7530 break; 7531 } 7532 7533 case CC_SEND_WRITE_UPDT_NLINE: 7534 { 7535 uint64_t flit = 0; 7536 7537 dspin_param::dspin_set( 7538 flit, 7539 r_write_to_cc_send_index.read(), 7540 dspin_param::MULTI_UPDT_WORD_INDEX); 7541 7542 dspin_param::dspin_set( 7543 flit, 7544 r_write_to_cc_send_nline.read(), 7545 dspin_param::MULTI_UPDT_NLINE); 7558 DspinDhccpParam::MULTI_UPDT_NLINE); 7546 7559 7547 7560 p_dspin_out.write = true; … … 7572 7585 uint64_t flit = 0; 7573 7586 7574 dspin_param::dspin_set(7587 DspinDhccpParam::dspin_set( 7575 7588 flit, 7576 7589 (uint64_t)multi_updt_eop, 7577 dspin_param::FROM_MC_EOP);7578 7579 dspin_param::dspin_set(7590 DspinDhccpParam::FROM_MC_EOP); 7591 7592 DspinDhccpParam::dspin_set( 7580 7593 flit, 7581 7594 multi_updt_be, 7582 dspin_param::MULTI_UPDT_BE);7583 7584 dspin_param::dspin_set(7595 DspinDhccpParam::MULTI_UPDT_BE); 7596 7597 DspinDhccpParam::dspin_set( 7585 7598 flit, 7586 7599 multi_updt_data, 7587 dspin_param::MULTI_UPDT_DATA);7600 DspinDhccpParam::MULTI_UPDT_DATA); 7588 7601 7589 7602 p_dspin_out.write = true; … … 7598 7611 if(m_cas_to_cc_send_inst_fifo.read()) 7599 7612 { 7600 multi_updt_type = dspin_param::TYPE_MULTI_UPDT_INST;7613 multi_updt_type = DspinDhccpParam::TYPE_MULTI_UPDT_INST; 7601 7614 } 7602 7615 else 7603 7616 { 7604 multi_updt_type = dspin_param::TYPE_MULTI_UPDT_DATA;7617 multi_updt_type = DspinDhccpParam::TYPE_MULTI_UPDT_DATA; 7605 7618 } 7606 7619 7607 7620 uint64_t flit = 0; 7608 7621 7609 dspin_param::dspin_set(7622 DspinDhccpParam::dspin_set( 7610 7623 flit, 7611 7624 m_cas_to_cc_send_srcid_fifo.read(), 7612 dspin_param::MULTI_UPDT_DEST);7613 7614 dspin_param::dspin_set(7625 DspinDhccpParam::MULTI_UPDT_DEST); 7626 7627 DspinDhccpParam::dspin_set( 7615 7628 flit, 7616 7629 m_srcid_ini, 7617 dspin_param::MULTI_UPDT_SRCID);7618 7619 dspin_param::dspin_set(7630 DspinDhccpParam::MULTI_UPDT_SRCID); 7631 7632 DspinDhccpParam::dspin_set( 7620 7633 flit, 7621 7634 r_cas_to_cc_send_trdid.read(), 7622 dspin_param::MULTI_UPDT_UPDT_INDEX);7623 7624 dspin_param::dspin_set(7635 DspinDhccpParam::MULTI_UPDT_UPDT_INDEX); 7636 7637 DspinDhccpParam::dspin_set( 7625 7638 flit, 7626 7639 multi_updt_type, 7627 dspin_param::FROM_MC_TYPE);7640 DspinDhccpParam::FROM_MC_TYPE); 7628 7641 7629 7642 p_dspin_out.write = true; … … 7637 7650 uint64_t flit = 0; 7638 7651 7639 dspin_param::dspin_set(7652 DspinDhccpParam::dspin_set( 7640 7653 flit, 7641 7654 r_cas_to_cc_send_index.read(), 7642 dspin_param::MULTI_UPDT_WORD_INDEX);7643 7644 dspin_param::dspin_set(7655 DspinDhccpParam::MULTI_UPDT_WORD_INDEX); 7656 7657 DspinDhccpParam::dspin_set( 7645 7658 flit, 7646 7659 r_cas_to_cc_send_nline.read(), 7647 dspin_param::MULTI_UPDT_NLINE);7660 DspinDhccpParam::MULTI_UPDT_NLINE); 7648 7661 7649 7662 p_dspin_out.write = true; … … 7667 7680 uint64_t flit = 0; 7668 7681 7669 dspin_param::dspin_set(7682 DspinDhccpParam::dspin_set( 7670 7683 flit, 7671 7684 (uint64_t)multi_updt_eop, 7672 dspin_param::FROM_MC_EOP);7673 7674 dspin_param::dspin_set(7685 DspinDhccpParam::FROM_MC_EOP); 7686 7687 DspinDhccpParam::dspin_set( 7675 7688 flit, 7676 7689 0xF, 7677 dspin_param::MULTI_UPDT_BE);7678 7679 dspin_param::dspin_set(7690 DspinDhccpParam::MULTI_UPDT_BE); 7691 7692 DspinDhccpParam::dspin_set( 7680 7693 flit, 7681 7694 r_cas_to_cc_send_wdata.read(), 7682 dspin_param::MULTI_UPDT_DATA);7695 DspinDhccpParam::MULTI_UPDT_DATA); 7683 7696 7684 7697 p_dspin_out.write = true; … … 7692 7705 uint64_t flit = 0; 7693 7706 7694 dspin_param::dspin_set(7707 DspinDhccpParam::dspin_set( 7695 7708 flit, 7696 7709 1ULL, 7697 dspin_param::FROM_MC_EOP);7698 7699 dspin_param::dspin_set(7710 DspinDhccpParam::FROM_MC_EOP); 7711 7712 DspinDhccpParam::dspin_set( 7700 7713 flit, 7701 7714 0xF, 7702 dspin_param::MULTI_UPDT_BE);7703 7704 dspin_param::dspin_set(7715 DspinDhccpParam::MULTI_UPDT_BE); 7716 7717 DspinDhccpParam::dspin_set( 7705 7718 flit, 7706 7719 r_cas_to_cc_send_wdata_high.read(), 7707 dspin_param::MULTI_UPDT_DATA);7720 DspinDhccpParam::MULTI_UPDT_DATA); 7708 7721 7709 7722 p_dspin_out.write = true;
Note: See TracChangeset
for help on using the changeset viewer.