module shft_reg (CLR , SET , DIR , CE , LOAD , DATA , SI , data_out , CLK ); input CLR , SET , CE , LOAD , DIR , SI , CLK ; input [3:0] DATA ; output [3:0] data_out ; reg [3:0] TEMP; always @(posedge CLK ) begin if (CE == 1'b1) if (CLR == 1'b1) TEMP... [阅读全文]
library IEEE; use IEEE.std_logic_1164.all; entity ffd is port ( CLR : in std_logic; SET : in std_logic; CE : in std_logic; LOAD : in std_logic; CLK : in std_logic; DATA_IN : in std_logic_vector (7 downto 0); DATA_OUT : out std_logic_vector (7 downto... [阅读全文]
library IEEE; use IEEE.std_logic_1164.all; entity bin27seg is port ( data_in : in std_logic_vector (3 downto 0); EN : in std_logic; data_out : out std_logic_vector (6 downto 0) ); end entity; architecture bin27seg_arch of bin27seg is begin process(d... [阅读全文]
library IEEE; use IEEE.std_logic_1164.all; entity bin2bcd is port( data_in : in std_logic_vector(3 downto 0); EN : in std_logic; data_out : out std_logic_vector(7 downto 0) ); end entity; architecture bin2bcd of bin2bcd is begin process(data_in, EN)... [阅读全文]