时序电路 Digital Circuits 刘鹏 浙江大学信息与电子工程系 信息与通信工程研究所

Slides:



Advertisements
Similar presentations
Counters Discussion D8.3.
Advertisements

首 页 首 页 上一页 下一页 本讲内容 投影法概述三视图形成及其投影规律平面立体三视图、尺寸标注 本讲内容 复习: P25~P31 、 P84~P85 作业: P7, P8, P14[2-32(2) A3 (1:1)]
Give qualifications of instructors: DAP
第十二章 常微分方程 返回. 一、主要内容 基本概念 一阶方程 类 型 1. 直接积分法 2. 可分离变量 3. 齐次方程 4. 可化为齐次 方程 5. 全微分方程 6. 线性方程 类 型 1. 直接积分法 2. 可分离变量 3. 齐次方程 4. 可化为齐次 方程 5. 全微分方程 6. 线性方程.
CS 151 Digital Systems Design Lecture 37 Register Transfer Level
实验:验证牛顿第二定律. 1 、实验目的:探究 a 与 F 、 m 的定量关系 2 、实验原理:控制变量法 A 、 m 一定时,探究 a 随 F 的变化关系 B 、 F 一定时, 探究 a 随 m 的变化关系.
计算机 在分析化学的应用 ( 简介 ) 陈辉宏. 一. 概述 信息时代的来临, 各门学科的研究方法都 有了新的发展. 计算机的介入, 为分析化学的进展提供了 一种更方便的研究方法.
两极异步电动机示意图 (图中气隙磁场形象地 用 N 、 S 来表示) 定子接三相电源上,绕组中流过三相对称电流,气 隙中建立基波旋转磁动势,产生基波旋转磁场,转速 为同步速 : 三相异步电动机的简单工作原理 电动机运行时的基本电磁过程: 这个同步速的气隙磁场切割 转子绕组,产生感应电动势并在 转子绕组中产生相应的电流;
主要内容  LR(0) 分析. 0 S→  E # E→  E+T E→  T T→  id T→  ( E ) 1 S→E  # E→E  +T 5 T→id  3 E→E+  T T→  id T→  (E) 4 E→E+T  9 E→T  6 T→(  E) E→
线性调制系统的抗噪声性能 n i (t) 是一个高斯窄带噪声 + 带通滤波器 解调器 n(t) 又 即.
有限自动机 (Finite Automata) 描述程序设计语言中的单词的识别过程。 主要内容: 确定有限自动机 DFA(Deterninistic FA) 确定有限自动机 DFA 的实现 非确定有限自动机 NFA(Nondeterninistic FA) NFA 到 DFA 的转换 DFA 的化简.
第三章 组合逻辑电路设计 §3-1 集成逻辑电路的电气特性 §3-2 常用组合逻辑模块 §3-3 组合电路的设计方法 §3-4 险象与竞争 §3-5 小结 组合逻辑电路: 输出仅和当前的输入有关。
第十一章 曲线回归 第一节 曲线的类型与特点 第二节 曲线方程的配置 第三节 多项式回归.
2.4 基本设计表达式 随机变量的统计特征值 结构的可靠性与可靠 基本设计表达式.
线性代数习题课 吉林大学 术洪亮 第一讲 行 列 式 前面我们已经学习了关 于行列式的概念和一些基本 理论,其主要内容可概括为:
中断实验 长春理工大学 生命科学技术学院 生物医学工程系. 中断实验 实验目的 实验设备 实验原理 实验内容 参考程序.
实验三: 用双线性变换法设计 IIR 数字滤波器 一、实验目的 1 熟悉用双线性变换法设计 IIR 数字滤波器的原理与方法。 2 掌握数字滤波器的计算机仿真方法。 3 通过观察对实际心电图信号的滤波作用, 获得数字滤波的感性知 识。
大亚湾 PMT 读出电子学介绍 王铮 中科院 “ 核探测技术与核电子学重点实验室 ” 年会.
1 第 7 章 专家控制系统 概述 专家系统的起源与发展 专家系统的一般结构 专家系统的知识表示和获取 专家系统的特点及分类.
基于误差修正算法的并行 交替采样 ADC 的应用. 并行交替采样 ADC 原理  并行交替采样 ADC ( Time-interleaved ADC, TI-ADC) 结 构能够将多片相对低采样率的 ADC 芯片组合起来构成高 采样率系统。
在发明中学习 线性代数 概念的引入 李尚志 中国科学技术大学. 随风潜入夜 : 知识的引入 之一、线性方程组的解法 加减消去法  方程的线性组合  原方程组的解是新方程的解 是否有 “ 增根 ” ?  互为线性组合 : 等价变形  初等变换  高斯消去法.
Chapter 8 Synchronous Sequential Circuits 同步时序电路 1.use flip-flops to represent the states of the circuit ; 2.use clock pulses to trigger changes in the.
FSMs and Synchronization
第5章 键盘与鼠标接口 5.1 键盘概述 5.2 键盘的工作原理 5.3 PC扩展键盘接口 5.4 键盘中断与键盘I/O 5.5 鼠标接口.
第二章 处理器管理 南通大学电子信息学院 2010 年 9 月. 第二章 处理器管理 2.1 中央处理器 2.2 中断技术 2.3 进程及其实现 2.4 线程及其实现 2.5 Linux 进程和线程 2.6 Windows 2003 进程和线程 2.7 处理器调度 2.8 作业的管理与调度 2.9.
可逆电动势 可逆电动势必须满足的两个条件 1. 电池中的化学反应可向 正反两方向进行 2. 电池在十分接近平衡 状态下工作 Reversible Electromotive Force (emf)
编译原理总结. 基本概念  编译器 、解释器  编译过程 、各过程的功能  编译器在程序执行过程中的作用  编译器的实现途径.
ENGIN112 L26: Shift Registers November 3, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 26 Shift Registers.
第五章 异步时序 逻辑电路 逻辑电路 5.1 异步时序逻辑电路的特点及模型 5.1 异步时序逻辑电路的特点及模型 1. 同步时序逻辑电路的特点 各触发器的时钟端全部连接在一起,并接在系 统时钟端; 只有当时钟脉冲到来时,电路的状态才能改变 ; 改变后的状态将一直保持到下一个时钟脉冲 的到来,此时无论外部输入.
周期信号的傅里叶变换. 典型非周期信号 ( 如指数信号, 矩形信号等 ) 都是满足绝对可 积(或绝对可和)条件的能量信号,其傅里叶变换都存在, 但绝对可积(或绝对可和)条件仅是充分条件, 而不是必 要条件。引入了广义函数的概念,在允许傅里叶变换采用 冲激函数的前提下, 使许多并不满足绝对可积条件的功率.
常州机电职业技术学院 数控编程与加工技术 精品课程 项目 3 加工中心程序编制 模块 2 方形型腔类零件 上饶职业技术学院 课程负责人:罗根云 2011 年 5 月
1 、如果 x + 5 > 4 ,那么两边都 可得 x >- 1 2 、在- 3y >- 4 的两边都乘以 7 可得 3 、在不等式 — x≤5 的两边都乘以- 1 可得 4 、将- 7x — 6 < 8 移项可得 。 5 、将 5 + a >- 2 a 移项可得 。 6 、将- 8x < 0.
1 Signals and Systems Lecture 26 Properties of Laplace Transform Analysis LTI System using LT System Function.
项目七: PLC 功能指令应用 带进位循环左移指令 XXXXX. 项目七: PLC 功能指令应用 FX2 系列可编程控制器移位控制指令有移位、循环移位、字移位 及先进先出 FIFO 指令等 10 条指令。 带进位循环右移指令 RCR 带进位循环左移指令 RCL 字右移位指令 WSFR 先入先出读出指令.
Lecture 1 Digital Logic Circuit 第一课 数字逻辑电路. Exercises Please read the text and complete the exercises in 20 minutes. 1.Answer the following questions.
第四章 计算机数控( CNC )系统  本章重点:  1 计算机数控系统构成及其结构特点  2 运动轨迹插补原理  3 刀具补偿.
1 Lecture 13 Overview of sequential logic  Basic concepts  An example.
Abdullah Said Alkalbani University of Buraimi
力的合成 力的合成 一、力的合成 二、力的平行四边形 上一页下一页 目 录 退 出. 一、力的合成 O. O. 1. 合力与分力 我们常常用 一个力来代替几个力。如果这个 力单独作用在物体上的效果与原 来几个力共同作用在物体上的效 果完全一样,那么,这一个力就 叫做那几个力的合力,而那几个 力就是这个力的分力。
数字系统设计 1 Spring 2015 ZDMC – Lec. #7 触发器 Flip-Flops March 31, 2015 刘鹏 浙江大学信息与通信工程研究所.
逻辑设计基础 1 第 7 章 多级与(或)非门电路 逻辑设计基础 多级门电路.
§5.6 利用希尔伯特 (Hilbert) 变换 研究系统的约束特性 希尔伯特变换的引入 可实现系统的网络函数与希尔伯特变换.
Date: File: SSP1_A1C.1 SIMATIC S7 Siemens AG All rights reserved. Information and Training Center Knowledge for Automation 案例分析、指导.
2. MCS-51 单片机的组成及结构分析 2.1 MCS-51 单片机的内部结构及结构特点 1 )在 RAM 区有一个寄存器工作区( 4×8 个工作寄存器), 专门功能寄存器 SFR (完成定时器、串行口、中断逻辑等 控制)。 2 )程序存储器与数据存储器在空间上分开。 有不同的地址指针 PC 、
单元四 电动后视镜控制电路. 汽车辅助装置汽车辅助装置 一、教学目的要求: 掌握电动后视镜的组成、功用、工作过程以 及控制电路 二、主要教学内容: ( 1 )电动后视镜的组成 ( 2 )电动后视镜控制电路 ( 3 )电动后视镜工作过程 三、教学重点、难点: 电动后视镜工作过程.
数字系统设计 ZDMC – Lec. #8 触发器 Flip-Flops April 2, 2015 刘鹏 浙江大学信息与通信工程研究所.
Lecture 6: Functions of Combinational Logic
Figure 8.1. The general form of a sequential circuit.
© Copyright 2004, Gaetano Borriello and Randy H. Katz
Lecture 26 Logistics Last lecture Today HW8 due Friday
Lecture 27 Logistics Last lecture Today: HW8 due Friday
Typical Timing Specifications
Lecture 3: Boolean Algebra
Sequential logic examples
触发器 Flip-Flops 刘鹏 浙江大学信息与电子工程学院 March 23, 2017
CS Fall 2005 – Lec. #5 – Sequential Logic - 1
触发器 刘鹏 浙江大学信息与电子工程系 March 8, 2012 EE141
Lecture 27 Logistics Last lecture Today: HW8 due Friday
触发器 Flip-Flops 刘鹏 浙江大学信息与电子工程学院 March 27, 2018
David Culler Electrical Engineering and Computer Sciences
时序电路设计和Verilog 刘鹏 浙江大学信息与电子工程系 Apr. 1, 2012 EE141
CSE 370 – Winter Sequential Logic-2 - 1
FSM MODELING MOORE FSM MELAY FSM. Introduction to DIGITAL CIRCUITS MODELING & VERIFICATION using VERILOG [Part-2]
CSE 370 – Winter Sequential Logic - 1
Lecture 15 Logistics Last lecture Today HW4 is due today
CSE 370 – Winter Sequential Logic-2 - 1
Lecture 17 Logistics Last lecture Today HW5 due on Wednesday
The Verilog Hardware Description Language
Lecture 17 Logistics Last lecture Today HW5 due on Wednesday
CSE 370 – Winter Introduction -2- 1
Presentation transcript:

