sc_export.cc (13203:76ee4971fd9e) | sc_export.cc (13238:3521d1f59c22) |
---|---|
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 --- 44 unchanged lines hidden (view full) --- 53} 54 55} 56 57sc_export_base::sc_export_base(const char *n) : sc_object(n) 58{ 59 if (sc_is_running()) { 60 reportError("(E121) insert sc_export failed", "simulation running", | 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 --- 44 unchanged lines hidden (view full) --- 53} 54 55} 56 57sc_export_base::sc_export_base(const char *n) : sc_object(n) 58{ 59 if (sc_is_running()) { 60 reportError("(E121) insert sc_export failed", "simulation running", |
61 n, kind()); | 61 name(), kind()); |
62 } 63 if (::sc_gem5::scheduler.elaborationDone()) { 64 reportError("(E121) insert sc_export failed", "elaboration done", | 62 } 63 if (::sc_gem5::scheduler.elaborationDone()) { 64 reportError("(E121) insert sc_export failed", "elaboration done", |
65 n, kind()); | 65 name(), kind()); |
66 } 67 68 ::sc_gem5::Module *m = ::sc_gem5::currentModule(); 69 if (!m) { 70 reportError("(E122) sc_export specified outside of module", | 66 } 67 68 ::sc_gem5::Module *m = ::sc_gem5::currentModule(); 69 if (!m) { 70 reportError("(E122) sc_export specified outside of module", |
71 nullptr, n, kind()); | 71 nullptr, name(), kind()); |
72 } else { 73 m->exports.push_back(this); 74 } 75} 76sc_export_base::~sc_export_base() {} 77 78} // namespace sc_core | 72 } else { 73 m->exports.push_back(this); 74 } 75} 76sc_export_base::~sc_export_base() {} 77 78} // namespace sc_core |