kernel.cc (13403:cebee63981d3) kernel.cc (13701:d84e5d2979a7)
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

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

98 status(::sc_core::SC_END_OF_ELABORATION);
99 for (auto p: allPorts)
100 p->sc_port_base()->end_of_elaboration();
101 for (auto m: sc_gem5::allModules)
102 m->endOfElaboration();
103 for (auto c: sc_gem5::allChannels)
104 c->sc_chan()->end_of_elaboration();
105 } catch (...) {
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

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

98 status(::sc_core::SC_END_OF_ELABORATION);
99 for (auto p: allPorts)
100 p->sc_port_base()->end_of_elaboration();
101 for (auto m: sc_gem5::allModules)
102 m->endOfElaboration();
103 for (auto c: sc_gem5::allChannels)
104 c->sc_chan()->end_of_elaboration();
105 } catch (...) {
106 ::sc_gem5::scheduler.throwToScMain();
106 ::sc_gem5::scheduler.throwUp();
107 }
108}
109
110void
111Kernel::startup()
112{
113 if (scMainFiber.finished())
114 return;

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

122 status(::sc_core::SC_START_OF_SIMULATION);
123 for (auto p: allPorts)
124 p->sc_port_base()->start_of_simulation();
125 for (auto m: sc_gem5::allModules)
126 m->startOfSimulation();
127 for (auto c: sc_gem5::allChannels)
128 c->sc_chan()->start_of_simulation();
129 } catch (...) {
107 }
108}
109
110void
111Kernel::startup()
112{
113 if (scMainFiber.finished())
114 return;

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

122 status(::sc_core::SC_START_OF_SIMULATION);
123 for (auto p: allPorts)
124 p->sc_port_base()->start_of_simulation();
125 for (auto m: sc_gem5::allModules)
126 m->startOfSimulation();
127 for (auto c: sc_gem5::allChannels)
128 c->sc_chan()->start_of_simulation();
129 } catch (...) {
130 ::sc_gem5::scheduler.throwToScMain();
130 ::sc_gem5::scheduler.throwUp();
131 }
132
133 startComplete = true;
134
135 if (stopAfterCallbacks)
136 stopWork();
137
138 kernel->status(::sc_core::SC_RUNNING);

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

154 try {
155 for (auto p: allPorts)
156 p->sc_port_base()->end_of_simulation();
157 for (auto m: sc_gem5::allModules)
158 m->endOfSimulation();
159 for (auto c: sc_gem5::allChannels)
160 c->sc_chan()->end_of_simulation();
161 } catch (...) {
131 }
132
133 startComplete = true;
134
135 if (stopAfterCallbacks)
136 stopWork();
137
138 kernel->status(::sc_core::SC_RUNNING);

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

154 try {
155 for (auto p: allPorts)
156 p->sc_port_base()->end_of_simulation();
157 for (auto m: sc_gem5::allModules)
158 m->endOfSimulation();
159 for (auto c: sc_gem5::allChannels)
160 c->sc_chan()->end_of_simulation();
161 } catch (...) {
162 ::sc_gem5::scheduler.throwToScMain();
162 ::sc_gem5::scheduler.throwUp();
163 }
164
165 endComplete = true;
166
167 status(::sc_core::SC_STOPPED);
168}
169
170void

--- 24 unchanged lines hidden ---
163 }
164
165 endComplete = true;
166
167 status(::sc_core::SC_STOPPED);
168}
169
170void

--- 24 unchanged lines hidden ---