Changeset 434 for trunk/modules/vci_mem_cache/caba/source/include
- Timestamp:
- Jul 12, 2013, 12:16:30 PM (11 years ago)
- Location:
- trunk/modules/vci_mem_cache/caba/source/include
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/modules/vci_mem_cache/caba/source/include/mem_cache_directory.h
r385 r434 274 274 275 275 ///////////////////////////////////////////////////////////////////// 276 // The inval function invalidate an entry defined by the set and 277 // way arguments. 278 ///////////////////////////////////////////////////////////////////// 279 void inval( const size_t &set, const size_t &way ) 280 { 281 m_dir_tab[set][way].init(); 282 } 283 284 ///////////////////////////////////////////////////////////////////// 276 285 // The read_neutral() function reads a directory entry, without 277 286 // changing the LRU … … 320 329 // update LRU bits 321 330 bool all_recent = true; 322 for ( size_t i=0 ; i<m_ways ; i++ ) { 323 if ( i != way ) all_recent = m_lru_tab[set][i].recent && all_recent; 324 } 325 if ( all_recent ) { 326 for( size_t i=0 ; i<m_ways ; i++ ) m_lru_tab[set][i].recent = false; 327 } else { 328 m_lru_tab[set][way].recent = true; 331 for ( size_t i=0 ; i<m_ways ; i++ ) 332 { 333 if ( i != way ) all_recent = m_lru_tab[set][i].recent && all_recent; 334 } 335 if ( all_recent ) 336 { 337 for( size_t i=0 ; i<m_ways ; i++ ) m_lru_tab[set][i].recent = false; 338 } 339 else 340 { 341 m_lru_tab[set][way].recent = true; 329 342 } 330 343 } // end write() -
trunk/modules/vci_mem_cache/caba/source/include/update_tab.h
r385 r434 11 11 //////////////////////////////////////////////////////////////////////// 12 12 class UpdateTabEntry { 13 13 14 typedef uint32_t size_t; 14 15 typedef sc_dt::sc_uint<40> addr_t; 15 16 16 17 public: 18 17 19 bool valid; // It is a valid pending transaction 18 20 bool update; // It is an update transaction 19 21 bool brdcast; // It is a broadcast invalidate 20 bool rsp; // It needs a response to the initiator 22 bool rsp; // Response to the initiator required 23 bool ack; // Acknowledge to the CONFIG FSM required 21 24 size_t srcid; // The srcid of the initiator which wrote the data 22 25 size_t trdid; // The trdid of the initiator which wrote the data … … 25 28 size_t count; // The number of acknowledge responses to receive 26 29 27 UpdateTabEntry(){ 30 UpdateTabEntry() 31 { 28 32 valid = false; 29 33 update = false; 30 34 brdcast = false; 31 35 rsp = false; 36 ack = false; 32 37 srcid = 0; 33 38 trdid = 0; … … 38 43 39 44 UpdateTabEntry(bool i_valid, 40 bool i_update, 41 bool i_brdcast, 42 bool i_rsp, 43 size_t i_srcid, 44 size_t i_trdid, 45 size_t i_pktid, 46 addr_t i_nline, 47 size_t i_count) 45 bool i_update, 46 bool i_brdcast, 47 bool i_rsp, 48 bool i_ack, 49 size_t i_srcid, 50 size_t i_trdid, 51 size_t i_pktid, 52 addr_t i_nline, 53 size_t i_count) 48 54 { 49 55 valid = i_valid; … … 51 57 brdcast = i_brdcast; 52 58 rsp = i_rsp; 59 ack = i_ack; 53 60 srcid = i_srcid; 54 61 trdid = i_trdid; … … 64 71 brdcast = source.brdcast; 65 72 rsp = source.rsp; 73 ack = source.ack; 66 74 srcid = source.srcid; 67 75 trdid = source.trdid; … … 80 88 brdcast= false; 81 89 rsp = false; 90 ack = false; 82 91 srcid = 0; 83 92 trdid = 0; … … 98 107 brdcast= source.brdcast; 99 108 rsp = source.rsp; 109 ack = source.ack ; 100 110 srcid = source.srcid; 101 111 trdid = source.trdid; … … 108 118 // The print() function prints the entry 109 119 //////////////////////////////////////////////////////////////////// 110 void print(){ 111 std::cout << std::dec << "valid = " << valid << std::endl; 112 std::cout << "update = " << update << std::endl; 113 std::cout << "brdcast= " << brdcast<< std::endl; 114 std::cout << "rsp = " << rsp << std::endl; 115 std::cout << "srcid = " << srcid << std::endl; 116 std::cout << "trdid = " << trdid << std::endl; 117 std::cout << "pktid = " << pktid << std::endl; 118 std::cout << std::hex << "nline = " << nline << std::endl; 119 std::cout << std::dec << "count = " << count << std::endl; 120 void print() 121 { 122 std::cout << " val = " << std::dec << valid 123 << " / updt = " << update 124 << " / bc = " << brdcast 125 << " / rsp = " << rsp 126 << " / ack = " << ack 127 << " / count = " << count 128 << " / srcid = " << std::hex << srcid 129 << " / trdid = " << trdid 130 << " / pktid = " << pktid 131 << " / nline = " << nline << std::endl; 120 132 } 121 133 }; … … 126 138 class UpdateTab{ 127 139 128 typedef sc_dt::sc_uint<40>addr_t;140 typedef uint64_t addr_t; 129 141 130 142 private: 131 size_t size_tab;143 size_t size_tab; 132 144 std::vector<UpdateTabEntry> tab; 133 145 … … 149 161 // The size() function returns the size of the tab 150 162 //////////////////////////////////////////////////////////////////// 151 const size_t size(){ 163 const size_t size() 164 { 152 165 return size_tab; 153 166 } 154 167 155 156 168 //////////////////////////////////////////////////////////////////// 157 169 // The print() function diplays the tab content 158 170 //////////////////////////////////////////////////////////////////// 159 void print(){ 160 for(size_t i=0; i<size_tab; i++) { 161 std::cout << "UPDATE TAB ENTRY " << std::dec << i << "--------" << std::endl; 171 void print() 172 { 173 std::cout << "UPDATE TABLE Content" << std::endl; 174 for(size_t i=0; i<size_tab; i++) 175 { 176 std::cout << "[" << std::dec << i << "] "; 162 177 tab[i].print(); 163 178 } … … 165 180 } 166 181 167 168 182 ///////////////////////////////////////////////////////////////////// 169 183 // The init() function initializes the tab 170 184 ///////////////////////////////////////////////////////////////////// 171 void init(){ 172 for ( size_t i=0; i<size_tab; i++) { 173 tab[i].init(); 174 } 175 } 176 185 void init() 186 { 187 for ( size_t i=0; i<size_tab; i++) tab[i].init(); 188 } 177 189 178 190 ///////////////////////////////////////////////////////////////////// … … 200 212 /////////////////////////////////////////////////////////////////////////// 201 213 bool set(const bool update, 202 const bool brdcast, 203 const bool rsp, 204 const size_t srcid, 205 const size_t trdid, 206 const size_t pktid, 207 const addr_t nline, 208 const size_t count, 209 size_t &index) 210 { 211 for ( size_t i=0 ; i<size_tab ; i++ ) { 212 if( !tab[i].valid ) { 214 const bool brdcast, 215 const bool rsp, 216 const bool ack, 217 const size_t srcid, 218 const size_t trdid, 219 const size_t pktid, 220 const addr_t nline, 221 const size_t count, 222 size_t &index) 223 { 224 for ( size_t i=0 ; i<size_tab ; i++ ) 225 { 226 if( !tab[i].valid ) 227 { 213 228 tab[i].valid = true; 214 229 tab[i].update = update; 215 230 tab[i].brdcast = brdcast; 216 231 tab[i].rsp = rsp; 232 tab[i].ack = ack; 217 233 tab[i].srcid = (size_t) srcid; 218 234 tab[i].trdid = (size_t) trdid; … … 235 251 ///////////////////////////////////////////////////////////////////// 236 252 bool decrement( const size_t index, 237 size_t &counter )253 size_t &counter ) 238 254 { 239 255 assert((index<size_tab) && "Bad Update Tab Entry"); 240 if ( tab[index].valid ) { 256 if ( tab[index].valid ) 257 { 241 258 tab[index].count--; 242 259 counter = tab[index].count; 243 260 return true; 244 } else { 261 } 262 else 263 { 245 264 return false; 246 265 } … … 252 271 bool is_full() 253 272 { 254 for(size_t i = 0 ; i < size_tab ; i++){ 255 if(!tab[i].valid){ 256 return false; 257 } 273 for(size_t i = 0 ; i < size_tab ; i++) 274 { 275 if(!tab[i].valid) return false; 258 276 } 259 277 return true; … … 265 283 bool is_not_empty() 266 284 { 267 for(size_t i = 0 ; i < size_tab ; i++){ 268 if(tab[i].valid){ 285 for(size_t i = 0 ; i < size_tab ; i++) 286 { 287 if(tab[i].valid) return true; 288 } 289 return false; 290 } 291 292 ///////////////////////////////////////////////////////////////////// 293 // The need_rsp() function returns the need of a response 294 // Arguments : 295 // - index : the index of the entry 296 ///////////////////////////////////////////////////////////////////// 297 bool need_rsp(const size_t index) 298 { 299 assert(index<size_tab && "Bad Update Tab Entry"); 300 return tab[index].rsp; 301 } 302 303 ///////////////////////////////////////////////////////////////////// 304 // The need_ack() function returns the need of an acknowledge 305 // Arguments : 306 // - index : the index of the entry 307 ///////////////////////////////////////////////////////////////////// 308 bool need_ack(const size_t index) 309 { 310 assert(index<size_tab && "Bad Update Tab Entry"); 311 return tab[index].ack; 312 } 313 314 ///////////////////////////////////////////////////////////////////// 315 // The is_brdcast() function returns the transaction type 316 // Arguments : 317 // - index : the index of the entry 318 ///////////////////////////////////////////////////////////////////// 319 bool is_brdcast(const size_t index) 320 { 321 assert(index<size_tab && "Bad Update Tab Entry"); 322 return tab[index].brdcast; 323 } 324 325 ///////////////////////////////////////////////////////////////////// 326 // The is_update() function returns the transaction type 327 // Arguments : 328 // - index : the index of the entry 329 ///////////////////////////////////////////////////////////////////// 330 bool is_update(const size_t index) 331 { 332 assert(index<size_tab && "Bad Update Tab Entry"); 333 return tab[index].update; 334 } 335 336 ///////////////////////////////////////////////////////////////////// 337 // The srcid() function returns the srcid value 338 // Arguments : 339 // - index : the index of the entry 340 ///////////////////////////////////////////////////////////////////// 341 size_t srcid(const size_t index) 342 { 343 assert(index<size_tab && "Bad Update Tab Entry"); 344 return tab[index].srcid; 345 } 346 347 ///////////////////////////////////////////////////////////////////// 348 // The trdid() function returns the trdid value 349 // Arguments : 350 // - index : the index of the entry 351 ///////////////////////////////////////////////////////////////////// 352 size_t trdid(const size_t index) 353 { 354 assert(index<size_tab && "Bad Update Tab Entry"); 355 return tab[index].trdid; 356 } 357 358 ///////////////////////////////////////////////////////////////////// 359 // The pktid() function returns the pktid value 360 // Arguments : 361 // - index : the index of the entry 362 ///////////////////////////////////////////////////////////////////// 363 size_t pktid(const size_t index) 364 { 365 assert(index<size_tab && "Bad Update Tab Entry"); 366 return tab[index].pktid; 367 } 368 369 ///////////////////////////////////////////////////////////////////// 370 // The nline() function returns the nline value 371 // Arguments : 372 // - index : the index of the entry 373 ///////////////////////////////////////////////////////////////////// 374 addr_t nline(const size_t index) 375 { 376 assert(index<size_tab && "Bad Update Tab Entry"); 377 return tab[index].nline; 378 } 379 380 ///////////////////////////////////////////////////////////////////// 381 // The search_inval() function returns the index of the entry in UPT 382 // Arguments : 383 // - nline : the line number of the entry in the directory 384 ///////////////////////////////////////////////////////////////////// 385 bool search_inval(const addr_t nline,size_t &index) 386 { 387 size_t i ; 388 389 for (i = 0 ; i < size_tab ; i++) 390 { 391 if ( (tab[i].nline == nline) and tab[i].valid and not tab[i].update ) 392 { 393 index = i ; 269 394 return true; 270 395 } … … 274 399 275 400 ///////////////////////////////////////////////////////////////////// 276 // The need_rsp() function returns the need of a response 277 // Arguments : 278 // - index : the index of the entry 279 ///////////////////////////////////////////////////////////////////// 280 bool need_rsp(const size_t index) 281 { 282 assert(index<size_tab && "Bad Update Tab Entry"); 283 return tab[index].rsp; 284 } 285 286 ///////////////////////////////////////////////////////////////////// 287 // The is_update() function returns the transaction type 288 // Arguments : 289 // - index : the index of the entry 290 ///////////////////////////////////////////////////////////////////// 291 bool is_brdcast(const size_t index) 292 { 293 assert(index<size_tab && "Bad Update Tab Entry"); 294 return tab[index].brdcast; 295 } 296 297 ///////////////////////////////////////////////////////////////////// 298 // The is_update() function returns the transaction type 299 // Arguments : 300 // - index : the index of the entry 301 ///////////////////////////////////////////////////////////////////// 302 bool is_update(const size_t index) 303 { 304 assert(index<size_tab && "Bad Update Tab Entry"); 305 return tab[index].update; 306 } 307 308 ///////////////////////////////////////////////////////////////////// 309 // The srcid() function returns the srcid value 310 // Arguments : 311 // - index : the index of the entry 312 ///////////////////////////////////////////////////////////////////// 313 size_t srcid(const size_t index) 314 { 315 assert(index<size_tab && "Bad Update Tab Entry"); 316 return tab[index].srcid; 317 } 318 319 ///////////////////////////////////////////////////////////////////// 320 // The trdid() function returns the trdid value 321 // Arguments : 322 // - index : the index of the entry 323 ///////////////////////////////////////////////////////////////////// 324 size_t trdid(const size_t index) 325 { 326 assert(index<size_tab && "Bad Update Tab Entry"); 327 return tab[index].trdid; 328 } 329 330 ///////////////////////////////////////////////////////////////////// 331 // The pktid() function returns the pktid value 332 // Arguments : 333 // - index : the index of the entry 334 ///////////////////////////////////////////////////////////////////// 335 size_t pktid(const size_t index) 336 { 337 assert(index<size_tab && "Bad Update Tab Entry"); 338 return tab[index].pktid; 339 } 340 341 ///////////////////////////////////////////////////////////////////// 342 // The nline() function returns the nline value 343 // Arguments : 344 // - index : the index of the entry 345 ///////////////////////////////////////////////////////////////////// 346 addr_t nline(const size_t index) 347 { 348 assert(index<size_tab && "Bad Update Tab Entry"); 349 return tab[index].nline; 350 } 351 352 ///////////////////////////////////////////////////////////////////// 353 // The search_inval() function returns the index of the entry in UPT 401 // The read_nline() function returns the index of the entry in UPT 354 402 // Arguments : 355 403 // - nline : the line number of the entry in the directory 356 404 ///////////////////////////////////////////////////////////////////// 357 bool search_inval(const addr_t nline,size_t &index)405 bool read_nline(const addr_t nline,size_t &index) 358 406 { 359 407 size_t i ; 360 408 361 for (i = 0 ; i < size_tab ; i++){ 362 if((tab[i].nline == nline) && tab[i].valid){ 363 if(!tab[i].update){ 364 index = i ; 365 return true; 366 } 367 } 368 } 369 return false; 370 } 371 372 ///////////////////////////////////////////////////////////////////// 373 // The read_nline() function returns the index of the entry in UPT 374 // Arguments : 375 // - nline : the line number of the entry in the directory 376 ///////////////////////////////////////////////////////////////////// 377 bool read_nline(const addr_t nline,size_t &index) 378 { 379 size_t i ; 380 381 for (i = 0 ; i < size_tab ; i++){ 382 if((tab[i].nline == nline) && tab[i].valid){ 409 for (i = 0 ; i < size_tab ; i++) 410 { 411 if ( (tab[i].nline == nline) and tab[i].valid ) 412 { 383 413 index = i ; 384 414 return true; -
trunk/modules/vci_mem_cache/caba/source/include/vci_mem_cache.h
r430 r434 77 77 78 78 /* States of the TGT_CMD fsm */ 79 enum tgt_cmd_fsm_state_e{ 79 enum tgt_cmd_fsm_state_e 80 { 80 81 TGT_CMD_IDLE, 81 82 TGT_CMD_ERROR, 82 83 TGT_CMD_READ, 83 84 TGT_CMD_WRITE, 84 TGT_CMD_CAS 85 TGT_CMD_CAS, 86 TGT_CMD_CONFIG 85 87 }; 86 88 … … 144 146 MULTI_ACK_UPT_LOCK, 145 147 MULTI_ACK_UPT_CLEAR, 146 MULTI_ACK_WRITE_RSP 148 MULTI_ACK_WRITE_RSP, 149 MULTI_ACK_CONFIG_ACK 150 }; 151 152 /* States of the CONFIG fsm */ 153 enum config_fsm_state_e 154 { 155 CONFIG_IDLE, 156 CONFIG_LOOP, 157 CONFIG_RSP, 158 CONFIG_DIR_REQ, 159 CONFIG_DIR_ACCESS, 160 CONFIG_DIR_INVAL, 161 CONFIG_BC_UPT_LOCK, 162 CONFIG_BC_SEND, 163 CONFIG_BC_WAIT, 164 165 CONFIG_UPT_WAIT, 166 167 CONFIG_UPT_LOCK, 168 169 CONFIG_HEAP_REQ 147 170 }; 148 171 … … 277 300 CLEANUP_UPT_CLEAR, 278 301 CLEANUP_WRITE_RSP, 279 CLEANUP_SEND_ACK 302 CLEANUP_CONFIG_ACK, 303 CLEANUP_SEND_CLACK 280 304 }; 281 305 … … 284 308 { 285 309 ALLOC_DIR_RESET, 310 ALLOC_DIR_CONFIG, 286 311 ALLOC_DIR_READ, 287 312 ALLOC_DIR_WRITE, … … 304 329 enum alloc_upt_fsm_state_e 305 330 { 331 ALLOC_UPT_CONFIG, 306 332 ALLOC_UPT_WRITE, 307 333 ALLOC_UPT_XRAM_RSP, … … 350 376 }; 351 377 378 /* Configuration commands */ 379 enum cmd_config_type_e 380 { 381 CMD_CONFIG_INVAL = 0, 382 CMD_CONFIG_SYNC = 1 383 }; 384 352 385 // debug variables (for each FSM) 353 bool m_debug_global; 354 bool m_debug_tgt_cmd_fsm; 355 bool m_debug_tgt_rsp_fsm; 356 bool m_debug_cc_send_fsm; 357 bool m_debug_cc_receive_fsm; 358 bool m_debug_multi_ack_fsm; 359 bool m_debug_read_fsm; 360 bool m_debug_write_fsm; 361 bool m_debug_cas_fsm; 362 bool m_debug_cleanup_fsm; 363 bool m_debug_ixr_cmd_fsm; 364 bool m_debug_ixr_rsp_fsm; 365 bool m_debug_xram_rsp_fsm; 386 bool m_debug; 366 387 bool m_debug_previous_hit; 367 388 size_t m_debug_previous_count; … … 373 394 // instrumentation counters 374 395 uint32_t m_cpt_cycles; // Counter of cycles 396 375 397 uint32_t m_cpt_read; // Number of READ transactions 398 uint32_t m_cpt_read_remote; // number of remote READ transactions 399 uint32_t m_cpt_read_flits; // number of flits for READs 400 uint32_t m_cpt_read_cost; // Number of (flits * distance) for READs 401 376 402 uint32_t m_cpt_read_miss; // Number of MISS READ 403 377 404 uint32_t m_cpt_write; // Number of WRITE transactions 405 uint32_t m_cpt_write_remote; // number of remote WRITE transactions 406 uint32_t m_cpt_write_flits; // number of flits for WRITEs 407 uint32_t m_cpt_write_cost; // Number of (flits * distance) for WRITEs 408 378 409 uint32_t m_cpt_write_miss; // Number of MISS WRITE 379 410 uint32_t m_cpt_write_cells; // Cumulated length for WRITE transactions … … 391 422 uint32_t m_cpt_cas; // Number of CAS transactions 392 423 424 uint32_t m_cpt_cleanup_cost; // Number of (flits * distance) for CLEANUPs 425 426 uint32_t m_cpt_update_flits; // Number of flits for UPDATEs 427 uint32_t m_cpt_update_cost; // Number of (flits * distance) for UPDATEs 428 429 uint32_t m_cpt_inval_cost; // Number of (flits * distance) for INVALs 430 431 uint32_t m_cpt_get; 432 433 uint32_t m_cpt_put; 434 393 435 size_t m_prev_count; 394 436 … … 407 449 VciMemCache( 408 450 sc_module_name name, // Instance Name 409 const soclib::common::MappingTable &mtp, // Mapping table directnetwork410 const soclib::common::MappingTable &mtx, // Mapping table externalnetwork411 const soclib::common::IntTab &srcid_x, // global index on externalnetwork412 const soclib::common::IntTab &tgtid_d, // global index on directnetwork413 const size_t cc_global_id, // global index on ccnetwork451 const soclib::common::MappingTable &mtp, // Mapping table INT network 452 const soclib::common::MappingTable &mtx, // Mapping table RAM network 453 const soclib::common::IntTab &srcid_x, // global index RAM network 454 const soclib::common::IntTab &tgtid_d, // global index INT network 455 const size_t cc_global_id, // global index CC network 414 456 const size_t nways, // Number of ways per set 415 457 const size_t nsets, // Number of sets 416 458 const size_t nwords, // Number of words per line 417 const size_t max_copies, // max number of copies in heap459 const size_t max_copies, // max number of copies 418 460 const size_t heap_size=HEAP_ENTRIES, 419 461 const size_t trt_lines=TRT_ENTRIES, … … 437 479 438 480 // Component attributes 439 std::list<soclib::common::Segment> m_seglist; // segments allocated to memcache481 std::list<soclib::common::Segment> m_seglist; // segments allocated 440 482 size_t m_nseg; // number of segments 441 483 soclib::common::Segment **m_seg; // array of segments pointers 442 const size_t m_srcid_x; // global index on external network 484 size_t m_seg_config; // config segment index 485 const size_t m_srcid_x; // global index on RAM network 443 486 const size_t m_initiators; // Number of initiators 444 487 const size_t m_heap_size; // Size of the heap … … 458 501 size_t m_max_copies; // max number of copies in heap 459 502 GenericLLSCGlobalTable 460 < 32 , 461 4096, 462 8000, 463 addr_t > m_llsc_table; // ll/sc globalregistration table503 < 32 , // number of slots 504 4096, // number of processors in the system 505 8000, // registration life (# of LL operations) 506 addr_t > m_llsc_table; // ll/sc registration table 464 507 465 508 // adress masks … … 511 554 // (segmentation violation response request) 512 555 sc_signal<bool> r_tgt_cmd_to_tgt_rsp_req; 556 557 sc_signal<uint32_t> r_tgt_cmd_to_tgt_rsp_rdata; 558 sc_signal<size_t> r_tgt_cmd_to_tgt_rsp_error; 513 559 sc_signal<size_t> r_tgt_cmd_to_tgt_rsp_srcid; 514 560 sc_signal<size_t> r_tgt_cmd_to_tgt_rsp_trdid; 515 561 sc_signal<size_t> r_tgt_cmd_to_tgt_rsp_pktid; 516 562 563 sc_signal<addr_t> r_tgt_cmd_config_addr; 564 sc_signal<size_t> r_tgt_cmd_config_cmd; 565 566 /////////////////////////////////////////////////////// 567 // Registers controlled by the CONFIG fsm 568 /////////////////////////////////////////////////////// 569 570 sc_signal<int> r_config_fsm; // FSM state 571 sc_signal<bool> r_config_lock; // lock protecting exclusive access 572 sc_signal<int> r_config_cmd; // config request status 573 sc_signal<addr_t> r_config_address; // target buffer physical address 574 sc_signal<size_t> r_config_srcid; // config request srcid 575 sc_signal<size_t> r_config_trdid; // config request trdid 576 sc_signal<size_t> r_config_pktid; // config request pktid 577 sc_signal<size_t> r_config_nlines; // number of lines covering the buffer 578 sc_signal<size_t> r_config_way; // selected way 579 sc_signal<size_t> r_config_count; // number of copies 580 sc_signal<size_t> r_config_upt_index; // UPT index 581 sc_signal<bool> r_config_is_cnt; // counter mode (broadcast required) 582 583 // Buffer between CONFIG fsm and TGT_RSP fsm (send a done response to L1 cache) 584 sc_signal<bool> r_config_to_tgt_rsp_req; // valid request 585 sc_signal<bool> r_config_to_tgt_rsp_error; // error response 586 sc_signal<size_t> r_config_to_tgt_rsp_srcid; // Transaction srcid 587 sc_signal<size_t> r_config_to_tgt_rsp_trdid; // Transaction trdid 588 sc_signal<size_t> r_config_to_tgt_rsp_pktid; // Transaction pktid 589 590 // Buffer between CONFIG fsm and CC_SEND fsm (multi-inval / broadcast-inval) 591 sc_signal<bool> r_config_to_cc_send_multi_req; // multi-inval request 592 sc_signal<bool> r_config_to_cc_send_brdcast_req; // broadcast-inval request 593 sc_signal<size_t> r_config_to_cc_send_nline; // line index 594 sc_signal<size_t> r_config_to_cc_send_trdid; // UPT index 595 517 596 /////////////////////////////////////////////////////// 518 597 // Registers controlled by the READ fsm 519 598 /////////////////////////////////////////////////////// 520 599 521 sc_signal<int> r_read_fsm; // FSM state522 sc_signal<size_t> r_read_copy; // Srcid of the first copy523 sc_signal<size_t> r_read_copy_cache; // Srcid of the first copy524 sc_signal<bool> r_read_copy_inst; // Type of the first copy525 sc_signal<tag_t> r_read_tag; // cache line tag (in directory)526 sc_signal<bool> r_read_is_cnt; // is_cnt bit (in directory)527 sc_signal<bool> r_read_lock; // lock bit (in directory)528 sc_signal<bool> r_read_dirty; // dirty bit (in directory)529 sc_signal<size_t> r_read_count; // number of copies530 sc_signal<size_t> r_read_ptr; // pointer to the heap531 sc_signal<data_t> * r_read_data; // data (one cache line)532 sc_signal<size_t> r_read_way; // associative way (in cache)533 sc_signal<size_t> r_read_trt_index; // Transaction Table index534 sc_signal<size_t> r_read_next_ptr; // Next entry to point to535 sc_signal<bool> r_read_last_free; // Last free entry536 sc_signal<addr_t> r_read_ll_key; // LL key from the llsc_global_table600 sc_signal<int> r_read_fsm; // FSM state 601 sc_signal<size_t> r_read_copy; // Srcid of the first copy 602 sc_signal<size_t> r_read_copy_cache; // Srcid of the first copy 603 sc_signal<bool> r_read_copy_inst; // Type of the first copy 604 sc_signal<tag_t> r_read_tag; // cache line tag (in directory) 605 sc_signal<bool> r_read_is_cnt; // is_cnt bit (in directory) 606 sc_signal<bool> r_read_lock; // lock bit (in directory) 607 sc_signal<bool> r_read_dirty; // dirty bit (in directory) 608 sc_signal<size_t> r_read_count; // number of copies 609 sc_signal<size_t> r_read_ptr; // pointer to the heap 610 sc_signal<data_t> * r_read_data; // data (one cache line) 611 sc_signal<size_t> r_read_way; // associative way (in cache) 612 sc_signal<size_t> r_read_trt_index; // Transaction Table index 613 sc_signal<size_t> r_read_next_ptr; // Next entry to point to 614 sc_signal<bool> r_read_last_free; // Last free entry 615 sc_signal<addr_t> r_read_ll_key; // LL key from the llsc_global_table 537 616 538 617 // Buffer between READ fsm and IXR_CMD fsm (ask a missing cache line to XRAM) … … 626 705 sc_signal<addr_t> r_multi_ack_nline; // pending write nline 627 706 707 // signaling completion of multi-inval to CONFIG fsm 708 sc_signal<bool> r_multi_ack_to_config_ack; 709 628 710 // Buffer between MULTI_ACK fsm and TGT_RSP fsm (complete write/update transaction) 629 711 sc_signal<bool> r_multi_ack_to_tgt_rsp_req; // valid request … … 662 744 sc_signal<size_t> r_cleanup_way; // associative way (in cache) 663 745 664 sc_signal<size_t> r_cleanup_write_srcid; // srcid of write r esponse746 sc_signal<size_t> r_cleanup_write_srcid; // srcid of write rsp 665 747 sc_signal<size_t> r_cleanup_write_trdid; // trdid of write rsp 666 748 sc_signal<size_t> r_cleanup_write_pktid; // pktid of write rsp 667 sc_signal<bool> r_cleanup_write_need_rsp;// needs a write rsp 749 750 sc_signal<bool> r_cleanup_need_rsp; // write response required 751 sc_signal<bool> r_cleanup_need_ack; // config acknowledge required 668 752 669 753 sc_signal<size_t> r_cleanup_index; // index of the INVAL line (in the UPT) 670 754 755 // signaling completion of broadcast-inval to CONFIG fsm 756 sc_signal<bool> r_cleanup_to_config_ack; 757 671 758 // Buffer between CLEANUP fsm and TGT_RSP fsm (acknowledge a write command from L1) 672 759 sc_signal<bool> r_cleanup_to_tgt_rsp_req; // valid request
Note: See TracChangeset
for help on using the changeset viewer.