Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
17263 Discussions

std_logic_vector type does not match integer literal

Altera_Forum
Honored Contributor II
10,192 Views

Error (10517): VHDL type mismatch error at Transmit2.vhd(118): std_logic_vector type does not match integer literal 

 

at 

 

constant preamble : STD_LOGIC_VECTOR (31 DOWNTO 0) := 16#55#; -- 16 bits * 2 = 32
0 Kudos
4 Replies
Altera_Forum
Honored Contributor II
6,802 Views

 

--- Quote Start ---  

std_logic_vector type does not match integer literal 

--- Quote End ---  

 

That's true according to VHDL specification. Unless you apply a type conversion, std_logic_vector can be only assigned to a bit string literal of correct bit length, e.g.  

 

constant preamble : STD_LOGIC_VECTOR (31 DOWNTO 0) := x"00000055";
0 Kudos
Altera_Forum
Honored Contributor II
6,802 Views

success 

 

For hex number 

16## <- this wrong 

x"" <- this correct
0 Kudos
Altera_Forum
Honored Contributor II
6,802 Views

x"012345" is a hex string. It is not an integer.

0 Kudos
Altera_Forum
Honored Contributor II
6,802 Views

i got it, so that i write for hex number, in the another post, i thought it as an integer

0 Kudos
Reply