Deleted Added
sdiff udiff text old ( 3356:39c17056dd41 ) new ( 3511:8cb26619b6ec )
full compact
1/*
2 * Copyright (c) 2000-2005 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

--- 295 unchanged lines hidden (view full) ---

304
305
306/** Simulate for num_cycles additional cycles. If num_cycles is -1
307 * (the default), do not limit simulation; some other event must
308 * terminate the loop. Exported to Python via SWIG.
309 * @return The SimLoopExitEvent that caused the loop to exit.
310 */
311SimLoopExitEvent *
312simulate(Tick num_cycles = MaxTick)
313{
314 warn("Entering event queue @ %d. Starting simulation...\n", curTick);
315
316 if (num_cycles < 0)
317 fatal("simulate: num_cycles must be >= 0 (was %d)\n", num_cycles);
318 else if (curTick + num_cycles < 0) //Overflow
319 num_cycles = MaxTick;
320 else
321 num_cycles = curTick + num_cycles;
322
323 Event *limit_event = schedExitSimLoop("simulate() limit reached",
324 num_cycles);
325
326 while (1) {
327 // there should always be at least one event (the SimLoopExitEvent

--- 146 unchanged lines hidden ---