时序电路 Digital Circuits 刘鹏 liupeng@zju.edu.cn 浙江大学信息与电子工程系 信息与通信工程研究所 EE141 时序电路 Digital Circuits 刘鹏 liupeng@zju.edu.cn 浙江大学信息与电子工程系 信息与通信工程研究所 Mar. 22, 2012 Winter 2009 ZDMC – Lec. #1 – 1

复习 时序逻辑电路 时序电路通常包含组合电路和存储电路两部分. EE141 时序逻辑电路 复习 时序电路通常包含组合电路和存储电路两部分. 存储电路的输出状态反馈到组合电路的输入端,与输入信号一起,共同决定组合逻辑电路的输出. 任一时刻的输出信号不仅取决于当时的输入信号,还取决于电路原来的状态(与以前的输入有关). 组合逻辑电路 存储电路 输出方程Yi 驱动方程Zi 状态方程 Qi 输入Xi 时序电路的结构框图 Winter 2009 ZDMC – Lec. #1 – 2

复习 FSM:有限状态机 采用输入信号和电路状态的逻辑函数去描述时序电路逻辑功能的方法 Mealy型 Moore型 EE141 FSM:有限状态机 复习 采用输入信号和电路状态的逻辑函数去描述时序电路逻辑功能的方法 Mealy型 输出信号取决于存储电路状态和输入变量 Moore型 输出只是存储电路现态的函数 输出与时钟同步 inputs Moore outputs Mealy outputs next state current state combinational logic Winter 2009 ZDMC – Lec. #1 – 3

