Unverified Commit e3bcc90d authored by Schuyler Eldridge's avatar Schuyler Eldridge
Browse files

Add SparseVec



Add a new utility, SparseVec.  This exposes a normal Vec-like dynamic
access API.  However, the dynamic access is implemented one of three ways:

  1. Using a binary decoder
  2. Using a one-hot decoder
  3. Using when statements

This is added to better support a design pattern ("vec--decoder pattern")
where a large, sparse vector is used to describe a decoder.  This pattern,
if unchecked and used in a parametric generator, can cause the vector to
grow extremely large and cause backend tools to complain.

Specifically, Cadence tooling is known to set limits on the addressable
range of a "memory" and will error if these are exceeded.  This
vec--decoder pattern can easily exceed this if designers are not careful.

Signed-off-by: default avatarSchuyler Eldridge <schuyler.eldridge@sifive.com>
parent 908ac119
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment