Home > Community > Forums > Cadence Academic Network > Passing text to a subcircuit (.TEXT)

Email

* Required Fields

Recipients email * (separate multiple addresses with commas)

Your name *

Your email *

Message *

Contact Us

* Required Fields
First Name *

Last Name *

Email *

Company / Institution *

Comments: *

 Passing text to a subcircuit (.TEXT) 

Last post Tue, Mar 27 2012 2:43 AM by lmnieto2. 7 replies.
Started by lmnieto2 16 Mar 2012 03:22 AM. Topic has 7 replies and 2044 views
Page 1 of 1 (8 items)
Sort Posts:
  • Fri, Mar 16 2012 3:22 AM

    • lmnieto2
    • Not Ranked
    • Joined on Fri, Mar 16 2012
    • Jaen, Jaen
    • Posts 7
    • Points 95
    Passing text to a subcircuit (.TEXT) Reply

    Hello. I am using OrCAD Capture 16.2 to make subcircuits with digital parts, and I have a problem: 

    In Capture you can use the SUBPARAM part to pass subparams to a subcircuit block. Then, in your .CIR file, you get something like this:

     

    .SUBCKT PLD IN1 IN2 IN3 OUT1

    + PARAMS: MNTYMXDLY=0 IO_LEVEL=0

    ... 

     

    But, is there any PART in Capture to pass a text to the subcircuit to get something like this?:

     

    .SUBCKT PLD IN1 IN2 IN3 OUT1 

    + PARAMS: MNTYMXDLY=0 IO_LEVEL=0

    + TEXT: JEDEC_FILE="PROG.JED"

    ... 

     

    Can you help me?

    Thanks in advance

     

    Filed under:
    • Post Points: 20
  • Mon, Mar 19 2012 8:09 AM

    • oldmouldy
    • Top 10 Contributor
    • Joined on Tue, Jul 15 2008
    • Woking, Surrey
    • Posts 1,371
    • Points 23,350
    Re: Passing text to a subcircuit (.TEXT) Reply
    Take a look at the Programmable Logic section of the PSpice Reference Guide, pspcref.pdf in the doc\pspcref directory of the 16.2 installation, starts on page 375.
    • Post Points: 20
  • Wed, Mar 21 2012 3:03 AM

    • lmnieto2
    • Not Ranked
    • Joined on Fri, Mar 16 2012
    • Jaen, Jaen
    • Posts 7
    • Points 95
    Re: Passing text to a subcircuit (.TEXT) Reply

    Ok. Thank you for your help, but I'm not interest in Programmable Logic only. The included example in my post is just an example included in the documentation, but I'm interested in any kind of subcircuit in general, for example, a subcircuit with a VPWL_file source (or a PAL, etc.) included: a especial "TEXT" part would be useful to pass the file to the device...

    Thanks again. 

    • Post Points: 20
  • Wed, Mar 21 2012 5:49 AM

    • alokt
    • Top 25 Contributor
    • Joined on Fri, Aug 22 2008
    • Noida, Uttar Pradesh
    • Posts 239
    • Points 3,445
    Re: Passing text to a subcircuit (.TEXT) Reply

    This can not be done by using a part like "subparam". You need to modify PSpice template property on symbol. You need to have something like:

    ...@MODEL PARAMS: \n+ MNTYMXDLY=@MNTYMXDLY IO_LEVEL=@IO_LEVEL TEXT: JEDEC_FILE="@JEDEC_FILE"

    Please note this partial string from complete property, you need to add only TEXT: JEDEC_FILE="@JEDEC_FILE"  in existing PSpice template property of symbol.

    Then add a property named as "JEDEC_FILE" on symbol instance and set it's value to name of file (PROG.JED).

    Refer the symbol "GAL20V8-20L" from dig_gal.olb

    Hope this helps. 

    • Post Points: 35
  • Thu, Mar 22 2012 10:56 AM

    • lmnieto2
    • Not Ranked
    • Joined on Fri, Mar 16 2012
    • Jaen, Jaen
    • Posts 7
    • Points 95
    Re: Passing text to a subcircuit (.TEXT) Reply

    Ok. I will test it and comment the results here next week.

    Thanks a lot! 

    • Post Points: 5
  • Mon, Mar 26 2012 4:53 AM

    • lmnieto2
    • Not Ranked
    • Joined on Fri, Mar 16 2012
    • Jaen, Jaen
    • Posts 7
    • Points 95
    Re: Passing text to a subcircuit (.TEXT) Reply

    Unfortunately it doesn't work: 

    In the main schematic there is a part associated to a subcircuit. This part is included in a .olb file created using Generate Part tool in Capture, and its template is: X^@REFDES %p1 %p2 @MODEL PARAMS: TEXT:t_f=@TEXTFILE. Also, it has a property named TEXTFILE, which is visible. I used it to pass a file to the subcircuit, but it doesn't work. The .CIR expansión of the subcircuit is included:

     .SUBCKT SCHEMATIC1 P1 P2 PARAMS: PARAM1=1k

    V_V1         N15183 P2   PWL   

    + FILE "{t_f}" 

    R_R1         P1 N15183  {param1} TC=0,0 

    .ENDS

    You can see two ports (P1, P2), a subparameter (PARAM1) and the parameter t_f. This should be the file I need to pass from the main schematic, using the TEXTFILE property of the symbol. But note in the code that there is no TEXT attibute in the .SUBCKT command!

    Then, the file is not passed to the subcircuit, and in the .OUT file you can see this error message:

    **** EXPANSION OF SUBCIRCUIT X_U4 ****

    X_U4.V_V1 X_U4.N15183 0 PWL FILE {t_f}

    ---------------------------------$

    ERROR -- Unable to open file 

     

    Any suggestion? 

    • Post Points: 20
  • Mon, Mar 26 2012 8:42 PM

    • alokt
    • Top 25 Contributor
    • Joined on Fri, Aug 22 2008
    • Noida, Uttar Pradesh
    • Posts 239
    • Points 3,445
    Re: Passing text to a subcircuit (.TEXT) Reply

    Your subcircuit should be parametrized to accept the variable from top/outside, currently it is configured to accept only one parameter that is PARAM1

    .SUBCKT SCHEMATIC1 P1 P2 PARAMS: PARAM1=1k

    You need to add another parameter here and that should be "t_f"

    Here is an example from "GAL20V8-20L" model statement. refer the text in bold.

     .subckt GAL20V8-20L  PIN1 ............. PIN23
    + optional: PIN24=$G_DPWR PIN12=$G_DGND
    + params: MNTYMXDLY=0 IO_LEVEL=0
    + text: JEDEC_FILE="PAL.JED"

    ..........

    Modifying PSpice Template property will enable passing the parameter from top (schematic, change in .olb)), modifying the subcircuit (in .lib) would enable subckt to accept the parameter passed from top

    Hope this helps, if issue persists, would suggest contacting cadence support or sharing the design for investigation.

     

    • Post Points: 20
  • Tue, Mar 27 2012 2:43 AM

    • lmnieto2
    • Not Ranked
    • Joined on Fri, Mar 16 2012
    • Jaen, Jaen
    • Posts 7
    • Points 95
    Re: Passing text to a subcircuit (.TEXT) Reply

    I made a symbol for the schematic subcircuit, but it doesn't work. But it does (the TEXTFILE property is passed) with a .CIR linked file instead. I edited this .CIR file to include the TEXT command, similar to the example you suggested.

    It's fine for me, but I would like to know why it doesn't work linking a schematic folder...

    Thanks for all.

     

    • Post Points: 5
Page 1 of 1 (8 items)
Sort Posts:
Started by lmnieto2 at 16 Mar 2012 03:22 AM. Topic has 7 replies.