Changes between Version 7 and Version 8 of Writing Rules/RISC
- Timestamp:
- Jan 7, 2008, 6:38:48 PM (17 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Writing Rules/RISC
v7 v8 224 224 p_icache.type = m_ins_type ; 225 225 p_icache.mode = m_ins_mode ; 226 p_icache.adr = m_ins_addr ;226 p_icache.adr = m_ins_address; 227 227 p_dcache_req = m_mem_asked ; 228 228 p_dcache_type = m_mem_type ; 229 229 p_dcache_mode = m_mem_mode ; 230 p_dcache.adr = m_mem_addr ;230 p_dcache.adr = m_mem_address; 231 231 p_dcache.wdata = m_mem_wdata; 232 232 } // end genMoore … … 242 242 243 243 The class '''!VciXcache''' contain a member variable '''p_vci''', of type '''!VciInitPort''', to send VCI command packets, and receive VCI response packets. 244 This class contains also N member variables '''p_irq[i]''', of type '''!SynchroInPort''', representing the interrupt inputs. The number N of interrupt ports depends on the wrapped ISS, an is defined by the ‘’’n_irq’’’ member variable of the '''iss_t''' class.244 This class contains also N member variables '''p_irq[i]''', of type '''!SynchroInPort''', representing the interrupt ports. The number N of interrupt ports depends on the wrapped ISS, an is defined by the ‘’’n_irq’’’ member variable of the '''iss_t''' class. 245 245 246 246 The '''execLoop()''' function contains an infinite loop. One iteration in this loop corresponds to one cycle for the local clock, (or more, as the thread is suspended in case of MISS). … … 249 249 {{{ 250 250 void cacheAccess(icache_request_t *ireq, 251 dcache_request_t *dreq,252 xcache_response_t *rsp)251 dcache_request_t *dreq, 252 xcache_response_t *rsp) 253 253 }}} 254 254 … … 257 257 class icache_request_t { 258 258 bool valid ; 259 enum ins_access_type type ; 260 enum access_mode mode ; 259 enum InsAccessType type ; 261 260 uint32_t address ; 262 261 } 263 262 class dcache_request_t { 264 263 bool valid ; 265 enum data_access_type type ; 266 enum access_mode mode ; 264 enum DataAccessType type ; 267 265 uint32_t address ; 268 266 uint32_t wdata ; … … 275 273 } 276 274 }}} 277 The ‘’’cacheAccess()‘’’function détermines the actions to be done.278 In case of data or instruction MISS MISS, the ‘’’cacheAccess()’’’ function send the proper VCI command packet on the ‘’’p_vci’’’ port., and the ‘’’exedcLoop’’’thread is suspended.279 In case of data write, the the ‘’’cacheAccess()’’’ function send the proper VCI command packet on the ‘’’p_vci’’’ port., but the ‘’’exedcLoop’’’thread is not suspended.280 281 At each iteration in the execution loop, the ‘’’cacheAccess()’’’ method updates the local clock (variable ‘’’m_time’’’) :275 The '''cacheAccess()''' function détermines the actions to be done. 276 In case of data or instruction MISS, the '''cacheAccess()''' function sends the proper VCI command packet on the '''p_vci''' port, and the '''exedcLoop()''' thread is suspended. 277 In case of data write, the the '''cacheAccess()''' function sends the proper VCI command packet on the '''p_vci''' port, but the '''exedcLoop()''' thread is not suspended. 278 279 At each iteration in the execution loop, the '''cacheAccess()''' method updates the local clock (variable '''m_time''') : 282 280 • The local time is simply incremented by one cycle, if the cache controller is able to answer immediately to the processor requests. 283 • The local time is updated using the date containeded in the VCI response packet in case of MISS 284 285 The TLM-T model for the VciXcache module is presented below :281 • The local time is updated using the date containeded in the VCI response packet in case of MISS.? 282 283 The SystemC TLM-T model for the VciXcache module is presented below : 286 284 {{{ 287 285 template<typename iss_t, typename vci_param> 288 class VciXcache<iss_t> : tlmt 286 class VciXcache<iss_t> : tlmt::BaseModule { 289 287 290 288 public :