📄 des3_top.vhd
字号:
Se11 <= D(11); Se12 <= D(12); Se13 <= D(13); Se14 <= D(14); Se15 <= D(15); Se16 <= D(16); Se17 <= D(17); Se18 <= D(18); Se19 <= D(19); Se20 <= D(20); Se21 <= D(21); Se22 <= D(22); Se23 <= D(23); Se24 <= D(24); Se25 <= D(25); Se26 <= D(26); Se27 <= D(27); Se28 <= D(28); Se29 <= D(29); Se30 <= D(30); Se31 <= D(31); Q(63) <= Se24; Q(62) <= Se56; Q(61) <= Se16; Q(60) <= Se48; Q(59) <= Se8; Q(58) <= Se40; Q(57) <= Se0; Q(56) <= Se32; Q(55) <= Se25; Q(54) <= Se57; Q(53) <= Se17; Q(52) <= Se49; Q(51) <= Se9; Q(50) <= Se41; Q(49) <= Se1; Q(48) <= Se33; Q(47) <= Se26; Q(46) <= Se58; Q(45) <= Se18; Q(44) <= Se50; Q(43) <= Se10; Q(42) <= Se42; Q(41) <= Se2; Q(40) <= Se34; Q(39) <= Se27; Q(38) <= Se59; Q(37) <= Se19; Q(36) <= Se51; Q(35) <= Se11; Q(34) <= Se43; Q(33) <= Se3; Q(32) <= Se35; Q(31) <= Se28; Q(30) <= Se60; Q(29) <= Se20; Q(28) <= Se52; Q(27) <= Se12; Q(26) <= Se44; Q(25) <= Se4; Q(24) <= Se36; Q(23) <= Se29; Q(22) <= Se61; Q(21) <= Se21; Q(20) <= Se53; Q(19) <= Se13; Q(18) <= Se45; Q(17) <= Se5; Q(16) <= Se37; Q(15) <= Se30; Q(14) <= Se62; Q(13) <= Se22; Q(12) <= Se54; Q(11) <= Se14; Q(10) <= Se46; Q(9) <= Se6; Q(8) <= Se38; Q(7) <= Se31; Q(6) <= Se63; Q(5) <= Se23; Q(4) <= Se55; Q(3) <= Se15; Q(2) <= Se47; Q(1) <= Se7; Q(0) <= Se39;end PMT64_64_E;----------------------------------------------------
--
-- Library Name : DES3
-- Unit Name : sbox6_4h
-- Unit Type : Text Unit
--
------------------------------------------------------
------------------------------------------
------------------------------------------
-- Date : Wed Aug 21 17:33:50 2002
--
-- Author : liuyb
--
-- Company : wisdom
--
-- Description :
--
------------------------------------------
------------------------------------------
library ieee; use ieee.STD_LOGIC_1164.all;
library std; use std.STANDARD.all;
entity sbox6_4h is
port (
Q: out STD_LOGIC_VECTOR (3 downto 0) ;
D : in STD_LOGIC_VECTOR (5 downto 0)
);
end;
------------------------------------------
------------------------------------------
-- Date : Wed Aug 21 17:37:56 2002
--
-- Author : liuyb
--
-- Company : wisdom
--
-- Description :
--
------------------------------------------
------------------------------------------
architecture sbox6_4h of sbox6_4h is
begin
process(D)
begin
case D is
when "000000" =>
Q <= "1101";
when "000001" =>
Q <= "0001";
when "000010" =>
Q <= "0010";
when "000011" =>
Q <= "1111";
when "000100" =>
Q <= "1000";
when "000101" =>
Q <= "1101";
when "000110" =>
Q <= "0100";
when "000111" =>
Q <= "1000";
when "001000" =>
Q <= "0110";
when "001001" =>
Q <= "1010";
when "001010" =>
Q <= "1111";
when "001011" =>
Q <= "0011";
when "001100" =>
Q <= "1011";
when "001101" =>
Q <= "0111";
when "001110" =>
Q <= "0001";
when "001111" =>
Q <= "0100";
when "010000" =>
Q <= "1010";
when "010001" =>
Q <= "1100";
when "010010" =>
Q <= "1001";
when "010011" =>
Q <= "0101";
when "010100" =>
Q <= "0011";
when "010101" =>
Q <= "0110";
when "010110" =>
Q <= "1110";
when "010111" =>
Q <= "1011";
when "011000" =>
Q <= "0101";
when "011001" =>
Q <= "0000";
when "011010" =>
Q <= "0000";
when "011011" =>
Q <= "1110";
when "011100" =>
Q <= "1100";
when "011101" =>
Q <= "1001";
when "011110" =>
Q <= "0111";
when "011111" =>
Q <= "0010";
when "100000" =>
Q <= "0111";
when "100001" =>
Q <= "0010";
when "100010" =>
Q <= "1011";
when "100011" =>
Q <= "0001";
when "100100" =>
Q <= "0100";
when "100101" =>
Q <= "1110";
when "100110" =>
Q <= "0001";
when "100111" =>
Q <= "0111";
when "101000" =>
Q <= "1001";
when "101001" =>
Q <= "0100";
when "101010" =>
Q <= "1100";
when "101011" =>
Q <= "1010";
when "101100" =>
Q <= "1110";
when "101101" =>
Q <= "1000";
when "101110" =>
Q <= "0010";
when "101111" =>
Q <= "1101";
when "110000" =>
Q <= "0000";
when "110001" =>
Q <= "1111";
when "110010" =>
Q <= "0110";
when "110011" =>
Q <= "1100";
when "110100" =>
Q <= "1010";
when "110101" =>
Q <= "1001";
when "110110" =>
Q <= "1101";
when "110111" =>
Q <= "0000";
when "111000" =>
Q <= "1111";
when "111001" =>
Q <= "0011";
when "111010" =>
Q <= "0011";
when "111011" =>
Q <= "0101";
when "111100" =>
Q <= "0101";
when "111101" =>
Q <= "0110";
when "111110" =>
Q <= "1000";
when "111111" =>
Q <= "1011";
when others =>
null;
end case ;
end process ;
end;
----------------------------------------------------
--
-- Library Name : DES3
-- Unit Name : sbox6_4g
-- Unit Type : Text Unit
--
------------------------------------------------------
------------------------------------------
------------------------------------------
-- Date : Wed Aug 21 17:33:50 2002
--
-- Author : liuyb
--
-- Company : wisdom
--
-- Description :
--
------------------------------------------
------------------------------------------
library ieee; use ieee.STD_LOGIC_1164.all;
library std; use std.STANDARD.all;
entity sbox6_4g is
port (
Q: out STD_LOGIC_VECTOR (3 downto 0) ;
D : in STD_LOGIC_VECTOR (5 downto 0)
);
end;
------------------------------------------
------------------------------------------
-- Date : Wed Aug 21 17:37:56 2002
--
-- Author : liuyb
--
-- Company : wisdom
--
-- Description :
--
------------------------------------------
------------------------------------------
architecture sbox6_4g of sbox6_4g is
begin
process(D)
begin
case D is
when "000000" =>
Q <= "0100";
when "000001" =>
Q <= "1101";
when "000010" =>
Q <= "1011";
when "000011" =>
Q <= "0000";
when "000100" =>
Q <= "0010";
when "000101" =>
Q <= "1011";
when "000110" =>
Q <= "1110";
when "000111" =>
Q <= "0111";
when "001000" =>
Q <= "1111";
when "001001" =>
Q <= "0100";
when "001010" =>
Q <= "0000";
when "001011" =>
Q <= "1001";
when "001100" =>
Q <= "1000";
when "001101" =>
Q <= "0001";
when "001110" =>
Q <= "1101";
when "001111" =>
Q <= "1010";
when "010000" =>
Q <= "0011";
when "010001" =>
Q <= "1110";
when "010010" =>
Q <= "1100";
when "010011" =>
Q <= "0011";
when "010100" =>
Q <= "1001";
when "010101" =>
Q <= "0101";
when "010110" =>
Q <= "0111";
when "010111" =>
Q <= "1100";
when "011000" =>
Q <= "0101";
when "011001" =>
Q <= "0010";
when "011010" =>
Q <= "1010";
when "011011" =>
Q <= "1111";
when "011100" =>
Q <= "0110";
when "011101" =>
Q <= "1000";
when "011110" =>
Q <= "0001";
when "011111" =>
Q <= "0110";
when "100000" =>
Q <= "0001";
when "100001" =>
Q <= "0110";
when "100010" =>
Q <= "0100";
when "100011" =>
Q <= "1011";
when "100100" =>
Q <= "1011";
when "100101" =>
Q <= "1101";
when "100110" =>
Q <= "1101";
when "100111" =>
Q <= "1000";
when "101000" =>
Q <= "1100";
when "101001" =>
Q <= "0001";
when "101010" =>
Q <= "0011";
when "101011" =>
Q <= "0100";
when "101100" =>
Q <= "0111";
when "101101" =>
Q <= "1010";
when "101110" =>
Q <= "1110";
when "101111" =>
Q <= "0111";
when "110000" =>
Q <= "1010";
when "110001" =>
Q <= "1001";
when "110010" =>
Q <= "1111";
when "110011" =>
Q <= "0101";
when "110100" =>
Q <= "0110";
when "110101" =>
Q <= "0000";
when "110110" =>
Q <= "1000";
when "110111" =>
Q <= "1111";
when "111000" =>
Q <= "0000";
when "111001" =>
Q <= "1110";
when "111010" =>
Q <= "0101";
when "111011" =>
Q <= "0010";
when "111100" =>
Q <= "1001";
when "111101" =>
Q <= "0011";
when "111110" =>
Q <= "0010";
when "111111" =>
Q <= "1100";
when others =>
null;
end case ;
end process ;
end;
----------------------------------------------------
--
-- Library Name : DES3
-- Unit Name : sbox6_4f
-- Unit Type : Text Unit
--
------------------------------------------------------
------------------------------------------
------------------------------------------
-- Date : Wed Aug 21 17:33:50 2002
--
-- Author : liuyb
--
-- Company : wisdom
--
-- Description :
--
------------------------------------------
------------------------------------------
library ieee; use ieee.STD_LOGIC_1164.all;
library std; use std.STANDARD.all;
entity sbox6_4f is
port (
Q: out STD_LOGIC_VECTOR (3 downto 0) ;
D : in STD_LOGIC_VECTOR (5 downto 0)
);
end;
------------------------------------------
------------------------------------------
-- Date : Wed Aug 21 17:37:56 2002
--
-- Author : liuyb
--
-- Company : wisdom
--
-- Description :
--
------------------------------------------
------------------------------------------
architecture sbox6_4f of sbox6_4f is
begin
process(D)
begin
case D is
when "000000" =>
Q <= "1100";
when "000001" =>
Q <= "1010";
when "000010" =>
Q <= "0001";
when "000011" =>
Q <= "1111";
when "000100" =>
Q <= "1010";
when "000101" =>
Q <= "0100";
when "000110" =>
Q <= "1111";
when "000111" =>
Q <= "0010";
when "001000" =>
Q <= "1001";
when "001001" =>
Q <= "0111";
when "001010" =>
Q <= "0010";
when "001011" =>
Q <= "1100";
when "001100" =>
Q <= "0110";
when "001101" =>
Q <= "1001";
when "001110" =>
Q <= "1000";
when "001111" =>
Q <= "0101";
when "010000" =>
Q <= "0000";
when "010001" =>
Q <= "0110";
when "010010" =>
Q <= "1101";
when "010011" =>
Q <= "0001";
when "010100" =>
Q <= "0011";
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -