⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 leadsign.vhd

📁 基于VHDL语言的32位单精度的浮点加法器
💻 VHD
字号:
Library IEEE;
use IEEE.std_logic_1164.all;

entity LEADSIGN is
    port (
        DIN : in std_logic_vector(24 downto 0);
        CNT : out std_logic_vector(4 downto 0)
         );
end LEADSIGN;

architecture RTL of LEADSIGN is

begin

p0 : process (DIN)
     variable NUM : std_logic_vector(4 downto 0);
     variable Cin, Cout : std_logic;
begin
     NUM := (others => '0');
     for j in 23 downto 0 loop
          if (DIN(j) = DIN(24)) then 
               Cin := '1';
               for k in 0 to 4 loop
                      Cout    := NUM(k) and Cin;
                      Num(k)  := NUM(k) xor Cin;
                      Cin     := Cout;
               end loop;
           else
               exit;
           end if;
      end loop;
      CNT <= NUM;
    end process;
end RTL;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -