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 --- 17 unchanged lines hidden (view full) --- 26 * 27 * Authors: Gabe Black 28 */ 29 30#ifndef __SYSTEMC_EXT_CHANNEL_SC_SIGNAL_RV_HH__ 31#define __SYSTEMC_EXT_CHANNEL_SC_SIGNAL_RV_HH__ 32 33#include "../core/sc_module.hh" // for sc_gen_unique_name |
34#include "../dt/bit/sc_logic.hh" 35#include "../dt/bit/sc_lv.hh" 36#include "sc_signal.hh" 37 |
38namespace sc_gem5 39{ 40 41class Process; 42Process *getCurrentProcess(); 43 44} // namespace sc_gem5 45 |
46namespace sc_dt 47{ 48 49template <int W> 50class sc_lv; 51 52}; 53 --- 14 unchanged lines hidden (view full) --- 68 {} 69 virtual ~sc_signal_rv() {} 70 71 virtual void register_port(sc_port_base &, const char *) {} 72 73 virtual void 74 write(const sc_dt::sc_lv<W> &l) 75 { |
76 ::sc_gem5::Process *p = ::sc_gem5::getCurrentProcess(); |
77 78 auto it = inputs.find(p); 79 if (it == inputs.end()) { 80 inputs.emplace(p, l); 81 this->request_update(); 82 } else if (it->second != l) { 83 it->second = l; 84 this->request_update(); --- 57 unchanged lines hidden --- |