FPGA应用举例FPGA应用举例
七段译码器
LIBRARY IEEE; USE ENTITY seven_v IS PORT( D : S : END seven_v ; ARCHITECTURE a OF BEGIN PROCESS(D) BEGIN ??? END PROCESS; END a; IEEE.STD_LOGIC_1164.ALL; CASE D IS
WHEN 0 => S S S S S S S S S S S
半加器-(不考虑低位的进位)
LIBRARY ieee; USE ieee.std_logic_1164.all; USE ieee.std_logic_unsigned.all; ENTITY hadd_v IS PORT ( A, B : IN STD_LOGIC; S, C : OUT STD_LOGIC); END hadd_v; ARCHITECTURE a OF hadd_v IS SIGNAL temp : STD_LOGIC_VEC……