The Designer's Guide Community Forum
https://designers-guide.org/forum/YaBB.pl
Design Languages >> Verilog-AMS >> Multi-dimensional arrays in Verilog-AMS
https://designers-guide.org/forum/YaBB.pl?num=1273253854

Message started by mehregan on May 7th, 2010, 9:37am

Title: Multi-dimensional arrays in Verilog-AMS
Post by mehregan on May 7th, 2010, 9:37am

I would like to model a volumetric space by breaking it up into smaller volumes or mesh's and modeling each space using an R-C combination. �I would like the number of mesh's to be set by the user as a parameter on the model and the values of Resistance/Capacitance in each mesh would need to vary from its adjacent neighbor. � I know about the genvar function in AMS which would allow me to index a 1-dimensional array. �I also know that Verilog 2001 supports multi-dimensional arrays. � However there seems to be some limitations of using multi-dimensional arrays on analog nodes in AMS. �


module saline1 (INOUT1, INOUT2 );
� inout INOUT1, INOUT2
� electrical INOUT1, INOUT2;

� parameter integer slices = 3;
�
� wire [0:slices] mesh [0:slices] [0:slices];

� genvar i, j, k;
�
� for (i=0; i<slices;i=i+1) begin
� � �for (j=0; j<slices;j=j+1) begin
� � � � for (k=0; k<slices;k=k+1) begin �
      � �resistor �#(.r(10)) R123 (mesh[i][j][k], mesh[i+1][j+1][k+1]);
      end
� � �end
� end

......

endmodule


In this model however, AMS used the VHDL model for the resistor instead of the analog Spectre version. �Not sure why. �In my version of AMS simulator (AMS Designer) I cannot specify the net mesh as type "electrical". �I had to use type "wire". �This seems like a limitation of AMS? �This also seems to preclude me from defining the resistor behaviorally within the analog begin - end as �an equation: V() <+ I()/R;

I'm just curious if anyone has ever done any kind of multi-dimensional AMS where the multi-dimensional array is an analog electrical net. �

- Rob

The Designer's Guide Community Forum » Powered by YaBB 2.2.2!
YaBB © 2000-2008. All Rights Reserved.