Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

What's the use of "&" operator in VHDL?

Status
Not open for further replies.

nge

Junior Member level 1
Joined
Mar 31, 2003
Messages
16
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
95
Hi all,

I need help with the VHDL operator '&'. In some documents, it's been listed as bitwise AND operator but in others it's a CONCATENATION operator. In active-help online help, the first page said it's CONCATENATION and on the next page it's bitwise AND. I really need help. Thanks.

Nge
 

air

Member level 3
Joined
Jun 6, 2002
Messages
59
Helped
1
Reputation
2
Reaction score
0
Trophy points
1,286
Activity points
557
vhdl bitwise or

& is concatenation sign without any doubt
 

chaitu2k

Member level 3
Joined
Apr 27, 2004
Messages
55
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
501
bitwise or in vhdl

& - concatination

and - bitwise and operation

any VHDL book will tell u this
 

ikru26

Banned
Joined
Feb 1, 2005
Messages
97
Helped
8
Reputation
16
Reaction score
7
Trophy points
1,288
Location
INDIA
Activity points
0
concatenation operator vhdl

The & operator is a built-in VHDL operator that performs the concatenation of bit_vectors. For example, with the following declarations:

signal a: bit_vector (1 to 4);

signal b: bit_vector (1 to 8);


The following statement would connect a to the right half of b and make the left half of b constant '0'.

b<="0000" & a;

The & appends the a to the end of the "0000" to form a result that contains 8 bits.

Operator: &

The concatenation operator. Each operand must be either an element type or a 1-dimensional array type. The result is a 1-dimensional array type.

hope u r clear now
 

adap

Member level 5
Joined
Feb 16, 2005
Messages
93
Helped
12
Reputation
24
Reaction score
1
Trophy points
1,288
Activity points
2,261
vhdl concatenation operator

It's a concatenation operator in VHDL.
In Verilog works as a bitwise AND operator.
 

amir81

Member level 2
Joined
Mar 1, 2003
Messages
44
Helped
5
Reputation
10
Reaction score
0
Trophy points
1,286
Activity points
322
vhdl and bitwise

"&" is only for concatenation. see ieee standard of vhdl for more information
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top