Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
17268 Discussions

std_logic_vector type does not match integer literal

Altera_Forum
Honored Contributor II
10,220 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,830 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,830 Views

success 

 

For hex number 

16## <- this wrong 

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

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

0 Kudos
Altera_Forum
Honored Contributor II
6,830 Views

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

0 Kudos
Reply