On Mon, 31 Dec 2007 00:48:22 +0100, "Xin Xiao" <> wrote:
>
>i think it is working now. i'm happy.
>
>i think the problem was dest_sig. it was an inout port, so i divided it into
>two in and out ports and it's working.
And that may be the solution to your problem.
>i'm investigating this further maybe i missed something...
>
Having got it working with separate ports, you may want to go back and
learn how to do it with an Inout port.
If Source is outside the unit with the port, driving IN to the port, you
have to remember that the unit is also driving OUT on the same port, and
the result is the combination of both those signals according to the
resolution function.
So, to drive IN, you have to make sure the unit drives
(others =>(others=>'Z')) onto the port. In other words it turns its own
drivers OFF to allow the external signal in.
And to drive out from the port, you will have to drive 'Z' into it, from
your external source.
Also bear in mind that internal signals in FPGAs are best implemented as
separate In and Out ports, because tristate drivers (capable of driving
'Z') no longer exist in modern FPGAs. The logic will still work; but the
tools will effectively replace the tristate drivers with logic gates.
The place you need to use InOut ports is external signals, e.g. to
memory or processors or other FPGAs connected to your FPGA.
- Brian
|