Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Division in VHDL with std_logic_vector

Status
Not open for further replies.

danell

Programmer
Mar 2, 2008
2
RO
I need to implement a chaotic function in a design with VHDL. I use std_logic_vector signals and I need to implement 4 divisions. However, i recieve an error message saying: "Line 40. / can not have such operands in this context."

I use:
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;



Can you please help me?
 
This is the code i used:

library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;


entity imp is
Port ( in1 : in STD_LOGIC_VECTOR (7 downto 0);
in2 : in STD_LOGIC_VECTOR (7 downto 0);
ies : in STD_LOGIC_VECTOR (7 downto 0));
end imp;

architecture Behavioral of imp is

begin

ies <=in1/in2;

end Behavioral;
 
Servus,

First: port ies should be output and not input (ca doar de aia l-ai numit ies de la iesire :)).

Second: you can't not divide a vector to another vector.

Best regards,
Paulie
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top