C
Chris Maryan
Guest
I know this comes up often, but I have not been able to find a clear
solution so here goes:
I'm trying to implement a basic asynchronous handshake in VHDL, and
being relatively new to hardware synthesis, I'm having a great deal of
difficulty getting something that's glitch free.
1. A signal "read" is asserted externally.
2. On that rising edge, I would like to trigger a process that
calculates something and then outputs the result on the bus and then
asserts a "done" signal.
3. The assertion of "done" prompts the external system to read the
data and then drop the "read" signal.
4. The falling edge of "read" should start something that drops the
"done" signal, tristates the data output and generally resets
everything ready for another round.
This is all clockless from my point of view and should only be driven
by the read signal.
What I'm having a hard time getting my head around is a way to get the
"done" signal to be asserted as the result of the rising edge of
"read" and then deasserted as the result of a falling edge of "read".
In general I know this to be unsynthesizeable and generally frowned
upon, but at the same time, it's a common enough handshake method so
it must be doable. Right now I have a glitchy cludge that I'd like to
replace with "the right way of doing it".
Any thoughts? Can anyone show me some VHDL that does something similar
or a basic version of this?
As a bit of an extended question, how can I guarantee that "done"
comes on at exactly the same time or slightly after I place my data
on the bus (step 2. above)?
Thanks,
Chris Maryan
solution so here goes:
I'm trying to implement a basic asynchronous handshake in VHDL, and
being relatively new to hardware synthesis, I'm having a great deal of
difficulty getting something that's glitch free.
1. A signal "read" is asserted externally.
2. On that rising edge, I would like to trigger a process that
calculates something and then outputs the result on the bus and then
asserts a "done" signal.
3. The assertion of "done" prompts the external system to read the
data and then drop the "read" signal.
4. The falling edge of "read" should start something that drops the
"done" signal, tristates the data output and generally resets
everything ready for another round.
This is all clockless from my point of view and should only be driven
by the read signal.
What I'm having a hard time getting my head around is a way to get the
"done" signal to be asserted as the result of the rising edge of
"read" and then deasserted as the result of a falling edge of "read".
In general I know this to be unsynthesizeable and generally frowned
upon, but at the same time, it's a common enough handshake method so
it must be doable. Right now I have a glitchy cludge that I'd like to
replace with "the right way of doing it".
Any thoughts? Can anyone show me some VHDL that does something similar
or a basic version of this?
As a bit of an extended question, how can I guarantee that "done"
comes on at exactly the same time or slightly after I place my data
on the bus (step 2. above)?
Thanks,
Chris Maryan