The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
Jul 17th, 2024, 8:37am
Pages: 1
Send Topic Print
Multi-dimensional arrays in Verilog-AMS (Read 2623 times)
mehregan
Junior Member
**
Offline



Posts: 10
Minnesota
Multi-dimensional arrays in Verilog-AMS
May 07th, 2010, 10: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
Back to top
 
 
View Profile   IP Logged
Pages: 1
Send Topic Print
Copyright 2002-2024 Designer’s Guide Consulting, Inc. Designer’s Guide® is a registered trademark of Designer’s Guide Consulting, Inc. All rights reserved. Send comments or questions to editor@designers-guide.org. Consider submitting a paper or model.