• 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. Reading from a text file in Spectre

Stats

  • Locked Locked
  • Replies 6
  • Subscribers 125
  • Views 16743
  • 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

Reading from a text file in Spectre

Analogstudent
Analogstudent over 13 years ago

Hi all,

How can I convert the below Hspice code to something acceptable for Spectre?

************************************************************************************

 Simulator lang=spice

.Tran 100u 1m


.DATA vals LAM
+ FILE='data1'
+ idep1val=1
+ itd1val=2
.ENDDATA   ****** This is how it works in Hspice

Idep1 vdd idep1  idep1val   ***** Bias currents in my spectre netlist
Itd1  vdd itd1   itd1val  

 *********************************************************************

This is the stimulus file that I have included for my scptre simulation.  

It works fine if I just mention the reuired values like this:

Idep1 vdd idep1  100u
Itd1  vdd itd1   100p 

But I need to read these values from an extrenal file and that's where it doesn't like it.

 Is there any better way of doing this?

Your help is highly appreciated.

Regards

Mostafa

 

  • Cancel
Parents
  • Analogstudent
    Analogstudent over 13 years ago

     Thank you Andrew,

    Your example makes everything clear for me. I guess this approach is not useful for me.

    What I'm going to do is,

    (1) reading the bias values from a file,

    (2) simulating the circuit using those bias values,

    (3) computing an error value using the outputs of the circuit,

    (4) checking a termination criteria,

    (5) writing a new bias set to the file again till my termination criteria is satisfied.

    (6) back to (1) 

     

     I already did that in Hspice, but I can't do that in Spectre. Maybe I'll do the whole thing again in Hspice.

     

    Anyway, thank you very much for your time.

    Mostafa

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • Analogstudent
    Analogstudent over 13 years ago

     Thank you Andrew,

    Your example makes everything clear for me. I guess this approach is not useful for me.

    What I'm going to do is,

    (1) reading the bias values from a file,

    (2) simulating the circuit using those bias values,

    (3) computing an error value using the outputs of the circuit,

    (4) checking a termination criteria,

    (5) writing a new bias set to the file again till my termination criteria is satisfied.

    (6) back to (1) 

     

     I already did that in Hspice, but I can't do that in Spectre. Maybe I'll do the whole thing again in Hspice.

     

    Anyway, thank you very much for your time.

    Mostafa

    • 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