The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
Jul 16th, 2024, 4:54pm
Pages: 1
Send Topic Print
wrapping long instantiation lines (Read 2458 times)
makelo
Community Member
***
Offline



Posts: 34
Hillsboro, OR
wrapping long instantiation lines
May 22nd, 2007, 2:33pm
 
Hello, I checked the LRM but could not find an answer.  Is there a way to break up long instantiation lines to help make them more readable and thereby avoid mistakes?  Something like the matlab command "..."

Here is an example section of code.

  GmCell_N1 #(.Ibias(Ibias),.Gmdiff(Gmdiff),.Rload(Rload)) BUT_R1C1(mida_p1s0,mida_p3s0,mida_p2s0,mida_p4s0,mida_p1s4,mida_p3s4,mida_p2s4,m
ida_p4s4,midb_p1s0,midb_p3s0,midb_p2s0,midb_p4s0,midb_p1s4,midb_p3s4,midb_p2s4,m
idb_p4s4);
  GmCell_N1 #(.Ibias(Ibias),.Gmdiff(Gmdiff),.Rload(Rload)) BUT_R2C1(mida_p1s2,mida_p3s2,mida_p2s2,mida_p4s2,mida_p1s6,mida_p3s6,mida_p2s6,m
ida_p4s6,midb_p1s2,midb_p3s2,midb_p2s2,midb_p4s2,midb_p1s6,midb_p3s6,midb_p2s6,m
idb_p4s6);
  GmCell_N1 #(.Ibias(Ibias),.Gmdiff(Gmdiff),.Rload(Rload)) BUT_R3C1(mida_p1s1,mida_p3s1,mida_p2s1,mida_p4s1,mida_p1s5,mida_p3s5,mida_p2s5,m
ida_p4s5,midb_p1s1,midb_p3s1,midb_p2s1,midb_p4s1,midb_p1s5,midb_p3s5,midb_p2s5,m
idb_p4s5);
  GmCell_N1 #(.Ibias(Ibias),.Gmdiff(Gmdiff),.Rload(Rload)) BUT_R4C1(mida_p1s3,mida_p3s3,mida_p2s3,mida_p4s3,mida_p1s7,mida_p3s7,mida_p2s7,m
ida_p4s7,midb_p1s3,midb_p3s3,midb_p2s3,midb_p4s3,midb_p1s7,midb_p3s7,midb_p2s7,m
idb_p4s7);
Back to top
 
 
View Profile   IP Logged
Geoffrey_Coram
Senior Fellow
******
Offline



Posts: 1999
Massachusetts, USA
Re: wrapping long instantiation lines
Reply #1 - May 23rd, 2007, 4:43am
 
I believe any place you put a space you can put any amount of whitespace, including newlines.  

This should be OK:

GmCell_N1
 #(.Ibias(Ibias),.Gmdiff(Gmdiff),.Rload(Rload))
 BUT_R1C1(mida_p1s0,mida_p3s0,mida_p2s0,mida_p4s0,mida_p1s4,mida_p3s4,
        mida_p2s4,mida_p4s4,midb_p1s0,midb_p3s0,midb_p2s0,midb_p4s0,
       midb_p1s4,midb_p3s4,midb_p2s4,midb_p4s4);
Back to top
 
 

If at first you do succeed, STOP, raise your standards, and stop wasting your time.
View Profile WWW   IP Logged
makelo
Community Member
***
Offline



Posts: 34
Hillsboro, OR
Re: wrapping long instantiation lines
Reply #2 - May 23rd, 2007, 7:22am
 
Thanks!  Yes this works.  The spaces are ignored so that I can put name and parameters which vary in length on one line and then arrange the pins on their own lines.  For modules with dozens of IO pins this is useful.
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.