p.vhd

来自「破解des算法的程序」· VHDL 代码 · 共 49 行

VHD
49
字号
---------|---------|---------|---------|---------|---------|---------|---------|-- Author          :  Tom Vu                                     -- Date            :  09/27/9&                                  -- Description	   :  Left and Right 32-bit registers               -- FILE	NAME       :  p.vhd                                                          -- -----------------------------------------------------------------------------library ieee;use IEEE.std_logic_1164.all;use IEEE.std_logic_arith.all;use IEEE.std_logic_unsigned.all;-- -----------------------------------------------------------------------------entity P isport(	P_IN     	: in     std_logic_vector(31 downto 0);       	P_OUT   	: out    std_logic_vector(31 downto 0)    );end P;-- -----------------------------------------------------------------------------architecture beh of P is-- -----------------------------------------------------------------------------subtype small_integer is INTEGER range 0 to 31;type P_TYPE is array(0 to 31) of small_integer;signal P_TABLE : P_TYPE;beginP_TABLE <= 	(11,17, 5,27,25,10,20, 0,		 13,21, 3,28,29, 7,18,24,		 31,22,12, 6,26, 2,16, 8,		 14,30, 4,19, 1, 9,15,23);	-- -----------------------------------------------------------------------------P_PR: process(P_TABLE,P_IN)-- -----------------------------------------------------------------------------begin	for i in 0 to 31 loop	    P_OUT(P_TABLE(i)) <= P_IN(i);	end loop;end process P_PR;-- -----------------------------------------------------------------------------end beh;-- -----------------------------------------------------------------------------

⌨️ 快捷键说明

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