Cadence Breadcrumbs
CommunityForums Mixed-Signal Design Multidimensional Array in Verilog-A

Multidimensional Array in Verilog-A

For my design, it would be very useful to declare an array with two dimensions.

However, I have still syntax errors when I try this construction.

It is true that in the LR 20.1 there is nothing about this kind of construct.
On the other hand, Accelera LRM postulated this construct already in 2014.

Is it still not implemented in Cadence Verilog-A or Verilog-AMS?

Is it any other solution to this issue at Cadence?

  • Hi Andrzej,

    I'm sure there's a request for multi-dimensional array support in Verilog-A to match the 2.4 Verilog-AMS LRM (obviously, Verilog-A is a subset of Verilog-AMS but it's covered by the same standard nowadays). There doesn't seem to have been enough demand for this to get it enhanced though.

    If you have a need for this, you should contact customer support to request it (ideally with the reasons why it would be useful).

    Andrew

  • In fact the new "Related Thread" hints that appear below this post (in the upgrade that has just been completed) now show that I answered a similar question a few months ago here. I thought it rang a bell!

    Andrew

  • Andrew,
    Thank you for your answer to my question.

    With Spectre 20.1.0.231.isr6 64bit I have the same effect as reported by rhanna 3 months ago:
    ERROR (VACOMP-1675): "parameter real rcho[1:`ONR][<<--? 1:`CHNR] = '{'{10.0k, 5.0k, 20.0k},'{10.0k, 5.0k, 20.0k}};"
    "crossbar2D.va", line 15: Encountered uninitialized parameter, "rcho". Initialize parameter and try again.

    The last (April 2021) "What's New" document reports "Support for Array Parameters Added in Functions Implemented in C"
    Judging according to LRM (March 2021) these are also 1D arrays.

    There are two purposes to introduced multidimensional arrays into Verilog-A/AMS:
    1. It should be nice to be closer to Accelera standard which is 17 years old.
    2. Modelling of a crossbar typical for analog implementation of the neural network will be much easier and maybe a simulation of this kind of circuit will be also faster.

    Can I hope to see progress with this subject in the new release of Spectre and Xcelium, soon?

  • 1. It should be nice to be closer to Accelera standard which is 17 years old.

    Er, 2021-2014 is 7, not 17. Of course it would be nice, but no simulator ever implements the whole LRM. I'm not saying that this specific feature would not be useful, but there are certainly a number of things in the LRM which are very unlikely to be useful and so rather than expending limited resources on implementing things that are not going to be used, things tend to be prioritised based on requests for such features.

    Can I hope to see progress with this subject in the new release of Spectre and Xcelium, soon?

    That's only likely to happen if you (or others) raise the request with justification to customer support, as I mentioned before. Simply mentioning it in the community forums is not a formal request which will make it into R&D.

    Regards,

    Andrew

  • Hello,

    On one occasion, I have "emulated" the two-dimensional indices using an expression stored in a `define statement with two arguments (the stride was hard-coded) which would compute a linear index from the row and column indices provided. Probably that a more flexible variant can be coded using a VerilogA user function (did not try this -- yet).

    Regards,

    Renaud

Related