Changeset 453 for branches/ODCCP/modules/vci_cc_vcache_wrapper/caba
- Timestamp:
- Jul 19, 2013, 9:50:00 AM (11 years ago)
- Location:
- branches/ODCCP/modules/vci_cc_vcache_wrapper/caba
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/ODCCP/modules/vci_cc_vcache_wrapper/caba/metadata/vci_cc_vcache_wrapper.sd
r452 r453 32 32 parameter.Reference('addr_size')) 33 33 ), 34 Uses('caba:dspin_ dhccp_param'),34 Uses('caba:dspin_odccp_param'), 35 35 ], 36 36 -
branches/ODCCP/modules/vci_cc_vcache_wrapper/caba/source/include/vci_cc_vcache_wrapper.h
r452 r453 42 42 #include "vci_initiator.h" 43 43 #include "dspin_interface.h" 44 #include "dspin_ dhccp_param.h"44 #include "dspin_odccp_param.h" 45 45 #include "mapping_table.h" 46 46 #include "static_assert.h" -
branches/ODCCP/modules/vci_cc_vcache_wrapper/caba/source/src/vci_cc_vcache_wrapper.cpp
r452 r453 5992 5992 uint64_t receive_data = p_dspin_in.data.read(); 5993 5993 // initialize coherence packet type 5994 uint64_t receive_type = Dspin DhccpParam::dspin_get(receive_data,5995 Dspin DhccpParam::FROM_MC_TYPE);5994 uint64_t receive_type = DspinOdccpParam::dspin_get(receive_data, 5995 DspinOdccpParam::FROM_MC_TYPE); 5996 5996 // initialize data/ins flip_flop (0 data / 1 ins) 5997 5997 r_cc_receive_data_ins = (bool)(receive_type & 0x1); 5998 5998 // test for a broadcast 5999 if (Dspin DhccpParam::dspin_get(receive_data,DspinDhccpParam::FROM_MC_BC))5999 if (DspinOdccpParam::dspin_get(receive_data,DspinOdccpParam::FROM_MC_BC)) 6000 6000 { 6001 6001 r_cc_receive_fsm = CC_RECEIVE_BRDCAST_HEADER; 6002 6002 } 6003 6003 // test for a CLACK 6004 else if ((receive_type == Dspin DhccpParam::TYPE_CLEANUP_ACK_DATA) or6005 (receive_type == Dspin DhccpParam::TYPE_CLEANUP_ACK_INST))6004 else if ((receive_type == DspinOdccpParam::TYPE_CLEANUP_ACK_DATA) or 6005 (receive_type == DspinOdccpParam::TYPE_CLEANUP_ACK_INST)) 6006 6006 { 6007 6007 r_cc_receive_fsm = CC_RECEIVE_CLACK; 6008 6008 } 6009 6009 // test for a multi updt 6010 else if ((receive_type == Dspin DhccpParam::TYPE_MULTI_UPDT_DATA) or6011 (receive_type == Dspin DhccpParam::TYPE_MULTI_UPDT_INST))6010 else if ((receive_type == DspinOdccpParam::TYPE_MULTI_UPDT_DATA) or 6011 (receive_type == DspinOdccpParam::TYPE_MULTI_UPDT_INST)) 6012 6012 { 6013 6013 r_cc_receive_fsm = CC_RECEIVE_UPDT_HEADER; … … 6033 6033 // request dcache to handle the CLACK 6034 6034 r_cc_receive_dcache_req = true; 6035 r_cc_receive_dcache_set = Dspin DhccpParam::dspin_get(receive_data,6036 Dspin DhccpParam::CLEANUP_ACK_SET) &6035 r_cc_receive_dcache_set = DspinOdccpParam::dspin_get(receive_data, 6036 DspinOdccpParam::CLEANUP_ACK_SET) & 6037 6037 ((1ULL<<(uint32_log2(m_dcache_sets)))-1); 6038 r_cc_receive_dcache_way = Dspin DhccpParam::dspin_get(receive_data,6039 Dspin DhccpParam::CLEANUP_ACK_WAY) &6038 r_cc_receive_dcache_way = DspinOdccpParam::dspin_get(receive_data, 6039 DspinOdccpParam::CLEANUP_ACK_WAY) & 6040 6040 ((1ULL<<(uint32_log2(m_dcache_ways)))-1); 6041 6041 r_cc_receive_dcache_type = CC_TYPE_CLACK; … … 6050 6050 // request icache to handle the CLACK 6051 6051 r_cc_receive_icache_req = true; 6052 r_cc_receive_icache_set = Dspin DhccpParam::dspin_get(receive_data,6053 Dspin DhccpParam::CLEANUP_ACK_SET) &6052 r_cc_receive_icache_set = DspinOdccpParam::dspin_get(receive_data, 6053 DspinOdccpParam::CLEANUP_ACK_SET) & 6054 6054 ((1ULL<<(uint32_log2(m_icache_sets)))-1); 6055 r_cc_receive_icache_way = Dspin DhccpParam::dspin_get(receive_data,6056 Dspin DhccpParam::CLEANUP_ACK_WAY) &6055 r_cc_receive_icache_way = DspinOdccpParam::dspin_get(receive_data, 6056 DspinOdccpParam::CLEANUP_ACK_WAY) & 6057 6057 ((1ULL<<(uint32_log2(m_icache_ways)))-1); 6058 6058 r_cc_receive_icache_type = CC_TYPE_CLACK; … … 6086 6086 // request dcache to handle the BROADCAST 6087 6087 r_cc_receive_dcache_req = true; 6088 r_cc_receive_dcache_nline = Dspin DhccpParam::dspin_get(receive_data,6089 Dspin DhccpParam::BROADCAST_NLINE);6088 r_cc_receive_dcache_nline = DspinOdccpParam::dspin_get(receive_data, 6089 DspinOdccpParam::BROADCAST_NLINE); 6090 6090 r_cc_receive_dcache_type = CC_TYPE_BRDCAST; 6091 6091 // request icache to handle the BROADCAST 6092 6092 r_cc_receive_icache_req = true; 6093 r_cc_receive_icache_nline = Dspin DhccpParam::dspin_get(receive_data,6094 Dspin DhccpParam::BROADCAST_NLINE);6093 r_cc_receive_icache_nline = DspinOdccpParam::dspin_get(receive_data, 6094 DspinOdccpParam::BROADCAST_NLINE); 6095 6095 r_cc_receive_icache_type = CC_TYPE_BRDCAST; 6096 6096 // get back to idle state … … 6110 6110 not (r_cc_receive_dcache_req.read())) 6111 6111 { 6112 r_cc_receive_dcache_updt_tab_idx = Dspin DhccpParam::dspin_get(receive_data,6113 Dspin DhccpParam::MULTI_INVAL_UPDT_INDEX);6112 r_cc_receive_dcache_updt_tab_idx = DspinOdccpParam::dspin_get(receive_data, 6113 DspinOdccpParam::MULTI_INVAL_UPDT_INDEX); 6114 6114 r_cc_receive_fsm = CC_RECEIVE_INVAL_NLINE; 6115 6115 break; … … 6119 6119 not (r_cc_receive_icache_req.read())) 6120 6120 { 6121 r_cc_receive_icache_updt_tab_idx = Dspin DhccpParam::dspin_get(receive_data,6122 Dspin DhccpParam::MULTI_INVAL_UPDT_INDEX);6121 r_cc_receive_icache_updt_tab_idx = DspinOdccpParam::dspin_get(receive_data, 6122 DspinOdccpParam::MULTI_INVAL_UPDT_INDEX); 6123 6123 r_cc_receive_fsm = CC_RECEIVE_INVAL_NLINE; 6124 6124 break; … … 6139 6139 // request dcache to handle the INVAL 6140 6140 r_cc_receive_dcache_req = true; 6141 r_cc_receive_dcache_nline = Dspin DhccpParam::dspin_get(receive_data,DspinDhccpParam::MULTI_INVAL_NLINE);6141 r_cc_receive_dcache_nline = DspinOdccpParam::dspin_get(receive_data,DspinOdccpParam::MULTI_INVAL_NLINE); 6142 6142 r_cc_receive_dcache_type = CC_TYPE_INVAL; 6143 6143 // get back to idle state … … 6150 6150 // request icache to handle the INVAL 6151 6151 r_cc_receive_icache_req = true; 6152 r_cc_receive_icache_nline = Dspin DhccpParam::dspin_get(receive_data,DspinDhccpParam::MULTI_INVAL_NLINE);6152 r_cc_receive_icache_nline = DspinOdccpParam::dspin_get(receive_data,DspinOdccpParam::MULTI_INVAL_NLINE); 6153 6153 r_cc_receive_icache_type = CC_TYPE_INVAL; 6154 6154 // get back to idle state … … 6168 6168 if ((r_cc_receive_data_ins.read() == 0) and not r_cc_receive_dcache_req.read() and r_cc_receive_updt_fifo_be.empty()) 6169 6169 { 6170 r_cc_receive_dcache_updt_tab_idx = Dspin DhccpParam::dspin_get(receive_data,DspinDhccpParam::MULTI_UPDT_UPDT_INDEX);6170 r_cc_receive_dcache_updt_tab_idx = DspinOdccpParam::dspin_get(receive_data,DspinOdccpParam::MULTI_UPDT_UPDT_INDEX); 6171 6171 r_cc_receive_fsm = CC_RECEIVE_UPDT_NLINE; 6172 6172 break; … … 6176 6176 if ((r_cc_receive_data_ins.read() == 1) and not r_cc_receive_icache_req.read() and r_cc_receive_updt_fifo_be.empty()) 6177 6177 { 6178 r_cc_receive_icache_updt_tab_idx = Dspin DhccpParam::dspin_get(receive_data,DspinDhccpParam::MULTI_UPDT_UPDT_INDEX);6178 r_cc_receive_icache_updt_tab_idx = DspinOdccpParam::dspin_get(receive_data,DspinOdccpParam::MULTI_UPDT_UPDT_INDEX); 6179 6179 r_cc_receive_fsm = CC_RECEIVE_UPDT_NLINE; 6180 6180 break; … … 6195 6195 (p_dspin_in.write.read()) ) 6196 6196 { 6197 r_cc_receive_dcache_nline = Dspin DhccpParam::dspin_get(receive_data,DspinDhccpParam::MULTI_UPDT_NLINE);6198 r_cc_receive_word_idx = Dspin DhccpParam::dspin_get(receive_data,DspinDhccpParam::MULTI_UPDT_WORD_INDEX);6197 r_cc_receive_dcache_nline = DspinOdccpParam::dspin_get(receive_data,DspinOdccpParam::MULTI_UPDT_NLINE); 6198 r_cc_receive_word_idx = DspinOdccpParam::dspin_get(receive_data,DspinOdccpParam::MULTI_UPDT_WORD_INDEX); 6199 6199 r_cc_receive_dcache_type = CC_TYPE_UPDT; 6200 6200 // get back to idle state … … 6209 6209 (p_dspin_in.write.read())) 6210 6210 { 6211 r_cc_receive_icache_nline = Dspin DhccpParam::dspin_get(receive_data,DspinDhccpParam::MULTI_UPDT_NLINE);6212 r_cc_receive_word_idx = Dspin DhccpParam::dspin_get(receive_data,DspinDhccpParam::MULTI_UPDT_WORD_INDEX);6211 r_cc_receive_icache_nline = DspinOdccpParam::dspin_get(receive_data,DspinOdccpParam::MULTI_UPDT_NLINE); 6212 r_cc_receive_word_idx = DspinOdccpParam::dspin_get(receive_data,DspinOdccpParam::MULTI_UPDT_WORD_INDEX); 6213 6213 r_cc_receive_icache_type = CC_TYPE_UPDT; 6214 6214 // get back to idle state … … 6233 6233 uint64_t receive_data = p_dspin_in.data.read(); 6234 6234 bool receive_eop = p_dspin_in.eop.read(); 6235 cc_receive_updt_fifo_be = Dspin DhccpParam::dspin_get(receive_data,DspinDhccpParam::MULTI_UPDT_BE);6236 cc_receive_updt_fifo_data = Dspin DhccpParam::dspin_get(receive_data,DspinDhccpParam::MULTI_UPDT_DATA);6235 cc_receive_updt_fifo_be = DspinOdccpParam::dspin_get(receive_data,DspinOdccpParam::MULTI_UPDT_BE); 6236 cc_receive_updt_fifo_data = DspinOdccpParam::dspin_get(receive_data,DspinOdccpParam::MULTI_UPDT_DATA); 6237 6237 cc_receive_updt_fifo_eop = receive_eop; 6238 6238 cc_receive_updt_fifo_put = true; … … 6454 6454 { 6455 6455 // initialize dspin send data 6456 Dspin DhccpParam::dspin_set(dspin_send_data,6456 DspinOdccpParam::dspin_set(dspin_send_data, 6457 6457 m_cc_global_id, 6458 Dspin DhccpParam::CLEANUP_SRCID);6459 Dspin DhccpParam::dspin_set(dspin_send_data,6458 DspinOdccpParam::CLEANUP_SRCID); 6459 DspinOdccpParam::dspin_set(dspin_send_data, 6460 6460 0, 6461 Dspin DhccpParam::FROM_L1_BC);6461 DspinOdccpParam::FROM_L1_BC); 6462 6462 6463 6463 if(r_cc_send_last_client.read() == 0) // dcache active request … … 6465 6465 uint64_t dest = (uint64_t) r_dcache_cc_send_nline.read() 6466 6466 >> (m_nline_width - m_x_width - m_y_width) 6467 << (Dspin DhccpParam::GLOBALID_WIDTH - m_x_width - m_y_width);6468 Dspin DhccpParam::dspin_set(dspin_send_data,6467 << (DspinOdccpParam::GLOBALID_WIDTH - m_x_width - m_y_width); 6468 DspinOdccpParam::dspin_set(dspin_send_data, 6469 6469 dest, 6470 Dspin DhccpParam::CLEANUP_DEST);6471 6472 Dspin DhccpParam::dspin_set(dspin_send_data,6470 DspinOdccpParam::CLEANUP_DEST); 6471 6472 DspinOdccpParam::dspin_set(dspin_send_data, 6473 6473 (r_dcache_cc_send_nline.read() & 0x300000000ULL)>>32, 6474 Dspin DhccpParam::CLEANUP_NLINE_MSB);6475 6476 Dspin DhccpParam::dspin_set(dspin_send_data,6474 DspinOdccpParam::CLEANUP_NLINE_MSB); 6475 6476 DspinOdccpParam::dspin_set(dspin_send_data, 6477 6477 r_dcache_cc_send_way.read(), 6478 Dspin DhccpParam::CLEANUP_WAY_INDEX);6479 6480 Dspin DhccpParam::dspin_set(dspin_send_data,6481 Dspin DhccpParam::TYPE_CLEANUP_DATA,6482 Dspin DhccpParam::FROM_L1_TYPE);6478 DspinOdccpParam::CLEANUP_WAY_INDEX); 6479 6480 DspinOdccpParam::dspin_set(dspin_send_data, 6481 DspinOdccpParam::TYPE_CLEANUP_DATA, 6482 DspinOdccpParam::FROM_L1_TYPE); 6483 6483 /*ODCCP*/ // If cleanup on NCC line we set the CLEANUP_NCC bit in cleanup flit 6484 6484 if (r_dcache_cleanup_ncc.read()) 6485 6485 { 6486 Dspin DhccpParam::dspin_set(dspin_send_data,6486 DspinOdccpParam::dspin_set(dspin_send_data, 6487 6487 1, 6488 Dspin DhccpParam::CLEANUP_NCC);6488 DspinOdccpParam::CLEANUP_NCC); 6489 6489 } 6490 6490 else 6491 6491 { 6492 Dspin DhccpParam::dspin_set(dspin_send_data,6492 DspinOdccpParam::dspin_set(dspin_send_data, 6493 6493 0, 6494 Dspin DhccpParam::CLEANUP_NCC);6494 DspinOdccpParam::CLEANUP_NCC); 6495 6495 } 6496 6496 … … 6500 6500 uint64_t dest = (uint64_t) r_icache_cc_send_nline.read() 6501 6501 >> (m_nline_width - m_x_width - m_y_width) 6502 << (Dspin DhccpParam::GLOBALID_WIDTH - m_x_width - m_y_width);6503 6504 Dspin DhccpParam::dspin_set(dspin_send_data,6502 << (DspinOdccpParam::GLOBALID_WIDTH - m_x_width - m_y_width); 6503 6504 DspinOdccpParam::dspin_set(dspin_send_data, 6505 6505 dest, 6506 Dspin DhccpParam::CLEANUP_DEST);6507 6508 Dspin DhccpParam::dspin_set(dspin_send_data,6506 DspinOdccpParam::CLEANUP_DEST); 6507 6508 DspinOdccpParam::dspin_set(dspin_send_data, 6509 6509 (r_icache_cc_send_nline.read() & 0x300000000ULL)>>32, 6510 Dspin DhccpParam::CLEANUP_NLINE_MSB);6511 6512 Dspin DhccpParam::dspin_set(dspin_send_data,6510 DspinOdccpParam::CLEANUP_NLINE_MSB); 6511 6512 DspinOdccpParam::dspin_set(dspin_send_data, 6513 6513 r_icache_cc_send_way.read(), 6514 Dspin DhccpParam::CLEANUP_WAY_INDEX);6515 6516 Dspin DhccpParam::dspin_set(dspin_send_data,6517 Dspin DhccpParam::TYPE_CLEANUP_INST,6518 Dspin DhccpParam::FROM_L1_TYPE);6514 DspinOdccpParam::CLEANUP_WAY_INDEX); 6515 6516 DspinOdccpParam::dspin_set(dspin_send_data, 6517 DspinOdccpParam::TYPE_CLEANUP_INST, 6518 DspinOdccpParam::FROM_L1_TYPE); 6519 6519 6520 Dspin DhccpParam::dspin_set(dspin_send_data,6520 DspinOdccpParam::dspin_set(dspin_send_data, 6521 6521 0, 6522 Dspin DhccpParam::CLEANUP_NCC);6522 DspinOdccpParam::CLEANUP_NCC); 6523 6523 } 6524 6524 // send flit … … 6544 6544 if(r_cc_send_last_client.read() == 0) // dcache active request 6545 6545 { 6546 Dspin DhccpParam::dspin_set(dspin_send_data,6546 DspinOdccpParam::dspin_set(dspin_send_data, 6547 6547 r_dcache_cc_send_nline.read() & 0xFFFFFFFFULL, 6548 Dspin DhccpParam::CLEANUP_NLINE_LSB);6548 DspinOdccpParam::CLEANUP_NLINE_LSB); 6549 6549 } 6550 6550 else // icache active request 6551 6551 { 6552 Dspin DhccpParam::dspin_set(dspin_send_data,6552 DspinOdccpParam::dspin_set(dspin_send_data, 6553 6553 r_icache_cc_send_nline.read() & 0xFFFFFFFFULL, 6554 Dspin DhccpParam::CLEANUP_NLINE_LSB);6554 DspinOdccpParam::CLEANUP_NLINE_LSB); 6555 6555 } 6556 6556 // send flit … … 6571 6571 } 6572 6572 6573 Dspin DhccpParam::dspin_set(dspin_send_data,6573 DspinOdccpParam::dspin_set(dspin_send_data, 6574 6574 r_cc_send_data_fifo.read(), 6575 Dspin DhccpParam::CLEANUP_DATA_UPDT);6575 DspinOdccpParam::CLEANUP_DATA_UPDT); 6576 6576 6577 6577 p_dspin_out.data = dspin_send_data; … … 6583 6583 { 6584 6584 // initialize dspin send data 6585 // Dspin DhccpParam::dspin_set(dspin_send_data,6585 // DspinOdccpParam::dspin_set(dspin_send_data, 6586 6586 // 1, 6587 // Dspin DhccpParam::FROM_L1_EOP);6588 Dspin DhccpParam::dspin_set(dspin_send_data,6587 // DspinOdccpParam::FROM_L1_EOP); 6588 DspinOdccpParam::dspin_set(dspin_send_data, 6589 6589 0, 6590 Dspin DhccpParam::FROM_L1_BC);6591 Dspin DhccpParam::dspin_set(dspin_send_data,6592 Dspin DhccpParam::TYPE_MULTI_ACK,6593 Dspin DhccpParam::FROM_L1_TYPE);6590 DspinOdccpParam::FROM_L1_BC); 6591 DspinOdccpParam::dspin_set(dspin_send_data, 6592 DspinOdccpParam::TYPE_MULTI_ACK, 6593 DspinOdccpParam::FROM_L1_TYPE); 6594 6594 6595 6595 if(r_cc_send_last_client.read() == 0) // dcache active request … … 6597 6597 uint64_t dest = (uint64_t) r_dcache_cc_send_nline.read() 6598 6598 >> (m_nline_width - m_x_width - m_y_width) 6599 << (Dspin DhccpParam::GLOBALID_WIDTH - m_x_width - m_y_width);6599 << (DspinOdccpParam::GLOBALID_WIDTH - m_x_width - m_y_width); 6600 6600 6601 Dspin DhccpParam::dspin_set(dspin_send_data,6601 DspinOdccpParam::dspin_set(dspin_send_data, 6602 6602 dest, 6603 Dspin DhccpParam::MULTI_ACK_DEST);6604 6605 Dspin DhccpParam::dspin_set(dspin_send_data,6603 DspinOdccpParam::MULTI_ACK_DEST); 6604 6605 DspinOdccpParam::dspin_set(dspin_send_data, 6606 6606 r_dcache_cc_send_updt_tab_idx.read(), 6607 Dspin DhccpParam::MULTI_ACK_UPDT_INDEX);6607 DspinOdccpParam::MULTI_ACK_UPDT_INDEX); 6608 6608 } 6609 6609 else // icache active request … … 6611 6611 uint64_t dest = (uint64_t) r_icache_cc_send_nline.read() 6612 6612 >> (m_nline_width - m_x_width - m_y_width) 6613 << (Dspin DhccpParam::GLOBALID_WIDTH - m_x_width - m_y_width);6613 << (DspinOdccpParam::GLOBALID_WIDTH - m_x_width - m_y_width); 6614 6614 6615 6615 6616 Dspin DhccpParam::dspin_set(dspin_send_data,6616 DspinOdccpParam::dspin_set(dspin_send_data, 6617 6617 dest, 6618 Dspin DhccpParam::MULTI_ACK_DEST);6619 6620 Dspin DhccpParam::dspin_set(dspin_send_data,6618 DspinOdccpParam::MULTI_ACK_DEST); 6619 6620 DspinOdccpParam::dspin_set(dspin_send_data, 6621 6621 r_icache_cc_send_updt_tab_idx.read(), 6622 Dspin DhccpParam::MULTI_ACK_UPDT_INDEX);6622 DspinOdccpParam::MULTI_ACK_UPDT_INDEX); 6623 6623 } 6624 6624 // send flit
Note: See TracChangeset
for help on using the changeset viewer.