复习 同步时序电路分析方法 目的是找出电路状态和输出信号的变换规律,指出其逻辑功能 时序 电路 求激励方程 由特征方程 求状态表 画波形图 EE141 同步时序电路分析方法 复习 目的是找出电路状态和输出信号的变换规律,指出其逻辑功能 时序 电路 求激励方程 和输出方程 由特征方程 求状态方程 求状态表 画状态图 画波形图 功能描述 Winter 2009 ZDMC – Lec. #1 – 4

74LS 194A, 左/右移,并行输入,保持,异步置零等功能 EE141 复习 74LS 194A, 左/右移,并行输入,保持,异步置零等功能 Winter 2009 ZDMC – Lec. #1 – 5

EE141 4位双向移位寄存器74LS194A的逻辑图 复习 Winter 2009 ZDMC – Lec. #1 – 6

EE141 扩展应用(4位 8位) 复习 Winter 2009 ZDMC – Lec. #1 – 7

Shift Register: DFF and JK FF EE141 复习 Shift Register: DFF and JK FF Winter 2009 ZDMC – Lec. #1 – 8

Universal Shift Register EE141 Universal Shift Register Holds 4 values Serial or parallel inputs Serial or parallel outputs Permits shift left or right Shift in new values from left or right left_in left_out right_out clear right_in output input s0 s1 clock clear sets the register contents and output to 0 s1 and s0 determine the shift function s0 s1 function 0 0 hold state 0 1 shift right 1 0 shift left 1 1 load new input Winter 2009 ZDMC – Lec. #1 – 9

