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 --- 21 unchanged lines hidden (view full) --- 30#include <memory> 31#include <string> 32#include <vector> 33 34#include "base/logging.hh" 35#include "systemc/core/kernel.hh" 36#include "systemc/core/module.hh" 37#include "systemc/core/process_types.hh" |
38#include "systemc/core/sensitivity.hh" |
39#include "systemc/ext/channel/sc_signal_in_if.hh" 40#include "systemc/ext/core/sc_module.hh" 41#include "systemc/ext/core/sc_module_name.hh" 42#include "systemc/ext/dt/bit/sc_logic.hh" 43#include "systemc/ext/utils/sc_report_handler.hh" 44 45namespace sc_gem5 46{ --- 193 unchanged lines hidden (view full) --- 240 241void 242sc_module::end_module() 243{ 244 _gem5_module->endModule(); 245} 246 247void |
248sc_module::reset_signal_is(const sc_in<bool> &port, bool val) |
249{ |
250 sc_gem5::newResetSensitivityPort( 251 ::sc_gem5::Process::newest(), &port, val, true); |
252} 253 254void |
255sc_module::reset_signal_is(const sc_inout<bool> &port, bool val) |
256{ |
257 sc_gem5::newResetSensitivityPort( 258 ::sc_gem5::Process::newest(), &port, val, true); |
259} 260 261void |
262sc_module::reset_signal_is(const sc_out<bool> &port, bool val) |
263{ |
264 sc_gem5::newResetSensitivityPort( 265 ::sc_gem5::Process::newest(), &port, val, true); |
266} 267 268void |
269sc_module::reset_signal_is(const sc_signal_in_if<bool> &signal, bool val) |
270{ |
271 sc_gem5::newResetSensitivitySignal( 272 ::sc_gem5::Process::newest(), &signal, val, true); |
273} 274 275 276void |
277sc_module::async_reset_signal_is(const sc_in<bool> &port, bool val) |
278{ |
279 sc_gem5::newResetSensitivityPort( 280 ::sc_gem5::Process::newest(), &port, val, false); |
281} 282 283void |
284sc_module::async_reset_signal_is(const sc_inout<bool> &port, bool val) |
285{ |
286 sc_gem5::newResetSensitivityPort( 287 ::sc_gem5::Process::newest(), &port, val, false); |
288} 289 290void |
291sc_module::async_reset_signal_is(const sc_out<bool> &port, bool val) |
292{ |
293 sc_gem5::newResetSensitivityPort( 294 ::sc_gem5::Process::newest(), &port, val, false); |
295} 296 297void |
298sc_module::async_reset_signal_is(const sc_signal_in_if<bool> &signal, bool val) |
299{ |
300 sc_gem5::newResetSensitivitySignal( 301 ::sc_gem5::Process::newest(), &signal, val, false); |
302} 303 304 305void 306sc_module::dont_initialize() 307{ 308 ::sc_gem5::Process::newest()->dontInitialize(true); 309} --- 320 unchanged lines hidden (view full) --- 630 631void 632wait(int n) 633{ 634 if (n <= 0) { 635 std::string msg = csprintf("n = %d", n); 636 SC_REPORT_ERROR("(E525) wait(n) is only valid for n > 0", msg.c_str()); 637 } |
638 sc_gem5::Process *p = sc_gem5::scheduler.current(); 639 p->waitCount(n - 1); 640 wait(); |
641} 642 643void 644wait(const sc_event &e) 645{ 646 sc_gem5::Process *p = sc_gem5::scheduler.current(); 647 if (waitErrorCheck(p)) 648 return; --- 174 unchanged lines hidden --- |