Are concat ports supported in VHDL

P

parag_paul

hi All,
IN Verilog we can have something like

module a ( a, .b(v1,v2,v3), c);

in v1,v2,v3;

thus b1 becomes a 3 bit vector. Is that possible in VHDL
If yes can you show me the method. 1076-2000 VHDL standard does not
say anything about it though.
-Parag
 
A

Andy

hi All,
IN Verilog we can have something like

module a ( a, .b(v1,v2,v3), c);

in v1,v2,v3;

thus b1 becomes a 3 bit vector. Is that possible in VHDL
If yes can you show me the method. 1076-2000 VHDL standard does not
say anything about it though.
-Parag

You can alias bits of a vector port, but you cannot alias a vector of
single-bit ports.

Andy
 
P

parag_paul

You can alias bits of a vector port, but you cannot alias a vector of
single-bit ports.

Andy

I am bit unfamiliar with, the terms, aliasing bits of vector port, Do
you mean blasting the vector bits to different ports
 
T

Tricky

hi All,
IN Verilog we can have something like

module a ( a, .b(v1,v2,v3), c);

in v1,v2,v3;

thus b1 becomes a 3 bit vector. Is that possible in VHDL
If yes can you show me the method. 1076-2000 VHDL standard does not
say anything about it though.
-Parag

I think the easiest way in VHDL is to have an intermediate signal
thats a concatenation of the 3 signal bits.

signal concat : std_logic_vector(2 downto 0);
...
concat <= v2 & v1 & v0;

inst : a
port map (
a => a,
b => concat,
c => c
);
 
J

Jonathan Bromley

hi All,
IN Verilog we can have something like

module a ( a, .b(v1,v2,v3), c);

in v1,v2,v3;

thus b1 becomes a 3 bit vector. Is that possible in VHDL

Yes, but not like that. Given a vector port, you can
associate individual bits or slices:

entity submodule is
port (A: in std_logic_vector(7 downto 0); ...);
end;

....
instance_of_submodule:
entity work.submodule
port map (
A(7) => top_bit,
A(6 downto 1) => middle_6,
A(0) => LSB,
...
1076-2000 VHDL standard does not
say anything about it though.

It doesn't need to; the rules about port association
make it clear that the above form is OK.
--
Jonathan Bromley, Consultant

DOULOS - Developing Design Know-how
VHDL * Verilog * SystemC * e * Perl * Tcl/Tk * Project Services

Doulos Ltd., 22 Market Place, Ringwood, BH24 1AW, UK
(e-mail address removed)
http://www.MYCOMPANY.com

The contents of this message may contain personal views which
are not the views of Doulos Ltd., unless specifically stated.
 
T

Tricky

I think the easiest way in VHDL is to have an intermediate signal
thats a concatenation of the 3 signal bits.

signal concat : std_logic_vector(2 downto 0);
..
concat <= v2 & v1 & v0;

inst : a
port map (
a => a,
b => concat,
c => c
);

Or what Jonathan Said :)
 
A

Andy

I am bit unfamiliar with, the terms, aliasing bits of vector port, Do
you mean blasting the vector bits to different ports

No, I mean declaring an alias of a single bit of a vector port. You
can do that, and you can declare other aliases of the other bits.

What you can't do is declare an alias (of type vector) that is a
collection of single bit ports.

To declare an alias is to declare "another name for" some other
object. You can use the alias wherever and however you could use the
object it is renaming.

Andy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top