Design of Universal Shift Register EE141 Design of Universal Shift Register Consider one of the four flip-flops New value at next clock cycle: Nth cell to N-1th cell to N+1th cell Q D CLK clear s0 s1 new value 1 – – 0 0 0 0 output 0 0 1 output value of FF to left (shift right) 0 1 0 output value of FF to right (shift left) 0 1 1 input CLEAR s0 and s1 control mux 1 2 3 Q[N-1] (left) Q[N+1] (right) Input[N] Winter 2009 ZDMC – Lec. #1 – 10

Shift Register Holds samples of input EE141 Shift Register Holds samples of input Store last 4 input values in sequence 4-bit shift register: D Q IN OUT1 OUT2 OUT3 OUT4 CLK Winter 2009 ZDMC – Lec. #1 – 12

Shift Register Verilog EE141 Shift Register Verilog module shift_reg (out4, out3, out2, out1, in, clk); output out4, out3, out2, out1; input in, clk; reg out4, out3, out2, out1; always @(posedge clk) begin out4 <= out3; out3 <= out2; out2 <= out1; out1 <= in; end endmodule Winter 2009 ZDMC – Lec. #1 – 13

Shift Register Verilog EE141 Shift Register Verilog module shift_reg (out, in, clk); output [4:1] out; input in, clk; reg [4:1] out; always @(posedge clk) begin out <= {out[3:1], in}; end endmodule Winter 2009 ZDMC – Lec. #1 – 14

Register with selective load EE141 Register with selective load We often use registers to hold values for multiple clocks Wait until needed Used multiple times How do we modify our D flip-flop so that it holds the value till we are done with it? A very simple FSM En State Next 0 Q Q 1 Q D D Q D Q clk enable enable clk Winter 2009 ZDMC – Lec. #1 – 15

