base.cc (4471:4d86c4d096ad) | base.cc (4599:b3cdf938a853) |
---|---|
1/* 2 * Copyright (c) 2002-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; --- 255 unchanged lines hidden (view full) --- 264 next_tick += phase; 265 return next_tick; 266} 267 268Tick 269BaseCPU::nextCycle(Tick begin_tick) 270{ 271 Tick next_tick = begin_tick; | 1/* 2 * Copyright (c) 2002-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; --- 255 unchanged lines hidden (view full) --- 264 next_tick += phase; 265 return next_tick; 266} 267 268Tick 269BaseCPU::nextCycle(Tick begin_tick) 270{ 271 Tick next_tick = begin_tick; |
272 next_tick -= (next_tick % clock); | 272 if (next_tick % clock != 0) 273 next_tick = next_tick - (next_tick % clock) + clock; |
273 next_tick += phase; 274 | 274 next_tick += phase; 275 |
275 while (next_tick < curTick) 276 next_tick += clock; 277 | |
278 assert(next_tick >= curTick); 279 return next_tick; 280} 281 282void 283BaseCPU::registerThreadContexts() 284{ 285 for (int i = 0; i < threadContexts.size(); ++i) { --- 177 unchanged lines hidden --- | 276 assert(next_tick >= curTick); 277 return next_tick; 278} 279 280void 281BaseCPU::registerThreadContexts() 282{ 283 for (int i = 0; i < threadContexts.size(); ++i) { --- 177 unchanged lines hidden --- |