Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > VHDL > Vernier Interpolation

Reply
Thread Tools

Vernier Interpolation

 
 
LearnVHDL LearnVHDL is offline
Junior Member
Join Date: Mar 2007
Posts: 6
 
      03-18-2007
Dear All,
I'm working on a project about time interval counter using vernier interpolation principle to get a higher resolution. If you are not family with vernier interpolation, it's totally fine, coz my question is quite general.

Here's my problem:
Input: Clk_ref with 100MHz
Input: Start_trigger
Output: Clk1 with 100MHz * (16/17) when the Start trigger signal goes high

I'm using virtex 4, I can easily get the output frequency with the DCM in FPGA. This is what I did. I fed the input clk_ref to the DCM and then I would get the output with the frequency that I want.

However, I don't want the output freq to be generated right away. I want it to happen AT THE MOMENT Start_trigger signal goes high.

Feeding the Clk1 and Start_trigger into an AND gate isn't an solution. Because the output of the AND gate will not go high at the moment(with some delay) Start_trigger go high. The output of the AND will just wait till Clk1 goes high.


This is what i want:
Clk_refxxxxxxxxx|____|-----|____|-----|____|-----|____|-----|____|
Start_triggerxxxxx_________________|------------------------------------
Clk1xxxxxxxxxxxxx__________________|-------|_____|------|_____|------

Summary:
* freq of Clk1 = freq of Clk_ref * (16/17) <--- I can do this with DCM
* Clk1 will be triggered by Start_trigger;

Thanks in advance. Any suggestion and idea will be appreciated!!! Thanks.
 
Reply With Quote
 
 
 
 
quantum_dot quantum_dot is offline
Member
Join Date: Nov 2006
Posts: 32
 
      03-19-2007
You can use gated clock option. Stanadard primitives are available in Viterx-4 to support gated clock.
 
Reply With Quote
 
 
 
 
LearnVHDL LearnVHDL is offline
Junior Member
Join Date: Mar 2007
Posts: 6
 
      03-19-2007
quantom_dot?

"You can use gated clock option. Stanadard primitives are available in Viterx-4 to support gated clock..."

gated clock?? please provide more detail... Thanks..
 
Reply With Quote
 
quantum_dot quantum_dot is offline
Member
Join Date: Nov 2006
Posts: 32
 
      03-20-2007
you can use BUFGCE primitive available in Virtex devices. This is a global clock buffer with a single gated input. When Clk Enable is high, the input is transferred to output.

Here is the VHDL instantiation template for this primitive

component BUFGCE
port (O : out STD_ULOGIC;
CE : in STD_ULOGIC;
I : in STD_ULOGIC);
end component;

BUFGCE_INSTANCE_NAME : BUFGCE
port map (O => user_O,
CE => user_CE,
I => user_I);
 
Reply With Quote
 
LearnVHDL LearnVHDL is offline
Junior Member
Join Date: Mar 2007
Posts: 6
 
      03-20-2007
"If the CE input is Low prior to the incoming rising clock edge, the following clock pulse does not pass through the clock buffer, and the output stays Low. Any level change of CE during the incoming clock High pulse has no effect until the clock transitions Low. The output stays Low when the clock is disabled. However, when the clock is being disabled it completes the clock High pulse." from Virtex User Guide...

Thanks Quantum. It's not working like what I wanted. But Thanks tho. Any other idea??
 
Reply With Quote
 
quantum_dot quantum_dot is offline
Member
Join Date: Nov 2006
Posts: 32
 
      03-21-2007
one more idea... May be you can synchronize your start trigger pulse with incoming clock and then use the gated clock pulse. This way you will always have the output clock starting just at the moment start trigger is asserted.
 
Reply With Quote
 
LearnVHDL LearnVHDL is offline
Junior Member
Join Date: Mar 2007
Posts: 6
 
      03-21-2007
"May be you can synchronize your start trigger pulse with incoming clock and then use the gated clock pulse."

How can I synchronize my start trigger pulse with incoming clk?? Thanks Quantum.
 
Reply With Quote
 
quantum_dot quantum_dot is offline
Member
Join Date: Nov 2006
Posts: 32
 
      03-23-2007
You can use this simple logic.


signal Sync_trigger : std_logic ; -- sync trigger pulse

process(Clk_ref, rst) -- rst is system reset signal
begin

if Clk_ref'event and Clk_ref = '1' then
if reset = '1' then
Sync_trigger <= '0';
else
Sync_trigger <= Start_trigger;
end if;
end if;

end process;

Sync_trigger is will go high only on the rising edge of clk_ref. and then you can use this synchronised pulse to get your output clock. Hope this will help you....
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Linear interpolation in vhdl df84077@gmail.com VHDL 8 10-07-2011 08:38 AM
How to stop interpolation of Escape character in variable? \Rob\ ASP .Net 8 02-24-2006 08:52 AM
Opening files with interpolation Mat W Perl 3 05-21-2004 08:40 AM
problem using JAI bilinear interpolation to scale a bufferedimage Raj Java 2 11-25-2003 11:52 AM
Your votes please ( drawImage bad interpolation bug id 4950176) Michele Puccini Java 0 11-09-2003 11:06 AM



Advertisments