Coverage of a large sparse matrix reprensentig a pattern of inputs

Hi all,

I have a big array of sensor inputs (around 100k). I use an associative array to represent the state of such inputs at each clock cycle (i.e. they are all low by default, the ones identified by a key in the associative array stay high for a time defined by the value in the corresponding entry in the associative array).

I’d like to use functional coverage to ensure that randomization hits a given set of patterns, for instance: that all possible inputs are high at least once, that all inputs in a given neighborhood are high at the same time (i.e. that indices respecting a given relation between them are all in the associative array at least once).

I know that covergroups do not support associative arrays and I thought at first of using an array of covergroups but this presents 2 problems:

  1. 100k+ covergroups seem a little too much for any tool to manage
  2. I wouldn’t have any way of getting neighborhood information as such.

Do you have any suggestion?

Thanks!
Stefano.

In reply to RENCFanesto:

You would need to give a lot more information for anyone to offer a good suggestion. Do you actually have 100K inputs, or is this encoded into some address?

If you are going to access each input, why do you need a sparse (associative) array?

Also need a better description of “neighborhoods” how many are there? do they overlap?

You will most likely need to create some helper logic as trying to cover this within a covergroup might be problematic.

In reply to dave_59:

Hello Dave,

I actually have 150k+ inputs, not address encoded, they are actual bumps on the chip connected to sensors. This is a pixel detector chip used in a large HEP experiment. Each input represents a single pixel, organized in a NxM matrix.

The reason why I’m using a sparse array is that I’m not switching all the inputs at once at all times and since this is being sent around in the environment in the form of a sequence item, I’m using a sparse matrix to reduce memory footprint: I only have entries for the inputs I’m actually going to switch in any transaction, instead of allocating an array with 150k+ integers.

As for the neighborhood: the definition is an 8x3 rectangle around any pixel. And yes, for different pixels neighborhoods can overlap.

In particular I’m interested in covering these input patterns:

  • at least one pixel
  • at least two neighbor pixels (i.e. each one in the 8x3 rectangle around the other one)
  • all pixels in a column at the same time
  • all pixels in a row at the same time
  • all pixels in a cross at the same time (i.e. a full column and a full row)
  • all pixels at the same time

What do you mean by helper logic?

In reply to RENCFanesto:

Thanks for the additional information. It’s still not clear what you mean when you say you want to cover that “all possible inputs are high at least once” I understand that each transaction only contains a subset of sensor inputs. But are you still trying to cover all 150k+ inputs from all transactions, or just looking at the inputs for the specified transaction? Unless you are exhaustively looking at all 150K inputs or the the same subset for each test, this would be difficult to collect coverage.

By help logic I mean writing code that checks for the conditions you are looking for through some sort procedural code, and setting a single bit if the conditions are met. The all you need to do is create a covergroup or cover directive for that bit being set.