• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Custom IC Design
  3. creating a matrix of instances in verilog-A

Stats

  • Locked Locked
  • Replies 2
  • Subscribers 125
  • Views 16284
  • Members are here 0
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

creating a matrix of instances in verilog-A

rickrevolta
rickrevolta over 15 years ago

Hello

I am trying to create a matrix of instances but not successfully so far. It is composed by 120 rows and 160 columns. I have to separate it in row/column even and odd. So I have 60 even and odd rows and 80 even and odd columns. I am trying to use  two for construction to instantiate the devices  between the rows and columns but I am facing some difficulties. I have to name the instances, and I tried to do it using a variable but does not work. It thinks that i am trying to use a function. The instance is a photodiode and I am nameing them by d_odd and d_even. Could you help me on that ? thanks

 

`include "constants.vams"
`include "disciplines.vams"
`include "photodiode.va"
module fpa_120_160(col_even, col_odd, row_even, row_odd);

inout [1:80] col_even;
electrical [1:80] col_even;
inout [1:80] col_odd;
electrical [1:80] col_odd;
inout [1:60] row_even;
electrical [1:60] row_even;
inout [1:60] row_odd;
electrical [1:60] row_odd;

genvar a,b;
integer c,d,k;

real i ;

analog begin
    
    @(initial_step)     begin
        
                                       k = 0;
                                       c = 1;
                                       d = 1;
                              end            
    
    for (a = 1 ; a <= 60 ; a = a + 1 )
        
        i = 0 + 1.666*k;
        
        begin
        
            for (b = 1 ; b <= 80 ; b = b + 1 )
            
                d_odd(c) (col_odd[b] row_odd[a]) photodiode intensity = i;

                c = c + 1;
            
                d_odd(c) (col_even[b] row_odd[a]) photodiode intensity = i;

                c = c + 1;
                
                
                d_even(d) (col_odd[b] row_even[a]) photodiode intensity = i;

                d = d + 1;
            
                d_even(d) (col_even[b] row_even[a]) photodiode intensity = i;
                
                d = d + 1;
        end
                
        k = k + 1;
        
    end        
                
endmodule

  • Cancel
Parents
  • Andrew Beckett
    Andrew Beckett over 15 years ago
    Quick reply to see whether email replies are working. Will try to answer the question properly later.

    Regards,

    Andrew.
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • Andrew Beckett
    Andrew Beckett over 15 years ago
    Quick reply to see whether email replies are working. Will try to answer the question properly later.

    Regards,

    Andrew.
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
No Data

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information