fpga_feixiang 发表于 2019-1-24 13:49:55

VHDL流水灯设计

library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
use ieee.std_logic_arith.all;
entity liushui is
port(
clk:IN std_logic;
clr:IN std_logic;
ena:IN std_logic;
y:out std_logic_vector (7 downto 0) );
end;
architecture behave of liushui is
begin
signal y_out:std_logic_vector(7 downto 0); process(clk,clr,ena) if clr = '0' then y_out<= "00000001"; elsif clk'event and clk = '1' then if ena = '1' then y_out <= y_out<<1; end if; end if;end process; y <= y_out; end behave;

zhangyukun 发表于 2019-1-25 09:13:57

VHDL流水灯设计

晓灰灰 发表于 2019-1-25 11:50:59

VHDL流水灯设计
页: [1]
查看完整版本: VHDL流水灯设计