17 #ifndef _SYSC_RESOURCE_ACCESS_IF_H_
18 #define _SYSC_RESOURCE_ACCESS_IF_H_
22 #include <sysc/kernel/sc_time.h>
39 virtual std::size_t
size()
const = 0;
56 virtual bool write(
const uint8_t* data, std::size_t length, uint64_t offset, sc_core::sc_time& d) = 0;
57 inline bool write(
const uint8_t* data, std::size_t length, uint64_t offset = 0) {
59 return write(data, length, offset, d);
71 virtual bool read(uint8_t* data, std::size_t length, uint64_t offset, sc_core::sc_time& d)
const = 0;
72 inline bool read(uint8_t* data, std::size_t length, uint64_t offset = 0)
const {
74 return read(data, length, offset, d);
86 virtual bool write_dbg(
const uint8_t* data, std::size_t length, uint64_t offset = 0) = 0;
96 virtual bool read_dbg(uint8_t* data, std::size_t length, uint64_t offset = 0)
const = 0;
120 virtual std::size_t
size() = 0;
144 virtual reference at(std::size_t idx) = 0;
interface defining access to an indexed resource e.g. register file
virtual std::size_t size()=0
get the size of the resource
virtual const_reference operator[](std::size_t idx) const noexcept=0
get value at index
virtual reference operator[](std::size_t idx) noexcept=0
get value at index
interface defining access to a resource e.g. a register
virtual std::size_t size() const =0
return the size of 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
virtual void reset()=0
reset the resource
virtual bool write_dbg(const uint8_t *data, std::size_t length, uint64_t offset=0)=0
debug write to the resource