K
kristoff
Guest
Hi all,
I am sorry for this "newbie" question.
I bought a xula2 board last week so am now doing my first steps in VHDL
and learning the language and trying to master this (more "parallel"
way) of thinking.
I have this case:
you have an audiosensor that generates blockwaves when audio is received
(when the voltage of the audio is above a certain threshold, it
generates a "1", if not, it is "0").
The exercise it let the device detection audio in a certain frequency range.
In the MCU world,
one would implement this using interrrupts: generate an interrupt every
rising edge of audiosignal, count the number of edges per time-interval,
reset the counter to 0 and work from there on.
The problem in a FPGA is that the two threads (counting the edges and
timer-interval) work in parallel, so I guess there is a possible
conflict between the "increase number of samples by one" and the "reset
sample-counter" logic.
(in a MCU, you can configure the interrupts as such as this never
happens at the same time).
So, I am trying to understand how to do this is a FPGA.
I am sorry as I guess this is a FPGA 101 question, but can somebody
shine some light on this?
Cheerio! Kr. Bonne.
I am sorry for this "newbie" question.
I bought a xula2 board last week so am now doing my first steps in VHDL
and learning the language and trying to master this (more "parallel"
way) of thinking.
I have this case:
you have an audiosensor that generates blockwaves when audio is received
(when the voltage of the audio is above a certain threshold, it
generates a "1", if not, it is "0").
The exercise it let the device detection audio in a certain frequency range.
In the MCU world,
one would implement this using interrrupts: generate an interrupt every
rising edge of audiosignal, count the number of edges per time-interval,
reset the counter to 0 and work from there on.
The problem in a FPGA is that the two threads (counting the edges and
timer-interval) work in parallel, so I guess there is a possible
conflict between the "increase number of samples by one" and the "reset
sample-counter" logic.
(in a MCU, you can configure the interrupts as such as this never
happens at the same time).
So, I am trying to understand how to do this is a FPGA.
I am sorry as I guess this is a FPGA 101 question, but can somebody
shine some light on this?
Cheerio! Kr. Bonne.