Changes between Version 6 and Version 7 of Writing Rules/Caba
- Timestamp:
- Mar 27, 2007, 7:57:23 PM (17 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Writing Rules/Caba
v6 v7 221 221 This method can use automatic variables. It can be missing if there is no Mealy output. 222 222 223 = Complete example file=223 = Complete example = 224 224 225 225 Let's take the [source:trunk/soclib/systemc/include/caba/target/vci_locks.h soclib::caba::VciLocks] … … 262 262 263 263 // Pointer on the table of locks (allocated in the constructor) 264 sc_signal<bool> * m_contents;264 sc_signal<bool> *r_contents; 265 265 266 266 // The segment assigned to this peripheral … … 324 324 325 325 // There is one lock every 32-bit word in memory. We 326 // allocate an array for the locks, one every 4 addressable 327 // byte. 328 m_contents = new sc_signal<bool>[r_segment.size()/4]; 326 // allocate an array of bool for the locks 327 r_contents = new sc_signal<bool>[m_segment.size()/4]; 329 328 330 329 // Sensitivity list for transition() and genMoore(), no genMealy() … … 341 340 tmpl(/**/)::~VciLocks() 342 341 { 343 // Here we must delete everydynamically-allocated data...342 // Here we must delete dynamically-allocated data... 344 343 delete [] m_contents; 345 344 } … … 347 346 tmpl(void)::transition() 348 347 { 349 // On reset condition, we initialize everything inthe component,348 // On reset condition, we initialize the component, 350 349 // from FSMs to internal data. 351 350 if (!p_resetn) { 352 351 for (size_t i=0; i<r_segment.size()/4; ++i) 353 352 r_contents[i] = false; 354 r_vci_fsm = IDLE;353 r_vci_fsm = IDLE; 355 354 return; 356 355 }