B2R2


AddrRange Type

AddrRange is a tuple (min, max) that represents a range of address values that are greater or equal to the min value (inclusive) and are less than or equal to the max value (inclusive). To access the min and the max value of a range, use either getMin or getMax function.

Record fields

Record Field Description

Max

Full Usage: Max

Field type: Addr

Maximum value (upper bound) of the interval.

Field type: Addr

Min

Full Usage: Min

Field type: Addr

Minimum value (lower bound) of the interval.

Field type: Addr

Constructors

Constructor Description

AddrRange(addr)

Full Usage: AddrRange(addr)

Parameters:
    addr : Addr - The start address.

Returns: AddrRange An instance of AddrRange.

Initialize an instance of AddrRange of size 1 has a single addr, i.e., (addr - addr).

addr : Addr

The start address.

Returns: AddrRange

An instance of AddrRange.

AddrRange(min, max)

Full Usage: AddrRange(min, max)

Parameters:
    min : Addr - The start address.
    max : Addr - The end address + 1.

Returns: AddrRange An instance of AddrRange.

Initialize an instance of AddrRange from a given interval.

min : Addr

The start address.

max : Addr

The end address + 1.

Returns: AddrRange

An instance of AddrRange.

Instance members

Instance member Description

this.Count

Full Usage: this.Count

Returns: uint64

The number of addresses in this range.

Returns: uint64

this.IsIncluding(arg1)

Full Usage: this.IsIncluding(arg1)

Parameters:
Returns: bool True if the address is included in the range. False otherwise.

Check if the address range is including the given address.

arg0 : Addr
Returns: bool

True if the address is included in the range. False otherwise.

this.ToTuple()

Full Usage: this.ToTuple()

Returns: Addr * Addr A tuple of min (inclusive) and max (exclusive).

Get the corresponding tuple (Addr, Addr) from the AddrRange.

Returns: Addr * Addr

A tuple of min (inclusive) and max (exclusive).

Static members

Static member Description

AddrRange.GetMax(arg1)

Full Usage: AddrRange.GetMax(arg1)

Parameters:
Returns: Addr The max value.

Get the max value (exclusive) of the AddrRange.

arg0 : AddrRange
Returns: Addr

The max value.

AddrRange.GetMin(arg1)

Full Usage: AddrRange.GetMin(arg1)

Parameters:
Returns: Addr The min value.

Get the min value (inclusive) of the AddrRange.

arg0 : AddrRange
Returns: Addr

The min value.