9 #ifndef __NODAMUSHI_SVD_NORMALIZED_CLUSTER_HPP__ 10 #define __NODAMUSHI_SVD_NORMALIZED_CLUSTER_HPP__ 185 template<
typename STR>
188 const size_t ps = p.
size();
192 if(ps == pindex +1)
return c;
193 else return c->find(p,pindex+1);
196 if(ps == pindex +1)
return c;
197 else return c->find(p,pindex+1);
208 template<
typename STR>
211 const size_t ps = p.
size();
215 if(ps == pindex +1)
return c;
216 else return c->find_cluster(p,pindex+1);
227 template<
typename STR>
230 const size_t ps = p.
size();
235 return c->find_register(p,pindex+1);
236 }
else if(ps == pindex + 1){
248 template<
typename STR>
251 const size_t ps = p.
size();
256 return c->find_field(p,pindex+1);
257 }
else if(ps == pindex + 2){
259 return c->find_field(p,pindex+1);
296 if(n.svd.derivedFrom)
299 if(n.dim && n.dim.index!=0){
307 for(
const auto& c:n.clusters)
309 for(
const auto& c:n.registers)
349 namespace nv = ::nodamushi::visitor;
354 if(ret == r::BREAK)
return r::BREAK;
355 if(ret == r::SKIP)
return r::CONTINUE;
358 if(ret == r::BREAK)
return r::BREAK;
364 #endif // __NODAMUSHI_SVD_NORMALIZED_CLUSTER_HPP__ ::nodamushi::svd::path get_path() const
this cluster path
uint64_t calc_address(const O &o, uint64_t offset=0)
std::shared_ptr< T > node_ptr
#define __NORMALIZED_DERIVED_FROM(name)
__NORMALIZED_DERIVED_FROM(name)
__NX_NORM_HANDLE_VISIT(Enumeration)
size_t size() const noexcept
node_ptr< Cluster const > get_parent2() const noexcept
get parent cluster pointer
nullable< uint64_t > resetMask
<resetMask>
Access get_access() const
resolve the value of access and return it.
node_ptr< Peripheral > get_parent() noexcept
get parent peripheral pointer
nullable< Access > access
<access>
uint64_t addressOffset
<addressOffset>.
const std::string & string_ref
parent_ptr< Peripheral< STRREF > > p_ptr
list< Register > registers
<register> elements list. This list is sorted by the addressOffset.
node_ptr< Cluster > find_cluster(::nodamushi::svd::path< STR > &p, size_t pindex=0)
find cluster element
node_ptr< Cluster > get_parent2() noexcept
get parent cluster pointer
uint64_t get_address() const
calculate an absolute address.
node_ptr< Field > find_field(::nodamushi::svd::path< STR > &p, size_t pindex=0)
find field element
node_ptr< Register > find_register(::nodamushi::svd::path< STR > &p, size_t pindex=0)
find register element
container class decralation
nullable< uint64_t > resetValue
<resetValue>
path< STRREF > derivedFrom
derivedFrom attribute
parent_ptr< Cluster< STRREF > > p2_ptr
node_ptr< void > find(::nodamushi::svd::path< STR > &p, size_t pindex=0)
find path element
uint64_t get_resetValue() const
resolve the value of resetValue and return it.
Protection get_protection() const
resolve the value of protection and return it.
void update_parent(p_ptr &new_parent, node_ptr< this_t > &me)
set the peripheral parent
void update_parent_of_children(list< T > &l, node_ptr< You > &you)
std::weak_ptr< Parent > parent_ptr
STRREF headerStructName
<headerStructName>
uint64_t get_resetMask() const
resolve the value of resetMask and return it.
dim_info dim
dimemsion information object.
T get(T defaultValue) const noexcept
Access
Read/Write Access type enum.<access> Read-Write/Read-Only/Write-Only/Write-Once/Read- Write Once.
dim,dimIndex,array information object.
Cluster(const T &n)
This constructor is for normalizer.
void path_helper(const O &o,::nodamushi::svd::path< S > &path)
uint32_t get_size() const
resolve the value of size and return it.
node_ptr< Peripheral const > get_parent() const noexcept
get parent peripheral pointer
normalized peripheral element
node_ptr< Peripheral const > get_peripheral() const noexcept
get the Peripheral to which this cluster belongs.
uint64_t get_address_offset() const
a relative address from the baseAddress of the Peripheral to which this cluster belongs
Protection
<protection> enum
list< Cluster > clusters
<cluster> elements list. This list is sorted by the addressOffset.
uint64_t calc_offset(const O &o, uint64_t offset=0)
nullable< Protection > protection
<protection>
node_ptr< R > __find_helper(list< R > &v, string_ref n)
STRREF alternateCluster
<alternateCluster>
node_ptr< Peripheral > get_peripheral() noexcept
get the Peripheral to which this cluster belongs.
node_ptr< Peripheral< STRREF > > find_parent_peripheral(O< STRREF > &o)
STRREF description
<description>
nullable< uint32_t > size
<size> default bit-width of registers.
uint64_t addressOffset
<addressOffset>
#define __NORMALIZED_DERIVED_FROM_HELPER(name)