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 --- 34 unchanged lines hidden (view full) --- 43namespace sc_core 44{ 45 46sc_prim_channel::sc_prim_channel() : _gem5_channel(nullptr) 47{ 48 if (sc_is_running()) { 49 SC_REPORT_ERROR("(E113) insert primitive channel failed", 50 "simulation running"); |
51 } 52 if (::sc_gem5::scheduler.elaborationDone()) { |
53 SC_REPORT_ERROR("(E113) insert primitive channel failed", 54 "elaboration done"); |
55 } |
56 _gem5_channel = new sc_gem5::Channel(this); |
57} 58 59sc_prim_channel::sc_prim_channel(const char *_name) : 60 sc_object(_name), _gem5_channel(nullptr) 61{ 62 if (sc_is_running()) { 63 SC_REPORT_ERROR("(E113) insert primitive channel failed", 64 "simulation running"); |
65 } 66 if (::sc_gem5::scheduler.elaborationDone()) { |
67 SC_REPORT_ERROR("(E113) insert primitive channel failed", 68 "elaboration done"); |
69 } |
70 _gem5_channel = new sc_gem5::Channel(this); |
71} 72 73sc_prim_channel::~sc_prim_channel() { delete _gem5_channel; } 74 75void 76sc_prim_channel::request_update() 77{ 78 _gem5_channel->requestUpdate(); --- 167 unchanged lines hidden --- |