New Feature: Self-Clearing Fields

For driving things like “clear” or “latch-enable” signals in the user logic, it often comes in  handy to have register fields that automatically reset themselves to zero after one clock cycle. That way, writing a one to a single-bit field has the effect of generating a single-cycle pulse on the corresponding user logic port.

The good news is, airhdl now supports self-clearing fields.

To create a new field, and make it self-clearing, just check the corresponding checkbox at the bottom of the “New Field” dialog:

2017-02-17_11-15-55

Of course, it’s also possible to turn existing fields into self-clearing ones. For that, click on the “edit field” icon of the field in question:

2017-02-17_11-22-02

This will bring-up the “Edit Field” dialog where you’ll also find the “Self-clearing” checkbox mentioned above.

In the fields list, self-clearing fields are clearly identified by their “Self-clearing” badge:

2017-02-17_11-24-13

You can use self-clearing fields in registers of type READ_WRITE and WRITE_ONLY. Enjoy!