ch06-7用Verilog描述时序逻辑电路.pptx





《ch06-7用Verilog描述时序逻辑电路.pptx》由会员分享,可在线阅读,更多相关《ch06-7用Verilog描述时序逻辑电路.pptx(7页珍藏版)》请在淘文阁 - 分享文档赚钱的网站上搜索。
1、 6.7.1 移位寄存器的移位寄存器的Verilog建模建模 6.7.2 计数器的计数器的Verilog建模建模 6.7.3 状态转换图状态转换图的的Verilog建模建模 6.7.4 数字钟的数字钟的Verilog建模建模 6.7 用用Verilog HDL描述时序逻辑电路描述时序逻辑电路用用行为级描述行为级描述always描述一个位双向移位寄存描述一个位双向移位寄存器器,有异步清零、同步置数、左移、右移和保持。功,有异步清零、同步置数、左移、右移和保持。功能同能同74xx19474xx194。6.7.1 移位寄存器的移位寄存器的Verilog建模建模module shift74x194(S
2、1,S0,D,Dsl,Dsr,Q,CP,CR);input S1,S0;/控制输入控制输入 input Dsl,Dsr;/串行输入串行输入 input CP,CR;/时钟及清零时钟及清零 input 3:0 D;/并行输入并行输入 output 3:0 Q;/寄存器输出寄存器输出 reg 3:0 Q;6.7.1 移位寄存器的移位寄存器的Verilog建模建模 always (posedge CP or negedge CR)if(CR)Q=4b0000;else case(S1,S0)2b00:Q=Q;/保持保持 2b01:Q=Q2:0,Dsr;/右移右移 2b10:Q=Dsl,Q3:1;/左
3、移左移 2b11:Q=D;/并行输入并行输入 endcaseendmodule 6.7.2 计数器的计数器的Verilog建模建模module updowncount_beh#(parameter n=4)(input Load,Up_down,En,CP,/输入端口声明输入端口声明inputn-1:0D,/并行数据输入并行数据输入output regn-1:0Q /数据输出端口及数据输出端口及变量数据类型变量数据类型声明声明);integer direction;/中间变量中间变量声明声明 用用Verilog描述带使能端和同步置数端的可逆描述带使能端和同步置数端的可逆4位二进制位二进制计数器
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- ch06 Verilog 描述 时序 逻辑电路

限制150内