Hi Kevin,
On 20 Feb., 12:03, "KJ" <kkjenni...@sbcglobal.net> wrote:
> > 1) The lcdexample top entity knows about the outputs of the
> > lcd_driver. If the external interface changes, both lcdexample and
> > lcd_driver have to be adjusted. I could work around that by using the
> > record type for the external interface of the LC display but I am not
> > sure if it is supported by XST.
>
> 'Usually' most people standardize on std_logic(_vector) for all top level
> entities because it presents the least problems when someone else tries to
> reuse that entity. Not to say that you can't use record types but most
> don't. If you do, you'll find that you need to seperate the 'record' into
> one for each VHDL mode (i.e. one type for 'in', another for 'out' and a
> third for 'inout' if you have more than just 'out').
Good point. I found that creating record types for inputs and outputs
is just not worth the hassle
> > Is there any way that lcd_driver can
> > connect to external FPGA pins without passing the ports from the
> > containing component?
>
> No magic....and really I don't think you want any. You're assuming that
> just because your lower level component has the same port names as the top
> level that you will always want to connect them up to each other without any
> intervening logic. That is not always the case, if you want something
> connected it is much clearer to specify that connection in plain text (i.e.
> your code) rather than rely on some behind the scenes shenanigans.
I just want to get rid of three different names for basically the same
signal: One for the pin going out of the FPGA, one for my local signal
(which I need to monitor the signal) and one for the other side of the
internal component it is connected to.
But I am glad that I did not miss anything obvious.
> Generally though, those 100 I/O pins may be mapped not to just one entity
> but to several at the top level....not always, but many times...unless that
> top level of the VHDL is a simple wrapper around something else.
Sure, which makes me nervous already with only little functionality.
Especially when they are mapped to different component depending on
the system state.
> > 2) Is there any naming convention for the input/output ports and local
> > signals corresponding to those? I'd like to only have lcd_data,
> > lcd_command and lcd_enable in lcdhello, which goes through the
> > lcd_driver entity to the LCD. If there is no solution to (1), how do
> > you work around that? Any proven naming conventions for ports and
> > signals?
>
> What exactly are you trying to 'work around'?
Having basically the same signal at different levels inside the same
name space.
For example, my LCD controller driver has an enable input but also has
an enable output going to the real LCD controller outside the FPGA. At
first, I called each of these signals "lcd_enable". (The LCD driver
accepts 8 bit characters and outputs in 4 bit nibbles, which is why
the enable signal going outside toggles a few times for each byte).
Greetings, Torsten