Changeset 59 for sources/src/gen_code.h


Ignore:
Timestamp:
Feb 6, 2017, 11:35:42 AM (7 years ago)
Author:
meunier
Message:
  • Fixed memory leaks
  • Fixed indentation in some files
File:
1 edited

Legend:

Unmodified
Added
Removed
  • sources/src/gen_code.h

    r52 r59  
    9393inline void internal_sc_cycle1(int number_of_cycles) { 
    9494    //while ((! have_to_stop) && (number_of_cycles != 0)) {
    95     while (!((have_to_stop) | (number_of_cycles == 0))) {
     95    while (!((have_to_stop) || (number_of_cycles == 0))) {
    9696        trace_all(false);
    9797        internal_sc_cycle2();
    9898        trace_all(true);
    99         number_of_cycles = (number_of_cycles<0) ? number_of_cycles:number_of_cycles - 1;
     99        number_of_cycles = (number_of_cycles < 0) ? number_of_cycles : number_of_cycles - 1;
    100100    }
    101101}
     
    116116#endif
    117117
    118     if (is_posted_write ()) {
    119         // update posted value to external signals             
    120         update ();
    121         func_combinationals ();
     118    if (is_posted_write()) {
     119        // update posted value to external signals
     120        update();
     121        func_combinationals();
    122122    }
    123123
    124     internal_sc_cycle1 ((int) duration);
     124    internal_sc_cycle1((int) duration);
    125125
    126126    // don't need to do func_combinationals since 'unstable' flag is now false
Note: See TracChangeset for help on using the changeset viewer.