sc_main.cc (13061:9b868a2ab73c) sc_main.cc (13077:0037323cb4dd)
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

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

57
58class ScMainFiber : public Fiber
59{
60 void
61 main()
62 {
63 if (::sc_main) {
64 ::sc_main(_argc, _argv);
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

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

57
58class ScMainFiber : public Fiber
59{
60 void
61 main()
62 {
63 if (::sc_main) {
64 ::sc_main(_argc, _argv);
65 // Make sure no systemc events/notifications are scheduled
66 // after sc_main returns.
67 ::sc_gem5::Kernel::scMainFinished(true);
68 ::sc_gem5::scheduler.clear();
65 } else {
66 // If python tries to call sc_main but no sc_main was defined...
67 fatal("sc_main called but not defined.\n");
68 }
69 }
70};
71
72ScMainFiber scMainFiber;

--- 239 unchanged lines hidden ---
69 } else {
70 // If python tries to call sc_main but no sc_main was defined...
71 fatal("sc_main called but not defined.\n");
72 }
73 }
74};
75
76ScMainFiber scMainFiber;

--- 239 unchanged lines hidden ---