VHDL concatenation operator (&) with INTEGER type

Status
Not open for further replies.

omara007

Advanced Member level 4
Joined
Jan 6, 2003
Messages
1,237
Helped
50
Reputation
102
Reaction score
16
Trophy points
1,318
Location
Cairo/Egypt
Activity points
9,716
vhdl concatenation

hi guys

how to concatenate integer elements the same way std/bit elements are concatenated using (&) ? .. given that (&) doesn't work with integers
 

concatenation operator in vhdl

If you convert the integer to a vector then you can do it, like the following example shows:

Code:
signal   test    : std_logic_vector(31 downto 0);
constant inttest1: integer := 1234;
constant inttest2: integer := 1234;


  -- conv_std_logic_vector(number, nr_of_bits)
  test <= conv_std_logic_vector(inttest1, 16) & conv_std_logic_vector(inttest2, 16);
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…