Vector allocation @ Spice Opus

Apr 27, 2006 8 Replies

Hi,



maybe someone can help me with that:



I would like to set the lenght of this vector without writing all the element pairs by hand. Does anyone know how to do it.



vclk 1 0 dc 1u pwl(0 -7 10NS -7 11NS -3 17NS -3 18NS -7 50NS -7) ^ want to set the size of this vector



thanx for your help



el_loco



What do you mean by "size"?

Have you considered using a "PULSE" source model?

Size? Well, at the moment the size (or order) of the vector pwl is 12 and I want to have a order of, let=B4s say 100.

The reason why I am using the pwl instead of of the pulse is, that I want to make a PWM signal. The problem is, that I want to change the Pulse Duty after every period. The signal should run for about 100 periods

In PSpice...

General form PWL

  • [TIME_SCALE_FACTOR=]
  • [VALUE_SCALE_FACTOR=]
  • (corner_points)* where corner_points are: (, ) to specify a point FILE to read point values from a file REPEAT FOR (corner_points)* ENDREPEATto repeat times REPEAT FOREVER (corner_points)* ENDREPEATto repeat forever Examples v1 1 2 PWL (0,1) (1.2,5) (1.4,2) (2,4) (3,1) v2 3 4 PWL REPEAT FOR 5 (1,0) (2,1) (3,0) ENDREPEAT v3 5,6 PWL REPEAT FOR 5 FILE DATA1.TAB
  • ENDREPEAT v4 7 8 PWL TIME_SCALE_FACTOR=0.1
  • REPEAT FOREVER
  • REPEAT FOR 5 (1,0) (2,1) (3,0) ENDREPEAT
  • REPEAT FOR 5 FILE DATA1.TAB
  • ENDREPEAT
  • ENDREPEAT n volt square wave (where n is 1, 2, 3, 4, then 5); 75% duty cycle; 10 cycles; 1 microseconds per cycle: .PARAM N=1 .STEP PARAM N 1,5,1 V1 1 0 PWL
  • TIME_SCALE_FACTOR=1e-6 ;all time units are scaled to
  • microseconds
  • REPEAT FOR 10
  • (.25, 0)(.26, {N})(.99, {N})(1, 0)
  • ENDREPEAT

...Jim Thompson

| James E.Thompson, P.E. | mens | | Analog Innovations, Inc. | et | | Analog/Mixed-Signal ASIC\'s and Discrete Systems | manus | | Phoenix, Arizona Voice:(480)460-2350 | | | E-mail Address at Website Fax:(480)460-2142 | Brass Rat | | http://www.analog-innovations.com | 1962 | I love to cook with wine. Sometimes I even put it in the food.

Ah. I see. Well, if it were me, I might write a short program in BASIC to accept a few defining characteristics and output a suitably formatted pwl line, then cut and paste it into the model.

Neat. What's the format of the data file?

time voltage pairs

...Jim Thompson

-- | James E.Thompson, P.E. | mens | | Analog Innovations, Inc. | et | | Analog/Mixed-Signal ASIC's and Discrete Systems | manus | | Phoenix, Arizona Voice:(480)460-2350 | | | E-mail Address at Website Fax:(480)460-2142 | Brass Rat | |

formatting link
| 1962 | I love to cook with wine. Sometimes I even put it in the food.

Thank you for the quick reply. I gotta tell you how i solved it.

... Mathias Doering

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required