Continue to Site

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.

truncating std_logic_vector question

Status
Not open for further replies.

vivo_m

Member level 3
Member level 3
Joined
May 15, 2011
Messages
54
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Visit site
Activity points
1,903
I'm trying to multiply two std_logic_vector(7 downto 0), i know the result will be new std_logic_vector(15 downto 0) but actually i want the output result to be std_logic_vector(7 downto 0)..
is there any idea how can i do this..
 

signal temp_result : std_logic_vector ( 15 downto 0 )
signal result : std_logic_vector ( 7 downto 0 ) ;

temp_result <= vector1 * vector2 ;
result <= temp_result ( 7 downto 0 ) ;
 
  • Like
Reactions: vivo_m

    vivo_m

    Points: 2
    Helpful Answer Positive Rating
you cannot multiply std_logic_vectors. you need to use signed or unsigned type. But the method is the same as above.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top