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

📄 sha1_top.vhd

📁 sha_1加密运算模块
💻 VHD
📖 第 1 页 / 共 4 页
字号:
            visual_S0_current <= S31;          elsif (VIN = "011" and CW = "01") then            SCEN2<='0';SWEN2<='0';SADDR2<="001";            E2<='0';CW<=CW+1;            visual_S0_current <= S31;          elsif (VIN = "011" and CW = "00") then            A_LOGA_CTRL<="00";E3<='0';            NOT_CTRL<='0';REGIN_CTRL<="100";            E2<='1';CW<=CW+1;            visual_S0_current <= S31;          elsif (VIN = "010" and CW = "10") then            A_LOGA_CTRL<="10";NOT_CTRL<='0';            REGIN_CTRL<="100";E4<='1';CW<=CW+1;            E1<='0';            visual_S0_current <= S31;          elsif (VIN = "001") then            SCEN2<='0';SWEN2<='0';SADDR2<="110";E1<='0';            VIN<=VIN+1;            visual_S0_current <= S31;          elsif (VIN = "010" and CW = "00") then            SCEN2<='0';SWEN2<='1';SADDR2<="000";            RAM1_4S<="01";CW<=CW+1;            visual_S0_current <= S31;          elsif (VIN = "010" and CW = "01") then            A_LOGA_CTRL<="11";NOT_CTRL<='0';            REGIN_CTRL<="100";E1<='1';CW<=CW+1;            visual_S0_current <= S31;          elsif (VIN = "011" and CW = "10") then            SCEN2<='0';SWEN2<='1';SADDR2<="110";            VIN<=VIN+1;RAM1_4S<="01";            visual_S0_current <= S31;          elsif (VIN = "101") then            SCEN1<='0';SWEN1<='0';AD1<="101";            SCEN2<='0';SWEN2<='0';SADDR2<="000";            E1<='0';VIN<=VIN+1;COUNT<=COUNT+1;            visual_S0_current <= S31;          elsif (VIN = "100") then            A_LOGA_CTRL<="00";NOT_CTRL<='0';            REGIN_CTRL<="100";E1<='1';            VIN<=VIN+1;            visual_S0_current <= S31;          elsif (VIN = "110") then            if (COUNT > 0 and COUNT < 20) then              VIN<="000";CW<="00";              SCEN1<='1';SWEN1<='1';              SCEN2<='1';SWEN2<='1';              visual_S0_current <= S17;            elsif (COUNT = 20 and (LUN = "00" or LUN = "01" or LUN = "10")) then              VIN<="000";CW<="00";              SCEN1<='1';SWEN1<='1';              SCEN2<='1';SWEN2<='1';              COUNT<="00000";LUN<=LUN+1;              visual_S0_current <= S34;            elsif (LUN = "11" and COUNT = 20) then              VIN<="000";CW<="00";              SCEN1<='1';SWEN1<='1';              SCEN2<='1';SWEN2<='1';              visual_S0_current <= S21;            else              VIN<="000";CW<="00";              SCEN1<='1';SWEN1<='1';              SCEN2<='1';SWEN2<='1';              visual_S0_current <= S31;            end if;          else            visual_S0_current <= S31;          end if;         when S34 =>          if (CW = "01" and VIN = "011") then            A_LOGA_CTRL<="01";A_LOGB_CTRL<="00";            REGIN_CTRL<="011";E2<='1';CW<=CW+1;            visual_S0_current <= S34;          elsif (VIN = "001") then            SCEN1<='0';SWEN1<='1';RAM1_4S<="00";VIN<=VIN+1;            if COUNT=0 then AD1<="001";            elsif COUNT=4 then AD1<="010";            elsif COUNT=8 then AD1<="011";            elsif COUNT=12 then AD1<="100";            elsif COUNT=16 then AD1<="000";            end if;            visual_S0_current <= S34;          elsif (VIN = "010") then            A_LOGA_CTRL<="00";A_LOGB_CTRL<="10";            REGIN_CTRL<="011";E1<='1';VIN<=VIN+1;            visual_S0_current <= S34;          elsif (VIN = "011" and CW = "00") then            E1<='0';SCEN1<='0';SWEN1<='1';CW<=CW+1;            SCEN4<='0';SWEN4<='1';RAM1_4S<="11";            if COUNT=0 then AD1<="011";AD4<="100";            elsif COUNT=4 then AD1<="100";AD4<="000";            elsif COUNT=8 then AD1<="000";AD4<="001";            elsif COUNT=12 then AD1<="001";AD4<="010";            elsif COUNT=16 then AD1<="010";AD4<="011";            end if;            visual_S0_current <= S34;          elsif (VIN = "000") then            VIN<=VIN+1;            visual_S0_current <= S34;          elsif (CW = "10" and VIN = "011") then            SCEN1<='0';SWEN1<='0';AD1<="111";            E2<='0';CW<=CW+1;            visual_S0_current <= S34;          elsif (CW = "11" and VIN = "011") then            SCEN1<='0';SWEN1<='1';AD1<="111";            VIN<=VIN+1;RAM1_4S<="00";            visual_S0_current <= S34;          elsif (VIN = "100") then            A_LOGA_CTRL<="00";A_LOGB_CTRL<="01";            REGIN_CTRL<="011";E1<='1';VIN<=VIN+1;            visual_S0_current <= S34;          elsif (VIN = "101") then            SCEN2<='0';SWEN2<='0';SADDR2<="011";            E1<='0';VIN<=VIN+1;            visual_S0_current <= S34;          elsif (VIN = "110") then            VIN<="000";CW<="00";            SCEN2<='1';SWEN2<='1';            visual_S0_current <= S36;          else            visual_S0_current <= S34;          end if;         when S36 =>          if (CW = "10" and VIN = "011") then            SCEN1<='0';SWEN1<='0';AD1<="111";            E2<='0';CW<=CW+1;            visual_S0_current <= S36;          elsif (CW = "01" and VIN = "011") then            A_LOGA_CTRL<="10";A_LOGB_CTRL<="01";            REGIN_CTRL<="011";E2<='1';CW<=CW+1;            visual_S0_current <= S36;          elsif (VIN = "010") then            A_LOGA_CTRL<="01";A_LOGB_CTRL<="11";            REGIN_CTRL<="011";E1<='1';VIN<=VIN+1;            visual_S0_current <= S36;          elsif (VIN = "011" and CW = "00") then            E1<='0';SCEN1<='0';SWEN1<='1';CW<=CW+1;            SCEN4<='0';SWEN4<='1';RAM1_4S<="11";            if COUNT=1 then AD1<="011";AD4<="100";            elsif COUNT=5 then AD1<="100";AD4<="000";            elsif COUNT=9 then AD1<="000";AD4<="001";            elsif COUNT=13 then AD1<="001";AD4<="010";            elsif COUNT=17 then AD1<="010";AD4<="011";            end if;            visual_S0_current <= S36;          elsif (VIN = "000") then            COUNT<=COUNT+1;            VIN<=VIN+1;            visual_S0_current <= S36;          elsif (VIN = "001") then            SCEN1<='0';SWEN1<='1';RAM1_4S<="00";VIN<=VIN+1;            if COUNT=1 then AD1<="001";            elsif COUNT=5 then AD1<="010";            elsif COUNT=9 then AD1<="011";            elsif COUNT=13 then AD1<="100";            elsif COUNT=17 then AD1<="000";            end if;            visual_S0_current <= S36;          elsif (CW = "11" and VIN = "011") then            SCEN1<='0';SWEN1<='1';AD1<="111";            VIN<=VIN+1;RAM1_4S<="00";            visual_S0_current <= S36;          elsif (VIN = "100") then            A_LOGA_CTRL<="00";A_LOGB_CTRL<="01";            REGIN_CTRL<="011";E1<='1';VIN<=VIN+1;            visual_S0_current <= S36;          elsif (VIN = "101") then            SCEN2<='0';SWEN2<='0';SADDR2<="100";            E1<='0';VIN<=VIN+1;            visual_S0_current <= S36;          elsif (VIN = "110") then            VIN<="000";CW<="00";            SCEN2<='1';SWEN2<='1';            visual_S0_current <= S37;          else            visual_S0_current <= S36;          end if;         when S37 =>          if (VIN = "001") then            SCEN1<='0';SWEN1<='1';RAM1_4S<="11";VIN<=VIN+1;            SCEN4<='0';SWEN4<='1';            if COUNT=2 then AD1<="001";AD4<="010";            elsif COUNT=6 then AD1<="010";AD4<="011";            elsif COUNT=10 then AD1<="011";AD4<="100";            elsif COUNT=14 then AD1<="100";AD4<="000";            elsif COUNT=18 then AD1<="000";AD4<="001";            end if;            visual_S0_current <= S37;          elsif (CW = "10" and VIN = "011") then            SCEN1<='0';SWEN1<='0';AD1<="111";            E2<='0';CW<=CW+1;            visual_S0_current <= S37;          elsif (VIN = "010") then            A_LOGA_CTRL<="00";A_LOGB_CTRL<="10";            REGIN_CTRL<="011";E1<='1';VIN<=VIN+1;            visual_S0_current <= S37;          elsif (VIN = "011" and CW = "00") then            E1<='0';SCEN1<='0';SWEN1<='1';CW<=CW+1;            SCEN4<='0';SWEN4<='1';RAM1_4S<="11";            if COUNT=2 then AD1<="011";AD4<="100";            elsif COUNT=6 then AD1<="100";AD4<="000";            elsif COUNT=10 then AD1<="000";AD4<="001";            elsif COUNT=14 then AD1<="001";AD4<="010";            elsif COUNT=18 then AD1<="010";AD4<="011";            end if;            visual_S0_current <= S37;          elsif (CW = "01" and VIN = "011") then            A_LOGA_CTRL<="11";A_LOGB_CTRL<="10";            REGIN_CTRL<="011";E2<='1';CW<=CW+1;            visual_S0_current <= S37;          elsif (VIN = "000") then            COUNT<=COUNT+1;            VIN<=VIN+1;            visual_S0_current <= S37;          elsif (CW = "11" and VIN = "011") then            SCEN1<='0';SWEN1<='1';AD1<="111";            VIN<=VIN+1;RAM1_4S<="00";            visual_S0_current <= S37;          elsif (VIN = "100") then            A_LOGA_CTRL<="00";A_LOGB_CTRL<="01";            REGIN_CTRL<="011";E1<='1';VIN<=VIN+1;            visual_S0_current <= S37;          elsif (VIN = "101") then            SCEN2<='0';SWEN2<='0';SADDR2<="101";            E1<='0';VIN<=VIN+1;            visual_S0_current <= S37;          elsif (VIN = "110") then            VIN<="000";CW<="00";            SCEN2<='1';SWEN2<='1';            visual_S0_current <= S45;          else            visual_S0_current <= S37;          end if;         when S45 =>          if (VIN = "000") then            SCEN2<='0';SWEN2<='1';SADDR2<="011";            RAM1_4S<="01";VIN<=VIN+1;            visual_S0_current <= S45;          elsif (VIN = "001") then            A_LOGA_CTRL<="00";REGIN_CTRL<="111";            E1<='1';VIN<=VIN+1;            visual_S0_current <= S45;          elsif (VIN = "010") then            SCEN2<='0';SWEN2<='0';SADDR2<="011";            E1<='0';VIN<=VIN+1;            visual_S0_current <= S45;          elsif (VIN = "011") then            VIN<="000";CW<="00";            SCEN2<='1';SWEN2<='1';            visual_S0_current <= S38;          else            visual_S0_current <= S45;          end if;         when S21 =>          if (VIN = "000") then            SCEN2<='0';SWEN2<='1';SADDR2<="001";            RAM1_4S<="01";VIN<=VIN+1;            visual_S0_current <= S21;          elsif (VIN = "011" and CW = "00") then            SCEN1<='0';SWEN1<='1';AD1<="101";            SCEN4<='0';SWEN4<='1';AD4<="110";            RAM1_4S<="11";CW<=CW+1;            visual_S0_current <= S21;          elsif (CW = "11" and VIN = "011") then            A_LOGA_CTRL<="10";A_LOGB_CTRL<="10";            REGIN_CTRL<="000";E3<='1';E2<='0';            VIN<=VIN+1;CW<="00";            visual_S0_current <= S21;          elsif (CW = "01" and VIN = "011") then            A_LOGA_CTRL<="00";A_LOGB_CTRL<="00";            REGIN_CTRL<="000";E1<='1';            CW<=CW+1;            visual_S0_current <= S21;          elsif (VIN = "101") then            SCEN2<='0';SWEN2<='0';SADDR2<="000";            SCEN1<='0';SWEN1<='0';AD1<="000";            E4<='0';VIN<=VIN+1;            visual_S0_current <= S21;          elsif (CW = "10" and VIN = "011") then            A_LOGA_CTRL<="01";A_LOGB_CTRL<="01";            REGIN_CTRL<="000";E2<='1';E1<='0';            CW<=CW+1;            visual_S0_current <= S21;          elsif (VIN = "010") then            E1<='0';SCEN1<='0';SWEN1<='0';            VIN<=VIN+1;AD1<="111";            visual_S0_current <= S21;          elsif (VIN = "001") then            A_LOGA_CTRL<="00";NOT_CTRL<='0';            REGIN_CTRL<="100";E1<='1';VIN<=VIN+1;            visual_S0_current <= S21;          elsif (VIN = "100") then            A_LOGA_CTRL<="11";A_LOGB_CTRL<="11";            REGIN_CTRL<="000";E4<='1';E3<='0';            VIN<=VIN+1;            visual_S0_current <= S21;          elsif (VIN = "110" and CW = "00") then            SCEN2<='1';SWEN2<='1';            SCEN1<='0';SWEN1<='1';AD1<="111";            SCEN4<='0';SWEN4<='1';AD4<="111";            RAM1_4S<="11";CW<=CW+1;            visual_S0_current <= S21;          elsif (VIN = "110" and CW = "01") then            A_LOGA_CTRL<="00";A_LOGB_CTRL<="00";            REGIN_CTRL<="000";E1<='1';CW<=CW+1;            visual_S0_current <= S21;          elsif (VIN = "110" and CW = "10") then            SCEN2<='0';SWEN2<='0';E1<='0';            SADDR2<="001";CW<=CW+1;            SCEN1<='0';SWEN1<='0';AD1<="001";            visual_S0_current <= S21;          elsif (VIN = "110" and CW = "11") then            VIN<="000";CW<="00";            SCEN2<='1';SWEN2<='1';            SCEN1<='1';SWEN1<='1';            OV<='1';            visual_S0_current <= S41;          else            visual_S0_current <= S21;          end if;         when S38 =>          if (VIN = "000") then            COUNT<=COUNT+1;            VIN<=VIN+1;            visual_S0_current <= S38;          elsif (VIN = "001") then            SCEN1<='0';SWEN1<='1';RAM1_4S<="11";VIN<=VIN+1;            SCEN4<='0';SWEN4<='1';            if COUNT=3 then AD1<="001";AD4<="010";            elsif COUNT=7 then AD1<="010";AD4<="011";            elsif COUNT=11 then AD1<="011";AD4<="100";            elsif COUNT=15 then AD1<="100";AD4<="000";            elsif COUNT=19 then AD1<="000";AD4<="001";            end if;            visual_S0_current <= S38;          elsif (VIN = "010") then            A_LOGA_CTRL<="01";A_LOGB_CTRL<="11";            REGIN_CTRL<="011";E1<='1';VIN<=VIN+1;            visual_S0_current <= S38;          elsif (VIN = "011" and CW = "00") then            SCEN1<='0';SWEN1<='1';RAM1_4S<="01";CW<=CW+1;            SCEN2<='0';SWEN2<='1';SADDR2<="011";E1<='0';            if COUNT=3 then AD1<="011";            elsif COUNT=7 then AD1<="100";            elsif COUNT=11 then AD1<="000";            elsif COUNT=15 then AD1<="001";            elsif COUNT=19 then AD1<="010";            end if;            visual_S0_current <= S38;          elsif (CW = "01" and VIN = "011") then            A_LOGA_CTRL<="00";A_LOGB_CTRL<="11";            REGIN_CTRL<="011";E2<='1';CW<=CW+1;            visual_S0_current <= S38;          elsif (CW = "10" and VIN = "011") then            SCEN1<='0';SWEN1<='0';AD1<="111";            E2<='0';CW<=CW+1;            visual_S0_current <= S38;          elsif (CW = "11" and VIN = "011") then            SCEN1<='0';SWEN1<='1';AD1<="111";            VIN<=VIN+1;RAM1_4S<="00";            visual_S0_current <= S38;          elsif (VIN = "100") then            A_LOGA_CTRL<="00";A_LOGB_CTRL<="01";            REGIN_CTRL<="011";E1<='1';VIN<=VIN+1;            visual_S0_current <= S38;          elsif (VIN = "101") then            SCEN2<='0';SWEN2<='0';SADDR2<="110";            E1<='0';VIN<=VIN+1;            visual_S0_current <= S38;          elsif (VIN = "110") then            VIN<="000";CW<="00";            visual_S0_current <= S39;          else            visual_S0_current <= S38;          end if;         when S39 =>          if (VIN = "001") then            A_LOGA_CTRL<="00";NOT_CTRL<='0';            REGIN_CTRL<="100";E1<='1';VIN<=VIN+1;            visual_S0_current <= S39;          elsif (VIN = "010") then            SCEN2<='0';SWEN2<='1';SADDR2<="100";            RAM1_4S<="01";VIN<=VIN+1;E1<='0';            visual_S0_current <= S39;          elsif (VIN = "110" and CW = "00") then            SCEN2<='0';SWEN2<='1';SADDR2<="110";            RAM1_4S<="01";CW<=CW+1;E3<='0';            visual_S0_current <= S39;          elsif (VIN = "011") then            A_LOGA_CTRL<="00";            REGIN_CTRL<="111";E2<='1';VIN<=VIN+1;            visual_S0_current <= S39;          elsif (VIN = "000") then            SCEN2<='0';SWEN2<='1';SADDR2<="011";            RAM1_4S<="01";VIN<=VIN+1;            visual_S0_current <= S39;          elsif (VIN = "100") then            SCEN2<='0';SWEN2<='1';SADDR2<="101";            RAM1_4S<="01";VIN<=VIN+1;E2<='0';            visual_S0_current <= S39;          elsif (VIN = "101") then            A_LOGA_CTRL<="00";            REGIN_CTRL<="111";E3<='1';VIN<=VIN+1;            visual_S0_current <= S39;          elsif (CW = "01" and VIN = "110") then            A_LOGA_CTRL<="00";            REGIN_CTRL<="111";E4<='1';CW<=CW+1;            visual_S0_current <= S39;          elsif (CW = "10" and VIN = "110") then

⌨️ 快捷键说明

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