Changes between Version 9 and Version 10 of Writing Rules/RISC
- Timestamp:
- Jan 7, 2008, 7:58:12 PM (17 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Writing Rules/RISC
v9 v10 14 14 15 15 The method relies on three basic principles : 16 •The processor core is modeled as a generic ISS (Instruction Set Simulator).17 •This ISS is wrapped in apropriate wrappers for several types of simulation models : CABA, TLM-T and PV.18 •All processors types use the same generic cache controler.16 * The processor core is modeled as a generic ISS (Instruction Set Simulator). 17 * This ISS is wrapped in apropriate wrappers for several types of simulation models : CABA, TLM-T and PV. 18 * All processors types use the same generic cache controler. 19 19 20 20 On one hand, the same ISS is encapsulated in different wrappers to generate several simulation models, corresponding to several abstraction levels: CABA (Cycle-Accurate Bit-Accurate), TLM-T (Transaction Level Models with Time), and PV (Programmer View, untimed). On the other hand, it is possible to use the same wrapper for different types of processor architectures. As illustrated below, all simulation models can be obtained as the cartesian product of the ISS set, by the wrappers set. … … 134 134 The CABA modeling for a complete CPU (processor + cache) is presented in figure 2. 135 135 The processor ISS is wrapped in the generic CABA wrapper, implemented by the class '''!IssWrapper'''.. 136 The class '''!IssWrapper''' contains the member variable '''m_iss''' representing the processor ISS. The type of the '''m_iss''' variable - defining the type of the processor - is specified by the template parameter '''iss_t'''. 136 The class '''!IssWrapper''' contains the member variable '''m_iss''' representing the processor ISS. The type of the '''m_iss''' variable - defining the type of the processor - is specified by the template parameter '''iss_t'''. The class '''!VciXcache''' inherit the class '''caba::!ModuleBase''', that is the basis for all CABA modules. 137 137 138 138 [[Image(caba_wrapper.png, nolink)]] 139 139 140 To communicate with the '''!VciXcache''', the '''!IssWrapper''' class contains two member variables '''p_icache''', of type '''!IcacheProcessorPort''' and '''p_dcache''', of type '''!DcacheProcessorPort'''. It contains also the member variable '''p_irq''', That is a pointer to an array of ports of type '''sc_in<bool> *'''. This array represents the interrupt ports. The number N of interrupt ports depends on the wrapped processor, an is defined by the '''n_irq''' member variable of the '''iss_t''' class.140 To communicate with the '''!VciXcache''', the '''!IssWrapper''' class contains two member variables '''p_icache''', of type '''!IcacheProcessorPort''' and '''p_dcache''', of type '''!DcacheProcessorPort'''. It contains also the member variable '''p_irq''', that is a pointer to an array of ports of type '''sc_in<bool>'''. This array represents the interrupt ports. The number N of interrupt ports depends on the wrapped processor, an is defined by the '''n_irq''' member variable of the '''iss_t''' class. 141 141 142 142 The SystemC code for the generic CABA wrapper is presented below : … … 236 236 = F) TLM-T modeling = 237 237 The TLM-T modeling for a complete CPU (processor + cache) is presented in figure 3. 238 To increase the simulation speed, the TLM-T wrapper is the cache control er itself, and it is implemented as the class ''' !VciXcache'''. This class contains the SC_THREAD '''execLoop()''' implementing the PDES process, and the '''m_time''' member variable implementing the associated local clock. The class '''!VciXcache''' inherit the class '''Tlmt::!ModuleBase''', that is the basis for all TLM-T modules.238 To increase the simulation speed, the TLM-T wrapper is the cache controller itself, and it is implemented as the class ''' !VciXcache'''. This class contains the SC_THREAD '''execLoop()''' implementing the PDES process, and the '''m_time''' member variable implementing the associated local clock. The class '''!VciXcache''' inherit the class '''tlmt::!ModuleBase''', that is the basis for all TLM-T modules. 239 239 This class contains the member variable '''m_iss''' representing the processor ISS. The type of the '''m_iss''' variable is defined by the template parameter '''iss_t'''. 240 240 … … 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 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.244 This class contains also the member variable '''p_irq''', that is a pointer to an array of ports of type '''SynchroInPort'''. This array represents the interrupt ports. The number N of interrupt ports depends on the wrapped processor, 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). … … 253 253 }}} 254 254 255 The ‘’’icache_request_t’’’, ‘’’dcache_request_t’’’, and ‘’’xcache_response_t’’’classes represent the instruction and data requests, and the cache response respectively :255 The '''icache_request_t''', '''dcache_request_t''', and '''xcache_response_t''' classes represent the instruction and data requests, and the cache response respectively : 256 256 {{{ 257 257 class icache_request_t { … … 300 300 uint32_t icache_nlines, 301 301 uint32_t icache_nwords) 302 p_vci(« vci », this, &VciXcache::rspReceived, &m_time) ,303 302 BaseModule(name), 304 303 m_iss(processorIdent), 305 304 m_time(0) 306 305 { 306 p_vci(« vci », this, &VciXcache::rspReceived, &m_time) , 307 307 for (uint32_t i = 0 ; i < iss_t::n_irq ; i++) { 308 308 new(&p_irq[i])SynchroInPort ("irq", i, this, &VciXcache::irqReceived) ; … … 329 329 uint32_t m_lookahead ; 330 330 uint32_t m_counter ; 331 bool m_irqpending[iss_t 332 uint32_t m_irqtime[iss_t 331 bool m_irqpending[iss_t;;n_irq]; 332 uint32_t m_irqtime[iss_t::n_irq] ; 333 333 vci_cmd_t m_cmd ; 334 334 ////////////////// thread … … 377 377 xcache_response_t rsp) 378 378 { 379 ... 379 380 } // end cacheAccess() 380 381 … … 384 385 uint32_t time) 385 386 { 387 ... 386 388 } // end rspReceived() 387 389