Ignore:
Timestamp:
Jun 4, 2009, 2:09:13 PM (15 years ago)
Author:
buchmann
Message:

Changes:

  • rename pending_write into pending_write_t
  • indent code
File:
1 edited

Legend:

Unmodified
Added
Removed
  • sources/src/global_functions.cc

    r27 r32  
    240240internal_sc_initialize (void)
    241241{
    242         sort_equi_list ();
     242  sort_equi_list ();
    243243
    244244  check_all_method_process ();
     
    261261    cerr << endl;
    262262  }
     263
    263264  // Init variables to be able to run combinational functions
    264265#ifdef CONFIG_CHECK_FSM_RULES
    265         casc_fsm_step = STIMULI;
     266  casc_fsm_step = STIMULI;
    266267#endif
    267268
     
    274275    pending_write_vector = NULL;
    275276  else
    276                 pending_write_vector = (pending_write_vector_t) realloc (pending_write_vector, sizeof (pending_write) * pending_write_vector_capacity);
     277    pending_write_vector = (pending_write_vector_t) realloc (pending_write_vector, sizeof (pending_write_t) * pending_write_vector_capacity);
    277278       
    278279  // create the clock list
    279         clock_list_t clock_list;
     280  clock_list_t clock_list;
    280281  create_clock_list (clock_list, get_equi_list ());
    281282  if (dump_netlist_info)
     
    291292  }
    292293
    293         // Check if any constructor wrote into registers
    294         if (pending_write_vector_nb != 0)
     294  // Check if any constructor wrote into registers
     295  if (pending_write_vector_nb != 0)
    295296        {
    296297                cerr << "Error : Register/Signal writing is not allowed before sc_initialize.\n"
     
    308309    use_static_func ();
    309310 
    310         pending_write_vector_nb = 0;
     311  pending_write_vector_nb = 0;
    311312 
    312313  check_all_ports ();
    313314  usage.start ();
     315
    314316  if (dump_stage)
    315317    cerr << "sc_initialize () done.\n";
     318
    316319  already_initialized = true;
    317320}
     
    323326  if (already_initialized == false) {
    324327#if defined(SYSTEMC_VERSION_1_0)
    325                 std::cerr << "Warning : call sc_initialize before executiong simulation.\n";
     328    std::cerr << "Warning : call sc_initialize before executiong simulation.\n";
    326329#endif
    327330    internal_sc_initialize ();
     
    332335      exit (0);
    333336    }
    334         }
     337  }
    335338}
    336339
     
    366369sc_start(double d_val)
    367370{
    368         sc_cycle (d_val);
     371  sc_cycle (d_val);
    369372#ifdef DUMP_SIGNAL_STATS
    370         print_registers_writing_stats (cerr);
     373  print_registers_writing_stats (cerr);
    371374#endif
    372375#ifdef DUMP_SCHEDULE_STATS
    373         print_schedule_stats (cerr);
     376  print_schedule_stats (cerr);
    374377#endif
    375378}
     
    378381sc_start()
    379382{
    380         sc_cycle (-1);
     383  sc_cycle (-1);
    381384#ifdef DUMP_SIGNAL_STATS
    382         print_registers_writing_stats (cerr);
     385  print_registers_writing_stats (cerr);
    383386#endif
    384387#ifdef DUMP_SCHEDULE_STATS
    385         print_schedule_stats (cerr);
     388  print_schedule_stats (cerr);
    386389#endif
    387390}
     
    397400sc_start( const sc_time& duration )
    398401{
    399         sc_cycle ((double)duration);
     402  sc_cycle ((double)duration);
    400403#ifdef DUMP_SIGNAL_STATS
    401         print_registers_writing_stats (cerr);
     404  print_registers_writing_stats (cerr);
    402405#endif
    403406#ifdef DUMP_SCHEDULE_STATS
    404         print_schedule_stats (cerr);
     407  print_schedule_stats (cerr);
    405408#endif
    406409}
Note: See TracChangeset for help on using the changeset viewer.