• 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 very much Andrew. I was away for a couple of weeks.

     I tried the way you suggested. But I couldn't get it work.

     Here is what my file contains:

    myParams paramset {
    idep1val itd1val
    100u 100p
    }

     

    I included this file to my stimuli file as:

    simulatro lang=spectre

    include "(path)/paramset.scs"

    simulatro lang=spice

    Idep1 vdd idep1  idep1val

    Itd1  vdd  itd1     itd1val

     

    but still it complains that "unknown parameter name idep1val"

     

    What am I missing here?

     

    Thanks in advance

    Mostafa

     

     

     

     

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

     Thank you very much Andrew. I was away for a couple of weeks.

     I tried the way you suggested. But I couldn't get it work.

     Here is what my file contains:

    myParams paramset {
    idep1val itd1val
    100u 100p
    }

     

    I included this file to my stimuli file as:

    simulatro lang=spectre

    include "(path)/paramset.scs"

    simulatro lang=spice

    Idep1 vdd idep1  idep1val

    Itd1  vdd  itd1     itd1val

     

    but still it complains that "unknown parameter name idep1val"

     

    What am I missing here?

     

    Thanks in advance

    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