Changes between Version 16 and Version 17 of Writing Rules/RISC
- Timestamp:
- Jan 10, 2008, 6:37:58 PM (17 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Writing Rules/RISC
v16 v17 333 333 /////// member variables 334 334 tlmt_time m_time ; 335 sc_event m_rsp_received ; 335 336 iss_t m_iss ; 337 uint32_t m_rsp_error ; 336 338 uint32_t m_dcache_nlines ; 337 339 uint32_t m_dcache_nwords ; … … 356 358 m_iss.nullStep() ; 357 359 } else { 360 /////////// cache access 358 361 m_iss.getInstructionRequest(icache_req.valid, 359 362 icache_req.type, 360 icache_req.mode,361 363 icache_req.address) ; 362 364 m_iss.getDataRequest(dcache_req.valid, 363 dcache_req.type, 364 dcache_req.mode, 365 dcache_req.type, 365 366 dcache_req.address, 366 367 dcache_req.wdata) 367 368 xcacheAccess(&icache_req, &dcache_req, &xcache_rsp) ; 368 m_iss.setInstruction(xcache_rsp.iber, xcache_rsp.instruction) ; 369 if(dcache_req.isRead()) m_iss.setRdata(xcache_rsp.dber, xcache_rsp.rdata) ; 369 if ( icache_req.valid ) m_iss.setInstruction(xcache_rsp.iber, xcache_rsp.instruction) ; 370 if ( dcache_req.valid ) m_iss.setDataResponse(xcache_rsp.dber, xcache_rsp.rdata) ; 371 //////// handling interrupts 370 372 irqword = 0 ; 371 373 for ( size_t i = 0 ; i < iss_t ::n_irq ; i++) { 372 374 if( m_irqpending[i] && m_irqtime[i] <= get_time()) irqword |= (1<<i); 373 375 } 374 m_iss.setIrq(irqword) ; 376 m_iss.setIrq(irqword) ; 377 ///////// handling asynchronous bus error 378 if ( m_write_error ) { 379 setWriteBerr() ; 380 m_write_error = false ; 381 } 375 382 m_iss.step() ; 376 383 } // end cycle … … 392 399 } // end cacheAccess() 393 400 394 395 401 //////////////////////////// 396 402 void rspReceived(vci_rsp_t rsp, 397 403 uint32_t time) 398 404 { 399 ... 405 if ( rsp.cmd == VCI_CMD_write ) { // asynchronous bus error signaling 406 m_write_error = ( rsp.error != 0 ) ; 407 } 408 if ( rsp.cmd == VCI_CMD_READ ) { // time update & cache activation 409 m_time.updateTime( time + rsp.length ) ; 410 notify( m_rsp_received ) ; 411 } 400 412 } // end rspReceived() 401 413