Previous Section Next Section

7.3 Event Redefinition

Event definitions can be replaced by means ofthe is only keywords. Example 7-4 illustrates event redefinition.

Example 7-4 Event Redefinition
Example of event redefinition using the is only keywords
<'
struct m_str {
    event start_ct;
    event top_clk is fall('~/top/r_clk') @sim;
    event stop_ct is {@start_ct; [1]} @top_clk; //Original definition
};
extend m_str {
    event stop_ct is only {@start_ct; [3]}@top_clk; //Event
                                                    //redefinition
};
'>
Previous Section Next Section