Hardware Access
You must provide the following two functions for the API to call:
- hardware_write(context, address, data)
- hardware_read(context, address) → data (return value of the
hardware_readfunction)
Arguments:
- data
- 32-bit value
- address
- Width depends on the IP and addressing mode
- context
- User-defined handle to select the specific IP instance and its configuration such as, base address
Mapping
- In both hardware_write and hardware_read, map the API’s logical address for the selected instance to the hardware base address of that instance.
Abstraction and Driver Behavior
- The IP register space is fully abstracted by the API and supplied driver.
- Direct register accesses are not required; your
hardware_readandhardware_writefunctions provide the necessary access path for the driver.
Implementation Notes
Use the context to retrieve the instance's base address.