Skip to content

Address Range

Address Range.

Classes:

Name Description
AddrRange

Address Range.

AddrRange

Bases: Object

Address Range.

Examples:

>>> addrrange = AddrRange(size='4k')
>>> addrrange
AddrRange(size=Bytesize('4 KB'))
>>> addrrange.baseaddr
Hex('0x0')
>>> addrrange.width
32
>>> addrrange.depth
1024
>>> addrrange.size
Bytesize('4 KB')
>>> addrrange.addrwidth
12
>>> addrrange.endaddr
Hex('0xFFF')
>>> addrrange.nextaddr
Hex('0x1000')
>>> addrrange.wordsize
4.0
>>> str(addrrange)
'0x0 1024x32 (4 KB)'
>>> str(AddrRange(depth=16))
'0x0 16x32 (64 bytes)'
>>> str(AddrRange(size=16))
'0x0 4x32 (16 bytes)'

Attributes:

Name Type Description
baseaddr Hex

Base Address

width PositiveInt

Width in Bits.

depth PositiveInt

Number of words.

size Bytes

Size in Bytes.

addrwidth PositiveInt

Address Width.

addrmask PositiveInt

Address Width.

endaddr Hex

End Address - baseaddr+size-1.

nextaddr Hex

Next Free Address - baseaddr+size.

wordsize float

Number of Bytes Per Word.

org str

Organization.

baseaddr class-attribute instance-attribute

baseaddr = BASEADDR_DEFAULT

Base Address

width class-attribute instance-attribute

width = 32

Width in Bits.

depth class-attribute instance-attribute

depth = Field(repr=False)

Number of words.

size instance-attribute

size

Size in Bytes.

addrwidth property

addrwidth

Address Width.

addrmask property

addrmask

Address Width.

endaddr property

endaddr

End Address - baseaddr+size-1.

nextaddr property

nextaddr

Next Free Address - baseaddr+size.

wordsize property

wordsize

Number of Bytes Per Word.

org property

org

Organization.