M
MNQ
Guest
Hi reader
I am trying to rotate a serial data stream in a 7 bit register but keep
getting the following error.
--------------------------------------------
Started process "Synthesize".
=========================================================================
* HDL Compilation *
=========================================================================
Compiling vhdl file H:/naveed/test/rotate.vhd in Library work.
ERROR:HDLParsers:800 - H:/naveed/test/rotate.vhd Line 35. Type of temp is
incompatible with type of data_in.
-->
Total memory usage is 40216 kilobytes
Error: XST failed
Reason:
Completed process "Synthesize".
-------------------------------------------
Can anyone tell me where I am going wrong. As I have spent along time and
cannot figure it out. I have pasted the code below. I would be grateful
for any hep.
Thanks
Naveed
--**************************************************************************
*************
-- Project : Rotate register
-- Author : Naveed Qayyum
-- Date : 15th April 2004
-- Notes : Demonstration of the ror and rol function used to rotate the
serial data
-- received within the temp register.
--**************************************************************************
*************
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
-- Uncomment the following lines to use the declarations that are
-- provided for instantiating Xilinx primitive components.
--library UNISIM;
--use UNISIM.VComponents.all;
entity rotate is
Port ( clock : in std_logic;
reset : in std_logic;
data_in : in std_logic);
end rotate;
architecture Behavioral of rotate is
signal temp : bit_vector (7 downto 0);
begin
rotate : process (clock, reset)
begin
if reset='1' then
temp <= "00000000";
elsif clock='1' and clock'event then
temp(0) <= data_in;
temp <= temp rol 1;
end if;
end process rotate;
end Behavioral;
I am trying to rotate a serial data stream in a 7 bit register but keep
getting the following error.
--------------------------------------------
Started process "Synthesize".
=========================================================================
* HDL Compilation *
=========================================================================
Compiling vhdl file H:/naveed/test/rotate.vhd in Library work.
ERROR:HDLParsers:800 - H:/naveed/test/rotate.vhd Line 35. Type of temp is
incompatible with type of data_in.
-->
Total memory usage is 40216 kilobytes
Error: XST failed
Reason:
Completed process "Synthesize".
-------------------------------------------
Can anyone tell me where I am going wrong. As I have spent along time and
cannot figure it out. I have pasted the code below. I would be grateful
for any hep.
Thanks
Naveed
--**************************************************************************
*************
-- Project : Rotate register
-- Author : Naveed Qayyum
-- Date : 15th April 2004
-- Notes : Demonstration of the ror and rol function used to rotate the
serial data
-- received within the temp register.
--**************************************************************************
*************
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
-- Uncomment the following lines to use the declarations that are
-- provided for instantiating Xilinx primitive components.
--library UNISIM;
--use UNISIM.VComponents.all;
entity rotate is
Port ( clock : in std_logic;
reset : in std_logic;
data_in : in std_logic);
end rotate;
architecture Behavioral of rotate is
signal temp : bit_vector (7 downto 0);
begin
rotate : process (clock, reset)
begin
if reset='1' then
temp <= "00000000";
elsif clock='1' and clock'event then
temp(0) <= data_in;
temp <= temp rol 1;
end if;
end process rotate;
end Behavioral;