HB said:
Hi,
I use a Virtex XCV300
I would like to do : a multi *3 and a div /2 with a clk = 32 MHz.
(I would like to obtain a freq = 48 MHz)
So what have you tried so far? Do you have a design that works, but is
too slow, or are you uncertain how to proceed at all? How many signal
bits do you need to work with? Do you need something semi-unusual like
working with serial input and/or output instead of simple parallel
signals?
I would ask whether it's really 32 or 48 MHz you need, but it should be
quite trivial to get this bit of logic to run at 100+ MHz, even if you
use a much cheaper Spartan part instead of a Virtex.
Assuming you're having trouble getting started, a few hints: you can
multiply by 2 by shifting a signal left a bit (e.g. intermediate(16
downto 1) := input) and you can divide by two using a right-shift (same
basic idea in reverse). If you have X and 2X, you can get 3X by adding
them together. Typical designs carry out their work on the rising edge
of a clock. Since your intermediate can be as large as input*3, you'll
want it to be two bits larger than the input. Since the output can be
as large as input*1.5, you want it to be one bit larger than the input.
That might be done as one extra signal wire, or it might be done as the
same number of signals as the input, plus a separate carry signal.