Go Back   Velocity Reviews > Newsgroups > VHDL
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

VHDL - component port mapping

 
Thread Tools Search this Thread
Old 06-15-2005, 08:43 AM   #1
Default component port mapping


Hi,
I just want to know if I missed something...
If you have a toplevel entity with say a bus of single std_logic
signals of inout mode and want to use this within a component, you
can't really combine the signals to a std_logic_vector... right? That
means you have to use the single inout signals on the component as well
and use the toplevel entity signal names as actuals for the component
instantiation.
Two reasons:
- if you use a signal assignment to map the signals into a vector, its
only one direction...
- u can't use array aggregates as actuals, beause they're not locally
static, so a concatenation of type data => d4 & d3 & d2 & d1 would
not work...

Do you guys agree or did I miss a possibility?
Cheers
Andreas



ajahn
  Reply With Quote
Old 06-15-2005, 09:45 AM   #2
Stephane
 
Posts: n/a
Default Re: component port mapping
what about this 'struct' solution: no in, no out, no hassle!

type data_t is record
d1 : std_logic;
d2 : std_logic;
d3 : std_logic;
d4 : std_logic;
end record;

entity MY_ENT is
....
data: inout data_t;
....

ajahn wrote:
> Hi,
> I just want to know if I missed something...
> If you have a toplevel entity with say a bus of single std_logic
> signals of inout mode and want to use this within a component, you
> can't really combine the signals to a std_logic_vector... right? That
> means you have to use the single inout signals on the component as well
> and use the toplevel entity signal names as actuals for the component
> instantiation.
> Two reasons:
> - if you use a signal assignment to map the signals into a vector, its
> only one direction...
> - u can't use array aggregates as actuals, beause they're not locally
> static, so a concatenation of type data => d4 & d3 & d2 & d1 would
> not work...


no, but you workaround:
signal data_in: std_logic_vector(3 downto 0);
signal data_out: std_logic_vector(3 downto 0);
begin
....
data_out <= d4 & d3 & d2 & d1;
din1 <= data_in(0);
....
--instanciation:
....
data_out=>data_out,
data_in=>data_in,
....


I prefer the 'record' solution, but some tools don't seem to !

>
> Do you guys agree or did I miss a possibility?
> Cheers
> Andreas
>



Stephane
  Reply With Quote
Old 06-15-2005, 03:27 PM   #3
Ralf Hildebrandt
 
Posts: n/a
Default Re: component port mapping
ajahn wrote:

> If you have a toplevel entity with say a bus of single std_logic
> signals of inout mode and want to use this within a component, you
> can't really combine the signals to a std_logic_vector... right?


> - if you use a signal assignment to map the signals into a vector, its
> only one direction...
> - u can't use array aggregates as actuals, beause they're not locally
> static, so a concatenation of type data => d4 & d3 & d2 & d1 would
> not work...


Using ports of type inout is often not a good way in deeper hierarchy of
the design. Split every inout signals into one signal for input and one
for output direction.

Ralf


Ralf Hildebrandt
  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can not access console port of Cisco 7200 vxr mansurbd Hardware 1 01-12-2009 06:53 PM
How to check current event and port status for Aliwei FXO gateway Robin wang Hardware 0 04-11-2008 09:54 AM
Port 445: Effective/Safe Blocking Samwise General Help Related Topics 0 01-06-2008 09:19 PM
Long, regarding a "lost" COM port smackedass A+ Certification 4 02-05-2007 04:55 PM
Sony's BR Disc won't downrez to component Goro DVD Video 7 03-16-2006 04:44 PM




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46