Skip to main content

Register Map View

The Register Map view shows information about a given register map. It allows you to perform all operations related to a register map, such as editing its properties, adding or removing registers, running design rule checks, downloading the generated code, and even sharing the register map with other airhdl users.

Register Map View

Editing a Register Map

To edit a register map's properties (such as its name or its description), click on the gear button at the top of the view, and select Edit Register Map in the drop down menu.

Edit register map

This brings up the Edit Register Map dialog, which allows you to edit the register map's properties such as its name, description, default base address and the code generation options.

Edit register map

Deleting a Register Map

To delete a register map, click on the gear button at the top of the page, and select Delete Register Map in the drop down menu.

Delete register map
caution

Deleting a register map cannot be undone.

Uploading a Register Map

The Upload button allows you to upload an updated register map in the form of a JSON object, which then replaces the current register map in the database. This feature is particularly useful for users of the command-line generator, who might need to modify a register map locally, and to later upload the modifications to the web interface.

info

When uploading an updated register map, it's your responsibility to update the register map's revision number in the JSON file. You can find the corresponding entry by searching the JSON file for the "revision" key.

info

Uploading a register map requires a Professional subscription.

Running the Design Rule Checks

Airhdl features comprehensive design rule checks (DRCs) that detect issues in register maps such as overlapping registers or fields, invalid identifiers and more. Design rule checks are executed automatically before any code is generated, but you can run them manually as well by clicking the Run DRCs button.

Running the Design Rule Checks

Revisions

For each register map, airhdl maintains a revision number that is automatically incremented on every change to the register map. Renaming the register map, editing its description or its base address, adding/removing registers or fields are all examples of actions that increment the revision number.

As the revision number appears in every generated file, it is very easy to check whether a downloaded file (e.g. a VHDL component) is up to date with the version from the web interface by comparing the revision numbers.

Revision numbers can also be used to make sure that a C header has been generated from the same register map version as an RTL component. This check can even be automated by having the C driver read a "Revision" register from the hardware and check that it matches its own revision number.

Downloading the Generated Files

The generated files corresponding to a given register map can be downloaded using the Download button. Airhdl offers the following file types for download:

  • C/C++ headers
  • SystemVerilog package
  • SystemVerilog module
  • SystemVerilog testbench (professional plans only)
  • VHDL package
  • VHDL component
  • VHDL instantiation template
  • VHDL testbench (professional plans only)
  • HTML documentation
  • Markdown documentation
  • IP-XACT XML (professional plans only)
  • JSON object

You can download each file individually as needed, or a zip archive containing all the different file types, by clicking on the Download button and selecting the relevant entry in the drop down menu:

Downloading the Generated Files

Populating a Register Map with Register Map Elements

Airhdl supports three types of register map elements:

  • Registers are one-dimensional storage elements with a width of 32 bits.
  • Register Arrays are two-dimensional storage elements with a width of 32 bits and a configurable length. They can be useful for implementing control and status registers in multi-channel systems (e. g. using one array element per channel), or for holding array-type data such as filter coefficients.
  • Memories are a special kind of element that provide read and/or write access to an externally connected memory like a Block RAM. They can be useful for accessing objects like look-up tables through the register interface.

To add a new register map element to a register map, click on the Create new register button at the bottom of the Registers table to bring up the New Register dialog.

Creating a new Register Map Element

New Register Dialog

The New Register Dialog prompts for information about the register map element to be created.

  • The register's name, which must be a valid identifier

  • The register's type, which can be either "Register", "Array" or "Memory"

  • The register's address offset, relative to the register map's base address

  • An optional register description (maximum length: 2048 characters)

  • The access mode specifies how the register can be accessed from the bus. Registers support four different access modes:

    • read-write: the register gets its value from the bus; it can be both read and written from the bus
    • read-only: the register gets its value from the user logic; it can only be read from the bus
    • write-only: the register gets its value from the bus; it can only be written from the bus
    • interrupt: register bits are set from the user logic and cleared from the bus in a write-one-to-clear fashion
New Register Dialog

To create a new Register Array, set the type to Array. Notice that the Array length field appears in the dialog, which allows you to specify the number of elements in the array:

New Array Dialog

To create a new Memory, set the type to Memory. Notice that the Memory depth and the Memory read latency fields appear in the dialog.

New Memory Dialog

The memory depth corresponds to the number of elements in the memory. The read latency is the memory's read access latency, in clock cycles.

info

Memories support only the "read-write", "read-only" and "write-only" access modes. The "interrupt" access mode is not supported for memories.

Register Map Element Actions

The icons in the Actions column of the registers lists allow you to perform the following actions on a given register map element:

  • Edit a register map element
  • Duplicate a register map element
  • Delete a register map element
Register Map Element Actions
info

Depending on the register map's sharing permissions, not all actions may be available.

Re-Computing the Register Address Offsets

When clicking the Auto-compute register offsets button, airhdl will automatically re-compute the address offsets of all register map elements, eliminating any address conflicts and/or gaps in the address space.

Auto-compute register offsets
caution

Auto-computing register offsets cannot be undone.

Sharing a Register Map

Register maps can be shared with other airhdl users to enable collaboration among team members. The sharing model supports two permission levels:

  • Read-only: allows the destination user to see the register map and to download the generated code, but not to modify or delete it
  • Read-write: allows the destination user to see, modify and download the register map but not to delete it
info

To share a register map with an another airhdl user, you must know the e-mail address he or she uses to log-in to airhdl.

To share a register map, click on the gear button at the top of the page and select Share Register Map in the drop-down menu:

Share Register Map

This brings up the Share Register Map dialog where you can configure additional permissions for the current register map:

Share Register Map Dialog

To share the register map with another user, enter his or her e-mail address, select the permission you'd like to give, and click the Add button. The corresponding permission then appears in the sharing table at the bottom of the dialog. You can revoke it as needed by clicking on the delete (trash) icon in the Actions column:

Revoke (delete) a sharing permission
info

Sharing register maps with other airhdl users requires a Professional subscription.