سلام.من تازه ISE رو شروع کردم.کدهام ارور زیاد دارن.
کد ریجیستر 4 بیتی با قابلیت افزایش 1 :
----------------------------------------------------------------------------------
-- Company:
-- Engineer:
--
-- Create Date: 23
23 11/27/2015
-- Design Name:
-- Module Name: hdl - 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;
-- 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 hdl is
Port ( clk : in STD_LOGIC;
inc : in STD_LOGIC;
dout : OUT STD_LOGIC_VECTOR (15 downto 0));
end hdl;
architecture Behavioral of hdl is
signal Dout_sig: STD_LOGIC_VECTOR(15 downto 0);
begin
dout <= Dout_sig;
process(Clk)
begin
if(clk='1' and clk'event)then
if(inc='1'
then
Dout_sig<= Dout_sig+1;
end if;
end if;
end process;
end Behavioral;
کد ریجیستر 4 بیتی با قابلیت افزایش 1 :
----------------------------------------------------------------------------------
-- Company:
-- Engineer:
--
-- Create Date: 23

-- Design Name:
-- Module Name: hdl - 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;
-- 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 hdl is
Port ( clk : in STD_LOGIC;
inc : in STD_LOGIC;
dout : OUT STD_LOGIC_VECTOR (15 downto 0));
end hdl;
architecture Behavioral of hdl is
signal Dout_sig: STD_LOGIC_VECTOR(15 downto 0);
begin
dout <= Dout_sig;
process(Clk)
begin
if(clk='1' and clk'event)then
if(inc='1'

Dout_sig<= Dout_sig+1;
end if;
end if;
end process;
end Behavioral;
دیدگاه