intel / rohd

The Rapid Open Hardware Development (ROHD) framework is a framework for describing and verifying hardware in the Dart programming language.
https://intel.github.io/rohd-website
BSD 3-Clause "New" or "Revised" License
370 stars 65 forks source link

Add `selectIndex` directly to `LogicArray` (and `Logic`?) to enable one-liner accesses in generated SV. #484

Open mkorbel1 opened 4 months ago

mkorbel1 commented 4 months ago

Motivation

The current implementations of selectIndex and selectFrom generate a big Case, which is functionally correct but leads to bigger SV generated outputs. It would be nice to have a way to more easily access the APIs and also generate nicer SV.

Desired solution

Add selectIndex to LogicArray and maybe Logic as well, with a custom SV module that generates a one-liner (or inlineable).

Alternatives considered

No response

Additional details

No response