how to include a file into hspice?

Status
Not open for further replies.

z0123

Newbie level 5
Joined
Dec 12, 2013
Messages
8
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Visit site
Activity points
48
Hi there,
how to include a file into hspice?
---------------------------------------------------
include file is like this
voltage time
0.000837487,0.00000000E+00
.
.
.
.
.
0.000684291,1.30208000E-08
0.000456824,2.60417000E-08
0.000175244,3.90625000E-08
and this file is a wave I want to use in input
how to write the code in hspice
 
Last edited:

Look at VPWL - piecewise linear voltage source. You might need to just add VPWL and some nodes at the start and possibly parentheses around the number list

Keith
 

I suspect it doesn't like the format of your file. Try just a few lines and see if that works and gives the correct results. I suspect it may be that your input file only has CR at the end of each line instead of CR+LF but that is only a guess.

Keith
 
Reactions: z0123

    z0123

    Points: 2
    Helpful Answer Positive Rating
What's this mean?
**error** the value of col1(1) or col2(2) may exceed the max column of pwl file

Also, it's possible that hspice doesn't like the column separation by comma (,); I've always used (and seen) white space separation.

By standard, hspice expects the order (time voltage). If you use a table the other way round, you have to tell it in the command line, something like

Vxxx n+ n- PWL PWLFILE='your_filename' col2, col1
or perhaps
Vxxx n+ n- PWL PWLFILE='your_filename' col1=2, col2=1
 
Reactions: z0123

    z0123

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…