CIRCT
18.0.0git
|
The [a:b]
part in a vector/array type such as logic [a:b]
.
More...
#include <MooreTypes.h>
Public Member Functions | |
Range (unsigned size) | |
Construct a range [size-1:0] . More... | |
Range (unsigned size, RangeDir dir, int offset) | |
Construct a range [offset+size-1:offset] if dir is Down , or [offset:offset+size-1] if dir is Up . More... | |
Range (int left, int right) | |
Construct a range [left:right], with the direction inferred as Downif left >= right, or Up` otherwise. More... | |
bool | operator== (const Range &other) const |
int | left () const |
Get the $left dimension. More... | |
int | right () const |
Get the $right dimension. More... | |
int | low () const |
Get the $low dimension. More... | |
int | high () const |
Get the $high dimension. More... | |
int | increment () const |
Get the $increment size. More... | |
std::string | toString () const |
Format this range as a string. More... | |
Public Attributes | |
unsigned | size |
The total number of bits, given as |a-b|+1 . More... | |
RangeDir | dir |
The direction of the vector, i.e. whether a > b or a < b . More... | |
int | offset |
The starting offset of the range. More... | |
The [a:b]
part in a vector/array type such as logic [a:b]
.
Definition at line 62 of file MooreTypes.h.
|
inlineexplicit |
Construct a range [size-1:0]
.
Definition at line 71 of file MooreTypes.h.
References circt::moore::Down.
|
inline |
Construct a range [offset+size-1:offset]
if dir
is Down
, or [offset:offset+size-1]
if dir
is Up
.
Definition at line 75 of file MooreTypes.h.
|
inline |
Construct a range [left:right], with the direction inferred as
Downif
left >= right, or
Up` otherwise.
Definition at line 80 of file MooreTypes.h.
References dir, circt::moore::Down, left(), offset, right(), size, and circt::moore::Up.
|
inline |
|
inline |
Get the $increment
size.
Definition at line 105 of file MooreTypes.h.
References dir, and circt::moore::Up.
|
inline |
Get the $left
dimension.
Definition at line 97 of file MooreTypes.h.
References dir, high(), low(), and circt::moore::Up.
Referenced by circt::moore::operator<<(), and Range().
|
inline |
|
inline |
Definition at line 92 of file MooreTypes.h.
|
inline |
Get the $right
dimension.
Definition at line 99 of file MooreTypes.h.
References dir, high(), low(), and circt::moore::Up.
Referenced by circt::moore::operator<<(), and Range().
|
inline |
Format this range as a string.
Definition at line 108 of file MooreTypes.h.
RangeDir circt::moore::Range::dir |
The direction of the vector, i.e. whether a > b
or a < b
.
Definition at line 66 of file MooreTypes.h.
Referenced by circt::moore::hash_value(), increment(), left(), operator==(), Range(), and right().
int circt::moore::Range::offset |
The starting offset of the range.
Definition at line 68 of file MooreTypes.h.
Referenced by circt::moore::hash_value(), high(), low(), operator==(), and Range().
unsigned circt::moore::Range::size |
The total number of bits, given as |a-b|+1
.
Definition at line 64 of file MooreTypes.h.
Referenced by circt::moore::hash_value(), high(), operator==(), and Range().