UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
3,267 Views
Registered: ‎05-19-2011

How to implement 'if'-loop with clock

I want to implement the if-loop to do something like this.

 

Input signal (u1) is a microphone.

Then I want the 'if'-block to do:     

if (u1 > 0.5)

   reset the clock to 0.

else

   keep reading input signal

end

 

I also don't know how to set up a clock that follows the input signal of the microphone real-time.

 

Anyone can help?

Thijs

0 Kudos
2 Replies
Scholar joelby
Scholar
3,259 Views
Registered: ‎10-05-2010

Re: How to implement 'if'-loop with clock

Is u1 being sampled by an ADC? If so, you'll probably want to use the ADC's sampling clock in your synchronous process.

 

If u1 is an asynchronous digital signal, you would normally sample it using a system clock, or a derived frequency thereof.

 

0 Kudos
Highlighted
Scholar drjohnsmith
Scholar
3,252 Views
Registered: ‎07-09-2009

Re: How to implement 'if'-loop with clock

Hi

 

so what language / tool do you want to use ?

 

<== If this was helpful, please feel free to give Kudos, and close if it answers your question ==>
Tags (1)
0 Kudos