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

What it means ? 'left

Altera_Forum
Honored Contributor II
1,164 Views

Hi, 

 

Could you explain to me the "left" of this code ? 

signal reset : std_logic_vector(15 downto 0) := (others => '1'); 

reset <= reset(reset'left - 1 downto 0) & "0"; 

 

Thanks 

 

Jennifer
0 Kudos
2 Replies
Altera_Forum
Honored Contributor II
438 Views

signals have attributes.  

you may read more in books "Circuit design in VHDL", "VHDL progamming by example" and so on. 

if you have vector with definition like above LEFT attribute should return 15 , and in this case it is equal to value of HIGH attribute 

if you will have declaration reset : std_logic_vector(0 to 15) then LEFT return 0 which equal to value of LOW attribute, but HIGH and RIGHT return 15. 

 

if you concatenate bit to vector => use single quote for bit, '0' instead of "0" for exclude misleading, possible errors.
0 Kudos
Reply