基于vhdl密码锁设计内容摘要:

A— V型实验开发系统。 本实验器由主板和下载板组成。 下载板由 ALTERA 公司生产的FPGA(EPF10K10LC84— 4)芯 片及单片机系统组成,还包括 EEPROM等。 可以完成 FPGA设计资料的下载,存储,显示等功能,可以和主板配合完成 CPLD的各种开发及实验。 本设计通过在 Quartus II 软件上进行 编译、综合 ,最后下载到 FPGA(EPF10K10LC84— 4)芯片 并在实验开发系统上进行验证, 实际测试表明系统的各项功能要求均得到满足并且系统工作良好。 数字 密码器 实验总结 (黑体 四号, 倍行距,段前 行 ) 本文设计的密码锁克服了基于单片机的密码锁的可靠性较差的缺点 , 利用了 FPGA 的 ISP 功能可高效的进行功能扩 展和产品升级。 本设计还突破了一般密码锁只能设置四位密码的限制 , 可方便的设置任意位密码 , 具有使用灵活 、 性能可靠 、 安全保密性强等优点 , 将有十分良好的应用前景。 济南大学毕业设计 (论 文 ) 16 同时 本文 还 通过数字 密码器 的 设计 展现出了现代电子设计方 法 — EDA 技术的灵活性 ,层次化设计方式的优点。 VHDL 语言具有很强的电路描述和建模能力 [13],能从多个层次对数字系统进行建模和描述 ,从而大大简化了硬件设计任务 ,提高了设计效率和可靠性。 用 VHDL 语言实现电路设计者可以专心致力于其功能的实现 ,而不需要对不影响功能的与工艺相关的因素花费过多的 时间和精力。 它必将是现代电子的重要设计手段和发展方向。 附录 数字密码器程序清单 顶层模块 () LIBRARY IEEE。 USE。 USE。 USE。 USE。 ENTITY cipher_top IS PORT(a0,a1,a2,a3,a4,a5,a6,a7,a8,a9 : IN std_logic。 wait_t : IN std_logic。 ready : IN std_logic。 setup : IN std_logic。 open_t : IN std_logic。 clk : IN std_logic。 led_g,led_r,alert : OUT std_logic。 a,b,c,d,e,f,g : OUT std_logic。 sel : OUT std_logic_vector(2 DOWNTO 0))。 END cipher_top。 ARCHITECTURE cipher_top_arch OF cipher_top IS COMPONENT keysync_model— 消抖模块 PORT(c1,c2,c3,c4: IN std_logic。 a00,a10,a20,a30,a40,a50,a60,a70,a80,a90: IN std_logic。 clk: IN std_logic。 c11,c22,c33,c44: OUT std_logic。 a01,a11,a21,a31,a41,a51,a61,a71,a81,a91: OUT std_logic)。 END COMPONENT。 COMPONENT enable_model— 使能电路模块 PORT(a0,a1,a2,a3,a4,a5,a6,a7,a8,a9: IN std_logic。 en: IN std_logic。 济南大学毕业设计 (论 文 ) 17 a00,a10,a20,a30,a40,a50,a60,a70,a80,a90: OUT std_logic)。 END COMPONENT。 COMPONENT mux4_model— 密码预置模块 PORT(s0,s1,s2 : IN std_logic。 e1,e2,e3,e4 : OUT std_logic)。 END COMPONENT。 COMPONENT encoder_model 编码模块 PORT(a01,a11,a21,a31,a41,a51,a61,a71,a81,a91 : IN std_logic。 reset,dus : IN std_logic。 b1,b2,b3,b4 : OUT std_logic。 data_in,di : OUT std_logic。 in1,in2,in3,in4,in5,in6 : OUT std_logic_vector(3 DOWNTO 0))。 END COMPONENT。 COMPONENT parator_model— 比较模块 PORT(b1,b2,b3,b4: IN std_logic。 e1,e2,e3,e4: IN std_logic。 dep : OUT std_logic)。 END COMPONENT。 COMPONENT counter_model— 计数模块 PORT(reset : IN std_logic。 p : IN std_logic。 s0,s1,s2 : OUT std_logic。 full : OUT std_logic)。 END COMPONENT。 COMPONENT decoder_model— 数码显示模块 PORT(data : IN std_logic_vector(3 DOWNTO 0)。 a,b,c,d,e,f,g: OUT std_logic)。 END COMPONENT。 COMPONENT indicator_model— 指示模块 PORT(wait_l : IN std_logic。 s_lg : IN std_logic。 s_lr : IN std_logic。 di,bjy : IN std_logic。 clk_div1 : IN std_logic。 led_g,led_r,alert: OUT std_logic)。 END COMPONENT。 济南大学毕业设计 (论 文 ) 18 COMPONENT control_model— 控制模块 PORT(c11,c22,c33,c44 : IN std_logic。 data_in : IN std_logic。 dep,dsw : IN std_logic。 full,notc : IN std_logic。 clk : IN std_logic。 en,dus,anc: OUT std_logic。 p,reset : OUT std_logic。 ds,ret : OUT std_logic。 s_lr,s_lg,wait_l: OUT std_logic)。 END COMPONENT。 COMPONENT clkdiv_model— 分频模块 PORT(clk : IN std_logic。 clk_div1 : OUT std_logic。 clk_div2 : OUT std_logic)。 END COMPONENT。 COMPONENT keyscan_model PORT(clkscan,reset : IN std_logic。 in1,in2,in3,in4, in5,in6,in7,in8 : IN std_logic_vector(3 DOWNTO 0)。 data : OUT std_logic_vector(3 DOWNTO 0)。 sel : OUT std_logic_vector(2 DOWNTO 0))。 END COMPONENT。 COMPONENT wrong3_model PORT(anc,ds : IN std_logic。 clk,ret: IN std_logic。 in7,in8: OUT std_logic_vector(3 DOWNTO 0)。 notc,dsw : OUT std_logic。 bjy : OUT std_logic)。 END COMPONENT。 SIGNAL e1,e2,e3,e4 : std_logic。 SIGNAL b1,b2,b3,b4 : std_logic。 SIGNAL dus,di,bjy : std_logic。 SIGNAL anc,ds,ret : std_logic。 SIGNAL notc,dsw : std_logic。 SIGNAL c11,c22,c33,c44 : std_logic。 济南大学毕业设计 (论 文 ) 19 SIGNAL a00,a10,a20,a30,a40,a50,a60,a70,a80,a90 : std_logic。 SIGNAL a01,a11,a21,a31,a41,a51,a61,a71,a81,a91 : std_logic。 SIGNAL en,data_in : std_logic。 SIGNAL wait_l,s_lg,s_lr : std_logic。 SIGNAL reset,p : std_logic。 SIGNAL full,dep : std_logic。 SIGNAL s0,s1,s2 : std_logic。 SIGNAL clk_div1,clk_div2 : std_logic。 SIGNAL data : std_logic_vector(3 DOWNTO 0)。 SIGNAL in1,in2,in3,in4,in5,in6,in7,in8 : std_logic_vector(3 DOWNTO 0)。 BEGIN U1: keysync_model PORT MAP(wait_t,setup,ready,open_t,a00,a10,a20,a30,a40,a50,a60,a70,a80,a90, clk_div1,c11,c22,c33,c44,a01,a11,a21,a31,a41,a51,a61,a71, a81,a91)。 U2: enable_model PORT MAP(a0,a1,a2,a3,a4,a5,a6,a7,a8,a9,en,a00,a10, a20,a30,a40,a50,a60,a70,a80,a90)。 U3: mux4_model PORT MAP(s0,s1,s2,e1,e2,e3,e4)。 U4: encoder_model PORT MAP(a01,a11,a21,a31,a41,a51,a61,a71,a81,a91,reset,dus,b1, b2,b3,b4,data_in,di,in1,in2,in3,in4,in5,in6)。 U5: parator_model PORT MAP(b1,b2,b3,b4,e1,e2,e3,e4,dep)。 U6: counter_model PORT MAP(reset,p,s0,s1,s2,full)。 U7: decoder_model PORT MAP(data,a,b,c,d,e,f,g)。 U8: indicator_model PORT MAP(wait_l,s_lg,s_lr,di,bjy,clk,led_g,led_r,alert)。 U9:control_model PORT MAP(c11,c22,c33,c44,data_in,dep,dsw,full,notc,clk_div1,en,dus,anc,p,res济南大学毕业设计 (论 文 ) 20。
阅读剩余 0%
本站所有文章资讯、展示的图片素材等内容均为注册用户上传(部分报媒/平媒内容转载自网络合作媒体),仅供学习参考。 用户通过本站上传、发布的任何内容的知识产权归属用户或原始著作权人所有。如有侵犯您的版权,请联系我们反馈本站将在三个工作日内改正。