[][src]Module flp_framework::address

The flp_framework::address Module

This module contains some of the basic primitive address types supported by Floorplan including void addresses, words, bytes, and so on. The implementations in this file look much like what gets generated for Floorplan-defined types, but are manually coded here to provide stronger control over how they get used.

For information on acquiring the Floorplan compiler itself, go see the GitHub project here.

Structs

AddrAddr

A generic address that points to a memory location containing an address.

Byte

A Byte is a value representing data, useful for its ability to be addressed and subsequently accessed by a ByteAddr. Suppose you have some byte address in ba and you want to ensure that the lowest bit of that word is not set:

ByteAddr

A ByteAddr is a value representing the address of zero or more bytes of memory.

VoidAddr

A VoidAddr, much like a void* in C, is available for those in need of a quick-and-dirty way of representing the value of a pointer without actually being able to read from or write to that pointer.

Word

A Word is a value representing data, useful for its ability to be addressed and subsequently accessed by a WordAddr. Suppose you have some word address in wa and you want to ensure that the lowest bit of that word is set:

WordAddr

A WordAddr is a value representing the address of a word of memory.

Constants

BYTES_IN_WORD

The number of bytes in a word of memory.

LOG_BYTES_IN_WORD

Log base 2 of the number of bytes in a word of memory.

Functions

lower_bits

Mask for just the nth-lowest bits of a byte.

test_nth_bit

Determine whether or not the nth-lowest bit of a byte is set.