sc_module.hh (13091:81fceed26e1e) sc_module.hh (13135:4bb2f323fb1a)
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

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

284
285#define SC_METHOD(name) \
286 { \
287 ::sc_gem5::Process *p = \
288 ::sc_gem5::newMethodProcess( \
289 #name, new ::sc_gem5::ProcessMemberFuncWrapper< \
290 SC_CURRENT_USER_MODULE>(this, \
291 &SC_CURRENT_USER_MODULE::name)); \
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

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

284
285#define SC_METHOD(name) \
286 { \
287 ::sc_gem5::Process *p = \
288 ::sc_gem5::newMethodProcess( \
289 #name, new ::sc_gem5::ProcessMemberFuncWrapper< \
290 SC_CURRENT_USER_MODULE>(this, \
291 &SC_CURRENT_USER_MODULE::name)); \
292 this->sensitive << p; \
292 if (p) \
293 this->sensitive << p; \
293 }
294#define SC_THREAD(name) \
295 { \
296 ::sc_gem5::Process *p = \
297 ::sc_gem5::newThreadProcess( \
298 #name, new ::sc_gem5::ProcessMemberFuncWrapper< \
299 SC_CURRENT_USER_MODULE>(this, \
300 &SC_CURRENT_USER_MODULE::name)); \
294 }
295#define SC_THREAD(name) \
296 { \
297 ::sc_gem5::Process *p = \
298 ::sc_gem5::newThreadProcess( \
299 #name, new ::sc_gem5::ProcessMemberFuncWrapper< \
300 SC_CURRENT_USER_MODULE>(this, \
301 &SC_CURRENT_USER_MODULE::name)); \
301 this->sensitive << p; \
302 if (p) \
303 this->sensitive << p; \
302 }
303#define SC_CTHREAD(name, clk) \
304 { \
305 ::sc_gem5::Process *p = \
306 ::sc_gem5::newCThreadProcess( \
307 #name, new ::sc_gem5::ProcessMemberFuncWrapper< \
308 SC_CURRENT_USER_MODULE>(this, \
309 &SC_CURRENT_USER_MODULE::name)); \
304 }
305#define SC_CTHREAD(name, clk) \
306 { \
307 ::sc_gem5::Process *p = \
308 ::sc_gem5::newCThreadProcess( \
309 #name, new ::sc_gem5::ProcessMemberFuncWrapper< \
310 SC_CURRENT_USER_MODULE>(this, \
311 &SC_CURRENT_USER_MODULE::name)); \
310 this->sensitive << p; \
311 this->sensitive << clk; \
312 if (p) { \
313 this->sensitive << p; \
314 this->sensitive << clk; \
315 } \
312 }
313
314// Nonstandard
315// Documentation for this is very scarce, but it looks like it's supposed to
316// stop the currently executing cthread, or if a cthread isn't running report
317// an error.
318void halt();
319void at_posedge(const sc_signal_in_if<bool> &);

--- 40 unchanged lines hidden ---
316 }
317
318// Nonstandard
319// Documentation for this is very scarce, but it looks like it's supposed to
320// stop the currently executing cthread, or if a cthread isn't running report
321// an error.
322void halt();
323void at_posedge(const sc_signal_in_if<bool> &);

--- 40 unchanged lines hidden ---