非线性查找表

此项目是VHDL中的非线性查找表。在该VHDL项目中,在VHDL中实现了非线性查找表,该表用于即将来临协处理器的哈希函数中。哈希算法中使用的非线性运算利用并行的4位非线性运算,其中输入半字节(4位)被映射到另一个非线性4位值。了解更多请下载附件。

应用介绍

此项目是VHDL中的非线性查找表。

在该VHDL项目中,在VHDL中实现了非线性查找表,该表用于即将来临协处理器的哈希函数中。哈希算法中使用的非线性运算利用并行的4位非线性运算,其中输入半字节(4位)被映射到另一个非线性4位值。

非线性查找运算单元如下图所示:

LookupTable1.png

查找表实现的详细信息如下:

3.png

本人在下方展示了非线性查找表实现的VHDL代码;想了解更多请下载附件。

library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
-- fpga4student.com: FPGA projects, Verilog projects, VHDL projects
-- VHDL project: VHDL implementation of Lookup Table
---------------------------------------------------
-- Non-linear Lookup Table Implementation in VHDL--
---------------------------------------------------
entity non_linear_lookup is
port (  LUTIN: in std_logic_vector(7 downto 0);
   LUTOUT: out std_logic_vector(7 downto 0)
 );
end non_linear_lookup;
architecture Behavioral of non_linear_lookup is
signal MSN_in,LSN_in,MSN_out,LSN_out: std_logic_vector(3 downto 0);
begin
MSN_in <= LUTIN(7 downto 4);
LSN_in <= LUTIN(3 downto 0);
SBOX_1: process(MSN_in) begin
case(MSN_in) is
 when "0000" => MSN_out <= "0001";
 when "0001" => MSN_out <= "1011";
 when "0010" => MSN_out <= "1001";
 when "0011" => MSN_out <= "1100";
 when "0100" => MSN_out <= "1101";
 when "0101" => MSN_out <= "0110";
 when "0110" => MSN_out <= "1111";
 when "0111" => MSN_out <= "0011";
 when "1000" => MSN_out <= "1110";
 when "1001" => MSN_out <= "1000";
 when "1010" => MSN_out <= "0111";
 when "1011" => MSN_out <= "0100";
 when "1100" => MSN_out <= "1010";
 when "1101" => MSN_out <= "0010";
 when "1110" => MSN_out <= "0101";
 when "1111" => MSN_out <= "0000";
 when others => MSN_out <= "0000";
end case;
end process;
SBOX_2: process(LSN_in) begin
case(LSN_in) is
 when "0000" => LSN_out <= "1111";
 when "0001" => LSN_out <= "0000";
 when "0010" => LSN_out <= "1101";
 when "0011" => LSN_out <= "0111";
 when "0100" => LSN_out <= "1011";
 when "0101" => LSN_out <= "1110";
 when "0110" => LSN_out <= "0101";
 when "0111" => LSN_out <= "1010";
 when "1000" => LSN_out <= "1001";
 when "1001" => LSN_out <= "0010";
 when "1010" => LSN_out <= "1100";
 when "1011" => LSN_out <= "0001";
 when "1100" => LSN_out <= "0011";
 when "1101" => LSN_out <= "0100";
 when "1110" => LSN_out <= "1000";
 when "1111" => LSN_out <= "0110";
 when others => LSN_out <= "0000";
end case;
end process;
LUTOUT <= MSN_out & LSN_out;
end Behavioral;

文件列表(部分)

名称 大小 修改日期
VHDL中的非线性查找表实现(附件).txt1.00 KB2020-04-07
3.png18.82 KB2020-04-06
5.png20.39 KB2020-04-07
LookupTable1.png17.56 KB2020-04-07
image0.00 KB2020-04-06

立即下载

相关下载

[非线性查找表] 此项目是VHDL中的非线性查找表。在该VHDL项目中,在VHDL中实现了非线性查找表,该表用于即将来临协处理器的哈希函数中。哈希算法中使用的非线性运算利用并行的4位非线性运算,其中输入半字节(4位)被映射到另一个非线性4位值。了解更多请下载附件。

评论列表 共有 0 条评论

暂无评论

微信捐赠

微信扫一扫体验

立即
上传
发表
评论
返回
顶部