Universal Shift Register EE141 Universal Shift Register Holds 4 values Serial or parallel inputs Serial or parallel outputs Permits shift left or right Shift in new values from left or right left_in left_out right_out clear right_in output input s0 s1 clock clear sets the register contents and output to 0 s1 and s0 determine the shift function s0 s1 function 0 0 hold state 0 1 shift right 1 0 shift left 1 1 load new input Winter 2009 ZDMC – Lec. #1 – 16

Design of Universal Shift Register EE141 Design of Universal Shift Register Consider one of the four flip-flops New value at next clock cycle: Nth cell to N-1th cell to N+1th cell Q D CLK clear s0 s1 new value 1 – – 0 0 0 0 output 0 0 1 output value of FF to left (shift right) 0 1 0 output value of FF to right (shift left) 0 1 1 input CLEAR s0 and s1 control mux 1 2 3 Q[N-1] (left) Q[N+1] (right) Input[N] Winter 2009 ZDMC – Lec. #1 – 17

Universal Shift Register Verilog EE141 Universal Shift Register Verilog module univ_shift (out, lo, ro, in, li, ri, s, clr, clk); output [3:0] out; output lo, ro; input [3:0] in; input [1:0] s; input li, ri, clr, clk; reg [3:0] out; assign lo = out[3]; assign ro = out[0]; always @(posedge clk or clr) begin if (clr) out <= 0; else case (s) 3: out <= in; 2: out <= {out[2:0], ri}; 1: out <= {li, out[3:1]}; 0: out <= out; endcase end endmodule Winter 2009 ZDMC – Lec. #1 – 18

EE141 4位双向移位寄存器74LS194A的逻辑图 Winter 2009 ZDMC – Lec. #1 – 19

Shift Register Application EE141 Shift Register Application Parallel-to-serial conversion for serial transmission parallel outputs parallel inputs serial transmission Winter 2009 ZDMC – Lec. #1 – 20

Pattern Recognizer Combinational function of input samples EE141 Pattern Recognizer Combinational function of input samples In this case, recognizing the pattern 1001 on the single input signal D Q IN OUT1 OUT2 OUT3 OUT4 CLK OUT Winter 2009 ZDMC – Lec. #1 – 21

Another Example Door combination lock: EE141 Another Example Door combination lock: punch in 3 values in sequence and the door opens; if there is an error the lock must be reset; once the door opens the lock must be reset inputs: sequence of input values, reset outputs: door open/close memory: must remember combination or always have it available as an input Winter 2009 ZDMC – Lec. #1 – 22

Implementation in Software EE141 Implementation in Software integer combination_lock ( ) { integer v1, v2, v3; integer error = 0; static integer c[3] = 3, 4, 2; while (!new_value( )); v1 = read_value( ); if (v1 != c[1]) then error = 1; v2 = read_value( ); if (v2 != c[2]) then error = 1; v3 = read_value( ); if (v2 != c[3]) then error = 1; if (error == 1) then return(0); else return (1); } Winter 2009 ZDMC – Lec. #1 – 23

Implementation as a Sequential Digital System EE141 Implementation as a Sequential Digital System Encoding: how many bits per input value? how many values in sequence? how do we know a new input value is entered? how do we represent the states of the system? Behavior: clock wire tells us when it’s ok to look at inputs (i.e., they have settled after change) sequential: sequence of values must be entered sequential: remember if an error occurred finite-state specification reset value open/closed new clock state Winter 2009 ZDMC – Lec. #1 – 24

Sequential Example: Abstract Control EE141 Sequential Example: Abstract Control Finite-state diagram States: 5 states represent point in execution of machine each state has outputs Transitions: 6 from state to state, 5 self transitions, 1 global changes of state occur when clock says it’s ok based on value of inputs Inputs: reset, new, results of comparisons Output: open/closed ERR closed C1!=value & new C2!=value & new C3!=value & new S1 S2 S3 OPEN reset closed closed closed open C1=value & new C2=value & new C3=value & new not new not new not new Winter 2009 ZDMC – Lec. #1 – 25

