image.png
# xschem
a
image.png
s
I don't get what exactly you need. The pulse keyword accepts 7 parameters. They are: PULSE(vlow vhigh delay trise tfall pulse_width period} With all these parameters you can get all possible square waves.
a
sorry if i miss something @Stefan Schippers i need different width in different cycle of pulse . if period of pulse is 10us and i need 2us pulse_width in one cycle and 4us in another cycle . thank you
s
@Ashutosh Kumar Thank you for the explanation. You are right there are no spice primitives for that. Your solution looks fine, i didn't find any better one 🙂 The 2 stacked voltage sources should have double period, one pulses the even cycles and the other one pulses the odd cycles. If you want you can create a symbol for that with some
off_val, on_val, risetime, falltime, period, delay,  even_width
and
odd_width
parameters and the uncerlying circuit like the one you have shown.
a
Ah! great i will try this way also. thank you! @Stefan Schippers
s
a
thank you so much @Stefan Schippers
s
You are welcome. I test these real world examples just to see if everything works in xschem. Sometimes by following user requests i find issues and can improve the tool.
a
sure! :)