9 #ifndef __NODAMUSHI_SVD_NORMALIZED_REGISTER_HPP__ 10 #define __NODAMUSHI_SVD_NORMALIZED_REGISTER_HPP__ 29 template<
typename STRREF>
struct Register
122 if(p && p->has_register_name_appendix()){
124 if(! p->prependToName.empty())
125 s << p->prependToName;
126 if(p->appendToName.empty())
131 size_t l =
name.length()-3;
133 if(
name[l] ==
'[')
break;
137 s.write(
name.data(),l);
144 s << p->appendToName;
225 template<
typename STR>
228 const size_t ps = p.size();
232 if(ps == pindex + 1)
return c;
233 else return c->find(p,pindex+1);
244 template<
typename STR>
247 const size_t ps = p.
size();
281 if(n.svd.derivedFrom)
285 if(n.dim && n.dim.index!=0){
293 for(
const auto& f:n.fields)
297 {
return a.
lsb() < b.
lsb();});
317 namespace nv = ::nodamushi::visitor;
323 if(ret == r::BREAK)
return ret;
324 if(ret == r::SKIP)
return r::CONTINUE;
332 #endif // __NODAMUSHI_SVD_NORMALIZED_REGISTER_HPP__ normalized <writeConstraint> element
uint64_t calc_address(const O &o, uint64_t offset=0)
auto make_dim_displayName_helper(const NODE &n) -> dim_name_helper< typename decltype(n.displayName)::type >
std::shared_ptr< T > node_ptr
node_ptr< Peripheral const > get_peripheral() const noexcept
find the Peripheral to which this register belongs.
#define __NORMALIZED_DERIVED_FROM(name)
__NORMALIZED_DERIVED_FROM(name)
__NX_NORM_HANDLE_VISIT(Enumeration)
size_t size() const noexcept
dim_info dim
dimemsion information object.
uint64_t get_address_offset() const
a relative address from the baseAddress of the peripheral
STRREF description
<description>
uint32_t get_size() const
resolve the value of size and return it.
nullable< uint64_t > resetMask
<resetMask>
Protection get_protection() const
resolve the value of protection and return it.
nullable< DataType > dataType
<dataType>
WriteConstraint writeConstraint
<writeConstraint>
nullable< uint32_t > size
<size>
const std::string & string_ref
STRREF alternateGroup
<alternateGroup>
parent_ptr< Cluster > p2_ptr
path< STRREF > derivedFrom
derivedFrom attribute
node_ptr< void > find(const ::nodamushi::svd::path< STR > &p, size_t pindex=0)
find path element
constexpr bool is_array() const noexcept
is the dimension type array
node_ptr< Peripheral > get_peripheral() noexcept
find the Peripheral to which this register belongs.
::nodamushi::svd::path get_path() const
get path
uint64_t get_resetValue() const
resolve the value of resetValue and return it.
ReadAction readAction
<readAction>
STRREF alternateRegister
<alternateRegister>
container class decralation
node_ptr< Cluster const > get_parent2() const noexcept
parent cluster pointer or nullptr.
ModifiedWriteValues get_modifiedWriteValues() const
resolve the value of modifiedWriteValues and return it.
Access get_access() const
resolve the value of access and return it.
node_ptr< Cluster > get_parent2() noexcept
get parent cluster pointer
void update_parent_of_children(list< T > &l, node_ptr< You > &you)
std::weak_ptr< Parent > parent_ptr
list< Field > fields
<field> elements list. This list is sorted by lsb of field. Field class does not prohibit copying,...
DataType get_dataType() const
resolve the dataType. The default type is determined by the size.(size=8 : uint8_t,...
Register< STRREF > this_t
ModifiedWriteValues modifiedWriteValues
<modifiedWriteValues>
normalized <writeConstraint>.<range> element
nullable< uint64_t > resetValue
<resetValue>
T get(T defaultValue) const noexcept
unsigned int lsb() const
get lsb bit index.
uint64_t get_address() const
calculate an absolute address
nullable< Protection > protection
<protection>
Access
Read/Write Access type enum.<access> Read-Write/Read-Only/Write-Only/Write-Once/Read- Write Once.
dim,dimIndex,array information object.
std::string name
<name> of this register without peripheral.prependToName and peripheral.appendToName
void path_helper(const O &o,::nodamushi::svd::path< S > &path)
parent_ptr< Peripheral > p_ptr
normalized peripheral element
DataType
register data type
#define __NORMALIZED_DERIVED_FROM_MEMBER(name)
Protection
<protection> enum
node_ptr< Peripheral const > get_parent() const noexcept
std::string displayName
<displayName>
uint64_t calc_offset(const O &o, uint64_t offset=0)
node_ptr< R > __find_helper(list< R > &v, string_ref n)
uint64_t get_resetMask() const
resolve the value of resetMask and return it.
std::string get_name_with_appendix() const noexcept
get name with peripheral.prependToName and peripheral.appendToName
node_ptr< Peripheral< STRREF > > find_parent_peripheral(O< STRREF > &o)
node_ptr< Peripheral > get_parent() noexcept
get parent cluster pointer
ReadAction get_readAction() const
ReadAction
<register>.<readAction> enum
uint64_t addressOffset
<addressOffset>
#define __NORMALIZED_DERIVED_FROM_HELPER(name)
node_ptr< Field > find_field(::nodamushi::svd::path< STR > &p, size_t pindex=0)
find field element
void update_parent(p_ptr &new_parent, node_ptr< this_t > &me)
nullable< Access > access
<access>