Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > VHDL > Port map with combining

Reply
Thread Tools

Port map with combining

 
 
Sylvain Munaut
Guest
Posts: n/a
 
      08-05-2004
Hi,

I have a component that wants a std_logic_vector of 4 bits.
Now, I have a std_logic and a std_logic_vector of 3 bits.

Is it possible to port map it without defining an intermediate signal, like

signal vect : std_logic_vector(2 downto 0);
signal bit : std_logic;

.... port map (
vect4bit => bit & vect,
...
);

But that doesn't work ...



Sylvain Munaut
 
Reply With Quote
 
 
 
 
Jim Lewis
Guest
Posts: n/a
 
      08-05-2004
Sylvain,
Assuming that vect4bit has the range 3 downto 0:

port map (
vect4bit(3) => bit,
vect4bit(2 downto 0) => vect,
. . .
) ;

Cheers,
Jim
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~
Jim Lewis
Director of Training (E-Mail Removed)
SynthWorks Design Inc. http://www.SynthWorks.com
1-503-590-4787

Expert VHDL Training for Hardware Design and Verification
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~

> Hi,
>
> I have a component that wants a std_logic_vector of 4 bits.
> Now, I have a std_logic and a std_logic_vector of 3 bits.
>
> Is it possible to port map it without defining an intermediate signal, like
>
> signal vect : std_logic_vector(2 downto 0);
> signal bit : std_logic;
>
> ... port map (
> vect4bit => bit & vect,
> ...
> );
>
> But that doesn't work ...
>
>
>
> Sylvain Munaut

 
Reply With Quote
 
 
 
 
Sylvain Munaut
Guest
Posts: n/a
 
      08-05-2004
Jim Lewis wrote:
> Sylvain,
> Assuming that vect4bit has the range 3 downto 0:
>
> port map (
> vect4bit(3) => bit,
> vect4bit(2 downto 0) => vect,
> . . .
> ) ;
>
> Cheers,
> Jim


Exactly thanks !

I havent't seen such an example in tutorials/intro, pity ;(


Sylvain
 
Reply With Quote
 
 
 
Reply

Thread Tools

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

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
std::map::find() throws exception when map is empty? Matthias Hildebrand C++ 5 03-20-2012 06:09 AM
I can map all files (.*) to asp.net worker.How do I map NO FILE to asp.net worker? alex ASP .Net 1 02-04-2005 03:18 AM
searching keys in std::map using map::upper_bound Erik Arner C++ 0 11-02-2004 11:14 PM
map.insert(key,val) vs. map[key]=val ? Patrick Guio C++ 6 10-20-2004 01:54 PM
map that maps to iterators in the same map ? Vlad C++ 0 12-15-2003 08:29 PM



Advertisments