serialize.cc (9356:b279bad40aa3) serialize.cc (9983:2cce74fe359e)
1/*
2 * Copyright (c) 2002-2005 The Regents of The University of Michigan
1/*
2 * Copyright (c) 2002-2005 The Regents of The University of Michigan
3 * Copyright (c) 2013 Advanced Micro Devices, Inc.
4 * Copyright (c) 2013 Mark D. Hill and David A. Wood
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;
9 * redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the

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

451}
452
453void
454Globals::serialize(ostream &os)
455{
456 nameOut(os);
457 paramOut(os, "curTick", curTick());
458
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions are
9 * met: redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer;
11 * redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the

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

453}
454
455void
456Globals::serialize(ostream &os)
457{
458 nameOut(os);
459 paramOut(os, "curTick", curTick());
460
459 nameOut(os, "MainEventQueue");
460 mainEventQueue.serialize(os);
461 paramOut(os, "numMainEventQueues", numMainEventQueues);
462
463 for (uint32_t i = 0; i < numMainEventQueues; ++i) {
464 nameOut(os, "MainEventQueue");
465 mainEventQueue[i]->serialize(os);
466 }
461}
462
463void
464Globals::unserialize(Checkpoint *cp, const std::string &section)
465{
466 Tick tick;
467 paramIn(cp, section, "curTick", tick);
467}
468
469void
470Globals::unserialize(Checkpoint *cp, const std::string &section)
471{
472 Tick tick;
473 paramIn(cp, section, "curTick", tick);
468 mainEventQueue.setCurTick(tick);
474 paramIn(cp, section, "numMainEventQueues", numMainEventQueues);
469
475
470 mainEventQueue.unserialize(cp, "MainEventQueue");
476 for (uint32_t i = 0; i < numMainEventQueues; ++i) {
477 mainEventQueue[i]->setCurTick(tick);
478 mainEventQueue[i]->unserialize(cp, "MainEventQueue");
479 }
471}
472
473Serializable::Serializable()
474{
475}
476
477Serializable::~Serializable()
478{

--- 168 unchanged lines hidden ---
480}
481
482Serializable::Serializable()
483{
484}
485
486Serializable::~Serializable()
487{

--- 168 unchanged lines hidden ---