NSVD Reader  0.0.1
nodamushi::svd::normalized::bit_range Struct Reference

normalized bit range More...

#include <bit_range.hpp>

Public Member Functions

constexpr bool operator== (const bit_range &r) const noexcept
 
constexpr bool operator != (const bit_range &r) const noexcept
 
constexpr bool operator< (const bit_range &r) const noexcept
 
constexpr bool operator<= (const bit_range &r) const noexcept
 
constexpr bool operator > (const bit_range &r) const noexcept
 
constexpr bool operator >= (const bit_range &r) const noexcept
 
constexpr unsigned int width () const noexcept
 bit size More...
 
constexpr unsigned int size () const noexcept
 bit size More...
 
constexpr unsigned int left () const noexcept
 msb More...
 
constexpr unsigned int right () const noexcept
 lsb More...
 
constexpr unsigned int msb () const noexcept
 
constexpr unsigned int lsb () const noexcept
 
void msb (unsigned int x) noexcept
 set msb More...
 
void lsb (unsigned int x) noexcept
 set lsb More...
 
uint64_t get (uint64_t v)
 get the bit number of bit-range. More...
 
uint64_t bit (uint64_t v)
 get the bit of bit-range. More...
 
 bit_range (unsigned int x, unsigned int y)
 
 bit_range (const bit_range &)=default
 
 bit_range (bit_range &&)=default
 
template<typename T >
 bit_range (const T &n)
 

Detailed Description

normalized bit range

Definition at line 18 of file bit_range.hpp.

Constructor & Destructor Documentation

◆ bit_range() [1/4]

nodamushi::svd::normalized::bit_range::bit_range ( unsigned int  x,
unsigned int  y 
)
inline

Definition at line 67 of file bit_range.hpp.

◆ bit_range() [2/4]

nodamushi::svd::normalized::bit_range::bit_range ( const bit_range )
default

◆ bit_range() [3/4]

nodamushi::svd::normalized::bit_range::bit_range ( bit_range &&  )
default

◆ bit_range() [4/4]

template<typename T >
nodamushi::svd::normalized::bit_range::bit_range ( const T &  n)
inline

Definition at line 74 of file bit_range.hpp.

Member Function Documentation

◆ bit()

uint64_t nodamushi::svd::normalized::bit_range::bit ( uint64_t  v)
inline

get the bit of bit-range.

  • [3:3] : bit(8) = 8
  • [3:1] : bit(8) = 8
  • [3:3] : bit(0xFF) = 8
  • [3:2] : bit(0xFF) = 0xC

Definition at line 59 of file bit_range.hpp.

◆ get()

uint64_t nodamushi::svd::normalized::bit_range::get ( uint64_t  v)
inline

get the bit number of bit-range.

  • [3:3] : get(8) = 1
  • [3:1] : get(8) = 4

Definition at line 45 of file bit_range.hpp.

◆ left()

constexpr unsigned int nodamushi::svd::normalized::bit_range::left ( ) const
inlinenoexcept

msb

Definition at line 31 of file bit_range.hpp.

◆ lsb() [1/2]

constexpr unsigned int nodamushi::svd::normalized::bit_range::lsb ( ) const
inlinenoexcept

Definition at line 35 of file bit_range.hpp.

◆ lsb() [2/2]

void nodamushi::svd::normalized::bit_range::lsb ( unsigned int  x)
inlinenoexcept

set lsb

Definition at line 39 of file bit_range.hpp.

◆ msb() [1/2]

constexpr unsigned int nodamushi::svd::normalized::bit_range::msb ( ) const
inlinenoexcept

Definition at line 34 of file bit_range.hpp.

◆ msb() [2/2]

void nodamushi::svd::normalized::bit_range::msb ( unsigned int  x)
inlinenoexcept

set msb

Definition at line 37 of file bit_range.hpp.

◆ operator !=()

constexpr bool nodamushi::svd::normalized::bit_range::operator != ( const bit_range r) const
inlinenoexcept

Definition at line 21 of file bit_range.hpp.

◆ operator >()

constexpr bool nodamushi::svd::normalized::bit_range::operator > ( const bit_range r) const
inlinenoexcept

Definition at line 24 of file bit_range.hpp.

◆ operator >=()

constexpr bool nodamushi::svd::normalized::bit_range::operator >= ( const bit_range r) const
inlinenoexcept

Definition at line 25 of file bit_range.hpp.

◆ operator<()

constexpr bool nodamushi::svd::normalized::bit_range::operator< ( const bit_range r) const
inlinenoexcept

Definition at line 22 of file bit_range.hpp.

◆ operator<=()

constexpr bool nodamushi::svd::normalized::bit_range::operator<= ( const bit_range r) const
inlinenoexcept

Definition at line 23 of file bit_range.hpp.

◆ operator==()

constexpr bool nodamushi::svd::normalized::bit_range::operator== ( const bit_range r) const
inlinenoexcept

Definition at line 20 of file bit_range.hpp.

◆ right()

constexpr unsigned int nodamushi::svd::normalized::bit_range::right ( ) const
inlinenoexcept

lsb

Definition at line 33 of file bit_range.hpp.

◆ size()

constexpr unsigned int nodamushi::svd::normalized::bit_range::size ( ) const
inlinenoexcept

bit size

Definition at line 29 of file bit_range.hpp.

◆ width()

constexpr unsigned int nodamushi::svd::normalized::bit_range::width ( ) const
inlinenoexcept

bit size

Definition at line 27 of file bit_range.hpp.


The documentation for this struct was generated from the following file: