scc 2025.09
SystemC components library
scc::sc_register_masked< DATATYPE, WRMASK, RDMASK > Class Template Reference

#include <register.h>

Inheritance diagram for scc::sc_register_masked< DATATYPE, WRMASK, RDMASK >:
Collaboration diagram for scc::sc_register_masked< DATATYPE, WRMASK, RDMASK >:

Public Member Functions

 sc_register_masked (sc_core::sc_module_name nm, DATATYPE &storage, const DATATYPE reset_val, resetable &owner)
Public Member Functions inherited from scc::impl::sc_register< DATATYPE >
 sc_register (sc_core::sc_module_name nm, DATATYPE &storage, const DATATYPE reset_val, resetable &owner, DATATYPE rdmask=get_max_uval< DATATYPE >(), DATATYPE wrmask=get_max_uval< DATATYPE >())
 the constructor
 ~sc_register ()=default
 desctructor
bool is_trace_enabled () const override
 returns of this component shall be traced
size_t size () const override
 get the size of this register in bytes
void reset () override
 reset the register
bool write (const uint8_t *data, size_t length, uint64_t offset, sc_core::sc_time &d) override
 write function from resource_access_if
bool read (uint8_t *data, size_t length, uint64_t offset, sc_core::sc_time &d) const override
 read function from resource_access_if
bool write_dbg (const uint8_t *data, size_t length, uint64_t offset=0) override
 debug write function from resource_access_if
bool read_dbg (uint8_t *data, size_t length, uint64_t offset=0) const override
 debug read function from resource_access_if
 operator DATATYPE () const
 cast operator to get underlying storage
DATATYPE get () const
 get the underlying storage
void put (DATATYPE data) const
 write to the underlying storage
this_type & operator= (DATATYPE other)
 assignment operator
this_type & operator|= (DATATYPE other)
 unary or
this_type & operator&= (DATATYPE other)
 unary and
void set_read_cb (std::function< bool(const this_type &, DATATYPE &)> read_cb)
 set the read callback
void set_read_cb (std::function< bool(const this_type &, DATATYPE &, sc_core::sc_time &)> read_cb)
 set the read callback
void set_write_cb (std::function< bool(this_type &, const DATATYPE &)> write_cb)
 set the write callback
void set_write_cb (std::function< bool(this_type &, const DATATYPE &, sc_core::sc_time &)> write_cb)
 set the write callback triggered upon a write request
void trace (sc_core::sc_trace_file *trf) const override
 trace the register value to the given trace file
Public Member Functions inherited from scc::resource_access_if
virtual bool write (const uint8_t *data, std::size_t length, uint64_t offset, sc_core::sc_time &d)=0
bool write (const uint8_t *data, std::size_t length, uint64_t offset=0)
virtual bool read (uint8_t *data, std::size_t length, uint64_t offset, sc_core::sc_time &d) const =0
bool read (uint8_t *data, std::size_t length, uint64_t offset=0) const
virtual bool write_dbg (const uint8_t *data, std::size_t length, uint64_t offset=0)=0
 debug write to the resource
virtual bool read_dbg (uint8_t *data, std::size_t length, uint64_t offset=0) const =0
 debug read the data from the resource

Additional Inherited Members

Public Types inherited from scc::impl::sc_register< DATATYPE >
using this_type = sc_register<DATATYPE>
Public Attributes inherited from scc::impl::sc_register< DATATYPE >
cci::cci_param< bool > enable_tracing
const DATATYPE res_val
 the reset value
const DATATYPE rdmask
 the SW read mask
const DATATYPE wrmask
 the SW write mask

Detailed Description

template<typename DATATYPE, DATATYPE WRMASK = impl::get_max_uval<DATATYPE>(), DATATYPE RDMASK = impl::get_max_uval<DATATYPE>()>
class scc::sc_register_masked< DATATYPE, WRMASK, RDMASK >

alias class to map template argument read an write mask to constructor arguments

Definition at line 470 of file register.h.

Constructor & Destructor Documentation

◆ sc_register_masked()

template<typename DATATYPE, DATATYPE WRMASK = impl::get_max_uval<DATATYPE>(), DATATYPE RDMASK = impl::get_max_uval<DATATYPE>()>
scc::sc_register_masked< DATATYPE, WRMASK, RDMASK >::sc_register_masked ( sc_core::sc_module_name nm,
DATATYPE & storage,
const DATATYPE reset_val,
resetable & owner )
inline

Definition at line 472 of file register.h.


The documentation for this class was generated from the following file:
  • /home/eyck/Projects/MINRES/SystemC-Components/src/components/scc/register.h