A
A2K
Guest
Hi,
Im programming for the XC95108 CPLD and am running into a bit of a
stumbling block having never really used VHDL that much before.
Im designing a device that will act as a WAN link simulator linking two
routers by providing variable delay and speed to the network. Basically Im
using the CPLD to act as a delay buffer and a counter that divides a clock
input by 2, 4, 6, 8, 10. Now here is where Im looking for a bit of advice,
I want to generate a 2MHz square wave to act as my clock source for the
entire circuit. Now I was looking to generate the clock source (2MHz) from
the CPLD itself by writing VHDL code to do so and then use this clk signal
to clk the entire circuit. So I will be feeding the clk signal back into
the CPLD at two points, one so the signal can be divided and hence slow
the speed up and the other point to keep the delay buffer runnning. I want
to try and stay away from using a separate circuit to provide the clocking
(ie, not using the CPLD) as I ran into severe complications in doing that.
I have the code for the delay buffer written and also am getting on well
with the counter I just need to figure out a way to clock them both while
being able to change the clk frequency at one point but keeping the data
passing through.
I hope this makes sense and any advice, especially in generating the 2MHz
square wave in (VHDL) would be greatly appreciated.
Thanks in advance,
AK
Im programming for the XC95108 CPLD and am running into a bit of a
stumbling block having never really used VHDL that much before.
Im designing a device that will act as a WAN link simulator linking two
routers by providing variable delay and speed to the network. Basically Im
using the CPLD to act as a delay buffer and a counter that divides a clock
input by 2, 4, 6, 8, 10. Now here is where Im looking for a bit of advice,
I want to generate a 2MHz square wave to act as my clock source for the
entire circuit. Now I was looking to generate the clock source (2MHz) from
the CPLD itself by writing VHDL code to do so and then use this clk signal
to clk the entire circuit. So I will be feeding the clk signal back into
the CPLD at two points, one so the signal can be divided and hence slow
the speed up and the other point to keep the delay buffer runnning. I want
to try and stay away from using a separate circuit to provide the clocking
(ie, not using the CPLD) as I ran into severe complications in doing that.
I have the code for the delay buffer written and also am getting on well
with the counter I just need to figure out a way to clock them both while
being able to change the clk frequency at one point but keeping the data
passing through.
I hope this makes sense and any advice, especially in generating the 2MHz
square wave in (VHDL) would be greatly appreciated.
Thanks in advance,
AK