سلام
کسی میدونه مشکل این برنامه چیه که ارور میده؟
[code=vhdl]----------------------------------------------------------------------------------
-- Company:
-- Engineer:
--
-- Create Date: 10
53 12/07/2015
-- Design Name:
-- Module Name: re2 - Behavioral
-- Project Name:
-- Target Devices:
-- Tool versions:
-- Description:
--
-- Dependencies:
--
-- Revision:
-- Revision 0.01 - File Created
-- Additional Comments:
--
----------------------------------------------------------------------------------
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use ieee.numeric_std.all;
-- Uncomment the following library declaration if using
-- arithmetic functions with Signed or Unsigned values
--use IEEE.NUMERIC_STD.ALL;
-- Uncomment the following library declaration if instantiating
-- any Xilinx primitives in this code.
--library UNISIM;
--use UNISIM.VComponents.all;
entity re2 is
Port ( inc : in STD_LOGIC;
dec : in STD_LOGIC;
Clk : in STD_LOGIC;
onc : in STD_LOGIC;
twc : in STD_LOGIC;
clear : in STD_LOGIC;
rash : in STD_LOGIC;
lash : in STD_LOGIC;
rcsh : in STD_LOGIC;
lcsh : in STD_LOGIC;
co : out STD_LOGIC_VECTOR (3 downto 0));
end re2;
architecture Behavioral of re2 is
signal Dout_sig: STD_LOGIC_VECTOR(3 downto 0):="0000";
begin
process(Clk,Dout_sig)
begin
if Rising_edge(Clk)then
if(inc='1'
then
Dout_sig<= Dout_sig+1;
elsif dec='1' then
Dout_sig<= Dout_sig-1;
elsif onc='1' then
Dout_sig<= (Dout_sig NAND "1111"
;
elsif twc='1' then
Dout_sig<= (Dout_sig NAND "1111"
+1;
elsif clear='1' then
Dout_sig<= (others=>'0'
;
elsif rash='1' then
Dout_sig<= Dout_sig sra 1 ;
elsif lash='1' then
Dout_sig<= Dout_sig sla 1 ;
elsif lcsh='1' then
Dout_sig<= Dout_sig rol 1 ;
elsif rcsh='1' then
Dout_sig<= Dout_sig ror 1 ;
end if;
end if;
co <= Dout_sig;
end process;
end Behavioral;
[/code]
ارور فقط توی شیفت هاست.
[code=vhdl]ERROR:HDLParsers:808 - "C:/Users/Sima/Desktop/az memari/re2/re2.vhd" Line 66. sra can not have such operands in this context.
ERROR:HDLParsers:808 - Line 68. sla can not have such operands in this context.
ERROR:HDLParsers:808 - Line 70. rol can not have such operands in this context.
ERROR:HDLParsers:808 - Line 72. ror can not have such operands in this context.
[/code]
کسی میدونه مشکل این برنامه چیه که ارور میده؟
[code=vhdl]----------------------------------------------------------------------------------
-- Company:
-- Engineer:
--
-- Create Date: 10

-- Design Name:
-- Module Name: re2 - Behavioral
-- Project Name:
-- Target Devices:
-- Tool versions:
-- Description:
--
-- Dependencies:
--
-- Revision:
-- Revision 0.01 - File Created
-- Additional Comments:
--
----------------------------------------------------------------------------------
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use ieee.numeric_std.all;
-- Uncomment the following library declaration if using
-- arithmetic functions with Signed or Unsigned values
--use IEEE.NUMERIC_STD.ALL;
-- Uncomment the following library declaration if instantiating
-- any Xilinx primitives in this code.
--library UNISIM;
--use UNISIM.VComponents.all;
entity re2 is
Port ( inc : in STD_LOGIC;
dec : in STD_LOGIC;
Clk : in STD_LOGIC;
onc : in STD_LOGIC;
twc : in STD_LOGIC;
clear : in STD_LOGIC;
rash : in STD_LOGIC;
lash : in STD_LOGIC;
rcsh : in STD_LOGIC;
lcsh : in STD_LOGIC;
co : out STD_LOGIC_VECTOR (3 downto 0));
end re2;
architecture Behavioral of re2 is
signal Dout_sig: STD_LOGIC_VECTOR(3 downto 0):="0000";
begin
process(Clk,Dout_sig)
begin
if Rising_edge(Clk)then
if(inc='1'

Dout_sig<= Dout_sig+1;
elsif dec='1' then
Dout_sig<= Dout_sig-1;
elsif onc='1' then
Dout_sig<= (Dout_sig NAND "1111"

elsif twc='1' then
Dout_sig<= (Dout_sig NAND "1111"

elsif clear='1' then
Dout_sig<= (others=>'0'

elsif rash='1' then
Dout_sig<= Dout_sig sra 1 ;
elsif lash='1' then
Dout_sig<= Dout_sig sla 1 ;
elsif lcsh='1' then
Dout_sig<= Dout_sig rol 1 ;
elsif rcsh='1' then
Dout_sig<= Dout_sig ror 1 ;
end if;
end if;
co <= Dout_sig;
end process;
end Behavioral;
[/code]
ارور فقط توی شیفت هاست.
[code=vhdl]ERROR:HDLParsers:808 - "C:/Users/Sima/Desktop/az memari/re2/re2.vhd" Line 66. sra can not have such operands in this context.
ERROR:HDLParsers:808 - Line 68. sla can not have such operands in this context.
ERROR:HDLParsers:808 - Line 70. rol can not have such operands in this context.
ERROR:HDLParsers:808 - Line 72. ror can not have such operands in this context.
[/code]
دیدگاه