9 #ifndef __NODAMUSHI_SVD_NORMALIZED_NODE_CONTAINER_HPP__ 10 #define __NODAMUSHI_SVD_NORMALIZED_NODE_CONTAINER_HPP__ 48 template<
typename STRREF>
struct Device;
50 template<
typename STRREF>
struct Cluster;
52 template<
typename STRREF>
struct Field;
54 template<
typename STRREF>
struct Cpu;
57 template<
typename T>
using node_ptr = std::shared_ptr<T>;
58 template<
typename Parent>
using parent_ptr= std::weak_ptr<Parent>;
61 template<
typename T,
typename... ARGS>
64 return std::make_shared<T>(std::forward<ARGS>(args)...);
68 template<
typename PTR>
72 static uint32_t
get_size(T p){
return p->get_size();}
89 template<
typename T,
typename You>
97 ptr->update_parent(_you,ptr);
101 template<
typename O,
typename S>
104 if(
auto p = o.get_parent()){
106 }
else if(
auto p=o.get_parent2()){
111 template<
typename O,
typename S>
118 template<
typename STRREF,
template<
class>
class O>
120 if(
auto p = o.get_parent()){
122 }
else if(
auto p=o.get_parent2()){
127 template<
typename STRREF,
template<
class>
class O>
129 if(
auto p = o.get_parent()){
131 }
else if(
auto p=o.get_parent2()){
137 template<
typename STRREF,
template<
class>
class O>
139 if(
auto p = o->get_parent()){
141 }
else if(
auto p=o->get_parent2()){
147 template<
typename STRREF,
template<
class>
class O>
149 if(
auto p = o->get_parent()){
151 }
else if(
auto p=o->get_parent2()){
157 template<
typename STRREF>
159 template<
typename STRREF>
161 template<
typename STRREF>
163 template<
typename STRREF>
170 offset += o.addressOffset;
171 if(
auto ptr = o.get_parent())
173 else if(
auto ptr = o.get_parent2())
185 offset += o.addressOffset;
186 if(
auto ptr = o.get_parent())
188 else if(
auto ptr = o.get_parent2())
201 if(
auto ptr = o.get_parent()){
203 }
else if(
auto ptr = o.get_parent2()){
211 if(
auto ptr = o.get_parent()){
213 }
else if(
auto ptr = o.get_parent2()){
216 return static_cast<Access>(0);
221 if(
auto ptr = o.get_parent()){
224 return static_cast<Access>(0);
229 if(
auto ptr = o.get_parent()){
231 }
else if(
auto ptr = o.get_parent2()){
234 return static_cast<Protection>(0);
239 if(
auto ptr = o.get_parent()){
241 }
else if(
auto ptr = o.get_parent2()){
249 if(
auto ptr = o.get_parent()){
251 }
else if(
auto ptr = o.get_parent2()){
259 if(
auto ptr = o.get_parent()){
262 return static_cast<ModifiedWriteValues>(0);
266 if(
auto ptr = o.get_parent()){
269 return static_cast<ReadAction>(0);
277 auto s = r.get_size();
304 static constexpr uint32_t
get_size(
const void*){
return 0;}
315 template<
typename STRREF,
typename STR,
typename V>
319 #endif // __NODAMUSHI_SVD_NORMALIZED_NODE_CONTAINER_HPP__ uint64_t baseAddress
base address
boxvec. vector<pointer<X>>
uint64_t calc_address(const O &o, uint64_t offset=0)
uint64_t get_default_resetValue(const O &o) noexcept
static ModifiedWriteValues get_modifiedWriteValues(T p)
Define <protection> enum.
static constexpr ReadAction get_readAction(const void *)
std::shared_ptr< T > node_ptr
ModifiedWriteValues get_default_modifiedWriteValues(const O &o)
static uint32_t get_size(T p)
uint32_t get_default_size(const O &o) noexcept
Define <readAction> enum.
vec_t::iterator ptr_begin() noexcept
static uint64_t get_resetMask(T p)
size_type size() const noexcept
uint64_t get_default_resetMask(const O &o)
node_ptr< T > make_node_ptr(ARGS &&... args)
static ReadAction get_readAction(T p)
Protection get_default_protection(const O &o) noexcept
path< STR > & add_name(string_ref p)
const std::string & string_ref
static constexpr uint64_t get_resetValue(const void *)
static constexpr uint64_t get_address(const void *)
static constexpr ModifiedWriteValues get_modifiedWriteValues(const void *)
Access get_default_access(const O &o) noexcept
DataType get_default_dataType(const O &r) noexcept
void update_parent_of_children(list< T > &l, node_ptr< You > &you)
ReadAction get_default_readAction(const O &o)
std::weak_ptr< Parent > parent_ptr
static Access get_access(T p)
static Protection get_protection(T p)
static constexpr Protection get_protection(const void *)
Access
Read/Write Access type enum.<access> Read-Write/Read-Only/Write-Only/Write-Once/Read- Write Once.
void path_helper(const O &o,::nodamushi::svd::path< S > &path)
vec_t::iterator ptr_end() noexcept
static constexpr Access get_access(const void *)
Access get_default_fieldaccess(const O &o) noexcept
normalized peripheral element
Security Attribution Unit(SAU).
DataType
register data type
names,dispalyNames->name0,displayName1
Protection
<protection> enum
uint64_t calc_offset(const O &o, uint64_t offset=0)
node_ptr< R > __find_helper(list< R > &v, string_ref n)
Define <modifiedWriteValues> enum.
node_ptr< Peripheral< STRREF > > find_parent_peripheral(O< STRREF > &o)
static uint64_t get_resetValue(T p)
ReadAction
<register>.<readAction> enum
static constexpr uint64_t get_resetMask(const void *)
normalized <enumeratedValues> element. iterable
static constexpr uint32_t get_size(const void *)