The Designer's Guide Community Forum
https://designers-guide.org/forum/YaBB.pl
Design Languages >> Verilog-AMS >> pwm in verilog
https://designers-guide.org/forum/YaBB.pl?num=1159422939

Message started by uzma on Sep 27th, 2006, 10:55pm

Title: pwm in verilog
Post by uzma on Sep 27th, 2006, 10:55pm

i have to generate the pulses of PW as low as  100ns in verilog

the pw duration is to be obtained from external source say PC

can anyone help me that how can i do it

Title: Re: pwm in verilog
Post by jbdavid on Sep 27th, 2006, 11:04pm

can you write the needed PW into a file? then read the file from the verilogams ..?

jbd

Title: Re: pwm in verilog
Post by uzma on Sep 28th, 2006, 2:13am

even if i write the pw in a file then still i will not be needing a program to generate a pulse train ???

Title: Re: pwm in verilog
Post by jbdavid on Sep 30th, 2006, 2:09am

This I don't know..
I was thinking that due to differences in time scale you are probably not looking for a realtime solution..
so if you can capture the PW from the external source into a file,
the your verilog model can read those in and generate the voltage in the simulation..

of course you may not need that exact solution..
capture the data in VCD format (see Verilog-XL reference or IEEE - 1364 )
and use a tool like ncgentb to turn the data into 1-0's in a verilog testbench for your circuit
capture the data in PWL format (see the spectre reference manual) and
read it into a spectre simulation with a VPWLF (or vsource - set to PWL type, read data from a file)

If you DON'T need to cature the data from an external source, (you said in your original question that this was
a requirement - then complain that you might need to genereate the PW outside your model.. which I find a little confusing)
you might want to write a verilog-A or verilog model to generate a "random" PW signal..
one type would be a PRBS of a certain bit length at a fixed period..
OR you could use a voltage input to represent duty cycle (0-1v) and run that through a V-> duty cycle circuit.

If you were coming to me as a customer there is a LOT more I need to know to make any kind of recommendation on an approach.
I hope the suggestions above help.



The Designer's Guide Community Forum » Powered by YaBB 2.2.2!
YaBB © 2000-2008. All Rights Reserved.