kernel.cc (13059:4be5f408e128) kernel.cc (13067:3d6ef32002ef)
1/*
2 * Copyright 2018 Google, Inc.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are
6 * met: redistributions of source code must retain the above copyright
7 * notice, this list of conditions and the following disclaimer;
8 * redistributions in binary form must reproduce the above copyright

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

158
159 if (stopAfterCallbacks)
160 fatal("Simulation called sc_stop during elaboration.\n");
161}
162
163void
164Kernel::t0Handler()
165{
1/*
2 * Copyright 2018 Google, Inc.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are
6 * met: redistributions of source code must retain the above copyright
7 * notice, this list of conditions and the following disclaimer;
8 * redistributions in binary form must reproduce the above copyright

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

158
159 if (stopAfterCallbacks)
160 fatal("Simulation called sc_stop during elaboration.\n");
161}
162
163void
164Kernel::t0Handler()
165{
166 // Now that the event queue has started, mark all the processes that
167 // need to be initialized as ready to run.
168 //
169 // This event has greater priority than delta notifications and so will
170 // happen before them, honoring the ordering for the initialization phase
171 // in the spec. The delta phase will happen at normal priority, and then
172 // the event which runs the processes which is at a lower priority.
173 ::sc_gem5::scheduler.prepareForInit();
166 ::sc_gem5::scheduler.initPhase();
174
175 status(::sc_core::SC_RUNNING);
176}
177
178Kernel *kernel;
179
180} // namespace sc_gem5
181
182sc_gem5::Kernel *
183SystemC_KernelParams::create()
184{
185 panic_if(sc_gem5::kernel,
186 "Only one systemc kernel object may be defined.\n");
187 sc_gem5::kernel = new sc_gem5::Kernel(this);
188 return sc_gem5::kernel;
189}
167
168 status(::sc_core::SC_RUNNING);
169}
170
171Kernel *kernel;
172
173} // namespace sc_gem5
174
175sc_gem5::Kernel *
176SystemC_KernelParams::create()
177{
178 panic_if(sc_gem5::kernel,
179 "Only one systemc kernel object may be defined.\n");
180 sc_gem5::kernel = new sc_gem5::Kernel(this);
181 return sc_gem5::kernel;
182}