Changes between Version 6 and Version 7 of Writing Rules/Caba


Ignore:
Timestamp:
Mar 27, 2007, 7:57:23 PM (17 years ago)
Author:
alain
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Writing Rules/Caba

    v6 v7  
    221221This method can use automatic variables. It can be missing if there is no Mealy output.
    222222
    223 = Complete example file =
     223= Complete example =
    224224
    225225Let's take the [source:trunk/soclib/systemc/include/caba/target/vci_locks.h soclib::caba::VciLocks]
     
    262262
    263263    // Pointer on the table of locks (allocated in the constructor)
    264     sc_signal<bool>             *m_contents;
     264    sc_signal<bool>             *r_contents;
    265265
    266266    // The segment assigned to this peripheral
     
    324324
    325325    // 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];
    329328
    330329    // Sensitivity list for transition() and genMoore(), no genMealy()
     
    341340tmpl(/**/)::~VciLocks()
    342341{
    343     // Here we must delete every dynamically-allocated data...
     342    // Here we must delete dynamically-allocated data...
    344343    delete [] m_contents;
    345344}
     
    347346tmpl(void)::transition()
    348347{
    349     // On reset condition, we initialize everything in the component,
     348    // On reset condition, we initialize the component,
    350349    // from FSMs to internal data.
    351350    if (!p_resetn) {
    352351        for (size_t i=0; i<r_segment.size()/4; ++i)
    353352            r_contents[i] = false;
    354         r_vci_fsm = IDLE;
     353            r_vci_fsm = IDLE;
    355354        return;
    356355    }