Data-path vs. Control Internal structure data-path control EE141 Data-path vs. Control Internal structure data-path storage for combination comparators control finite-state machine controller control for data-path state changes controlled by clock new equal reset value C1 C2 C3 mux control multiplexer controller clock comparator equal datapath open/closed Winter 2009 ZDMC – Lec. #1 – 26

Sequential Example :Finite-State Machine EE141 Sequential Example :Finite-State Machine Finite-state machine refine state diagram to include internal structure closed mux=C1 reset equal & new not equal & new not new S1 S2 S3 OPEN ERR mux=C2 mux=C3 open Winter 2009 ZDMC – Lec. #1 – 27

Sequential Example: Finite-State Machine EE141 Sequential Example: Finite-State Machine Finite-state machine generate state table (much like a truth-table) closed mux=C1 reset equal & new not equal & new not new S1 S2 S3 OPEN ERR mux=C2 mux=C3 open Symbolic states reset new equal state state mux open/closed 1 – – – S1 C1 closed 0 0 – S1 S1 C1 closed 0 1 0 S1 ERR – closed 0 1 1 S1 S2 C2 closed 0 0 – S2 S2 C2 closed 0 1 0 S2 ERR – closed 0 1 1 S2 S3 C3 closed 0 0 – S3 S3 C3 closed 0 1 0 S3 ERR – closed 0 1 1 S3 OPEN – open 0 – – OPEN OPEN – open 0 – – ERR ERR – closed next Encoding? Winter 2009 ZDMC – Lec. #1 – 28

Sequential Example: Encoding Encode state table state can be: S1, S2, S3, OPEN, or ERR needs at least 3 bits to encode: 000, 001, 010, 011, 100 and as many as 5: 00001, 00010, 00100, 01000, 10000 choose 4 bits: 0001, 0010, 0100, 1000, 0000 Encode outputs output mux can be: C1, C2, or C3 needs 2 to 3 bits to encode choose 3 bits: 001, 010, 100 output open/closed can be: open or closed needs 1 or 2 bits to encode choose 1 bits: 1, 0 binary One-hot hybrid Winter 2009 ZDMC – Lec. #1 – 29

Sequential Example :Encoding Encode state table state can be: S1, S2, S3, OPEN, or ERR choose 4 bits: 0001, 0010, 0100, 1000, 0000 output mux can be: C1, C2, or C3 choose 3 bits: 001, 010, 100 output open/closed can be: open or closed choose 1 bits: 1, 0 reset new equal state state mux open/closed 1 – – – 0001 001 0 0 0 – 0001 0001 001 0 0 1 0 0001 0000 – 0 0 1 1 0001 0010 010 0 0 0 – 0010 0010 010 0 0 1 0 0010 0000 – 0 0 1 1 0010 0100 100 0 0 0 – 0100 0100 100 0 0 1 0 0100 0000 – 0 0 1 1 0100 1000 – 1 0 – – 1000 1000 – 1 0 – – 0000 0000 – 0 next good choice of encoding! mux is identical to last 3 bits of next state open/closed is identical to first bit of state Winter 2009 ZDMC – Lec. #1 – 30

Sequential Example : Controller Implementation EE141 Sequential Example : Controller Implementation Implementation of the controller special circuit element, called a register, for remembering inputs when told to by clock new equal reset mux control controller clock new equal reset open/closed mux control comb. logic clock state open/closed Winter 2009 ZDMC – Lec. #1 – 31

One-hot Encoded FSM Even Parity Checker Circuit: In General: EE141 One-hot Encoded FSM Even Parity Checker Circuit: In General: FFs must be initialized for correct operation (only one 1) Winter 2009 ZDMC – Lec. #1 – 32

FSM Implementation Notes EE141 FSM Implementation Notes General FSM form: All examples so far generate output based only on the present state: Commonly called Moore Machine (If output functions include both present state and input then called a Mealy Machine) Winter 2009 ZDMC – Lec. #1 – 33

Design Hierarchy system data-path control code registers EE141 Design Hierarchy system data-path control code registers state registers combinational logic multiplexer comparator register logic switching networks Winter 2009 ZDMC – Lec. #1 – 34