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.

[SOLVED] using "sra" in vhdl

Status
Not open for further replies.

yamine

Member level 1
Member level 1
Joined
May 4, 2012
Messages
37
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Visit site
Activity points
1,507
hi,
i want to use "sra" for shifting right arithmetic, but i have this error:
"" Error (10476): VHDL error at cordic.vhd(76): type of identifier "y" does not agree with its usage as "bit_vector" type ""
 
Last edited:

Code:
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
USE ieee.numeric_std.ALL;

entity coco is
    Port ( A: in  signed(15 downto 0);
           Z : out signed(15 downto 0) );
end coco;

architecture Behavioral of coco is
begin

Z<= A + (A sra 3);

end Behavioral;
 
Last edited:

Review ieee.numeric_std. sra isn't defined for signed data type.

Code:
Z<= A + shift_right(A,3);
 
  • Like
Reactions: yamine

    yamine

    Points: 2
    Helpful Answer Positive Rating
Thank you FvM,
that resolve my problem,
where can i fine the description of function defined in ieee.numeric_std ?
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top