Presentation is loading. Please wait.

Presentation is loading. Please wait.

memory array (2n words by m bits)

Similar presentations


Presentation on theme: "memory array (2n words by m bits)"— Presentation transcript:

1 memory array (2n words by m bits)
数字系统设计 ROM Structure 复习 Similar to a PLA structure but with a fully decoded AND array Completely flexible OR array (unlike PAL) n address lines • • • inputs decoder • • • outputs memory array (2n words by m bits) m data lines 2n word lines ZDMC

2 SARM General Memory Operation (Static Random-Access Memory)
数字系统设计 SARM General Memory Operation (Static Random-Access Memory) 复习 Diagram of a 32 x 4 memory; Virtual arrangement of memory cells into 32 four-bit words. ZDMC

3 Static RAM Cell (静态随机访问存储器单元) Random-Access Memory
数字系统设计 Static RAM Cell (静态随机访问存储器单元) Random-Access Memory 复习 6-Transistor SRAM Cell word (row select) 1 1 Read operation: 1. Select row 2. Cell pulls one line low and one high 3. Sense output on bit and bit Write operation: 1. Drive bit lines (e.g, bit=1, bit=0) 2. Select row Why does this work? When one bit-line is low, it will force output high; that will set new state bit bit The classical SRAM cell looks like this. It consists of two back-to-back inverters that serves as a flip-flop. Here is an expanded view of this cell, you can see it consists of 6 transistors. In order to write a value into this cell, you need to drive from both sides. For example, if you want to write a 1, you will drive “bit” to 1 while at the same time, drive “bit bar” to zero. Once the bit lines are driven to their desired values, you will turn on these two transistors by setting the word line to high so the values on the bit lines will be written into the cell. Remember now these are very very tiny transistors so we cannot rely on them to drive these long bit lines effectively during read. Also, the pull down devices are usually much stronger than the pull up devices. So the first thing we need to do on read is to charge these two bit lines to a high values. Once these bit lines are charged to high, we will turn on these two transistors so one of these inverters (the lower one in our example) will start pulling one of the bit line low while the other bit line will remain at HI. It will take this small inverter a long time to drive this long bit line to low but we don’t have to wait that long since all we need to detect the difference between these two bit lines. And if you ask any circuit designer, they will tell you it is much easier to detect a “differential signal” (point to bit and bit bar) than to detect an absolute signal. +2 = 30 min. (Y:10) ZDMC

4 数字系统设计 复习 二、SRAM的存储单元 六管N沟道增强型MOS管 ZDMC

5 Multiplexers as LUTs (cont’d)
数字系统设计 Multiplexers as LUTs (cont’d) 复习 2n-1:1 mux can implement any function of n variables With n-1 variables used as control inputs and Data inputs tied to the last variable or its complement Example: F(A,B,C) = m0 + m2 + m6 + m = A'B'C' + A'BC' + ABC' + ABC = A'B'(C') + A'B(C') + AB'(0) + AB(1) C A B S2 8:1 MUX S1 S0 A B C F C' C' A B S1 S0 F 4:1 MUX C' C' 0 1 F ZDMC

6 Multiplexers as LUTs (cont’d)
数字系统设计 Multiplexers as LUTs (cont’d) 复习 Generalization Example: F(A,B,C,D) implemented by an 8:1 MUX I0 I In-1 In F In In' 1 four possible configurations of truth table rows can be expressed as a function of In n-1 mux control variables single mux data variable C A B 1 D D’ D D’ D’ S2 8:1 MUX S1 S0 1 0 1 1 0 0 D A 0 1 B C choose A,B,C as control variables multiplexer implementation ZDMC

7 控制器 刘鹏 liupeng@zju.edu.cn Dept. ISEE Zhejiang University Source: 补充讲义
数字系统设计 控制器 刘鹏 Dept. ISEE Zhejiang University Source: 补充讲义 May 3, 2016 ZDMC

8 数字系统中控制单元和数据通道单元的关系 数据通道单元的所有微操作都是由控制单元启动,产生微操作控制序列信号的控制单元是一个时序电路,它的各种状态(指内部状态)表示系统的各个控制功能。 控制单元是为启动数字系统中数据处理器的微操作提供控制信号时间序列的。 控制单元 数据通道单元 输出数据 输入数据 输入信号 (外部) 控制信号 状态信号 ZDMC

9 控制器设计方法 控制器是一个时序电路,完全可以按时序电路的设计方法进行设计。 寄存器传送方法基础上的。一般有下述四种方法:
每个状态一个触发器(one-hot); 序列寄存器―译码器法; PLA控制法; 微程序控制法; ZDMC

10 状态机 状态机是指按有序方式遍历预先确定的状态序列的数字逻辑功能电路。
状态机是组合逻辑和寄存器逻辑的特殊组合,它包括两个主要部分:即组合逻辑部分和寄存器部分。 寄存器用于存储状态机内部状态;组合逻辑部分又可分为状态译码器和输出译码器,状态译码器确定状态机的下一个状态,即确定状态机的激励方程,输出译码器确定状态机的输出,即确定状态机的输出方程。 ZDMC

11 状态机主要完成两种基本操作 状态机内部状态转换。遍历某一确定的状态序列,其中次态由次态译码器根据现态和输入条件来确定。
根据状态变化(称为状态转移)产生输出信号。输出译码器根据现态和输入条件可确定输出信号。 状态机有三种表示方法: 状态图 状态表 流程图 ZDMC

12 状态机的两种基本类型 Mealy状态机和Moore状态机。 ZDMC

13 输出加入寄存器消除毛刺 对输出加入寄存器是一个行之有效的方法。通过在时钟边沿取样输出信号,可以极大地消除毛刺带来的影响 。 ZDMC

14 State Elements ZDMC

15 Finite State Machines ZDMC

16 endcase ZDMC

17 算法流程图 Algorithmic State Machine Chart , ASM
ZDMC

18 ASM图中采用的符号和规则 ASM图:状态框
数字系统控制序列中的状态用状态框表示,状态框的形状是一个矩形,框内标出在此状态下实现的寄存器传输操作或输出输出,状态的名称置于状态框的左上角,分配给状态的二进制代码置于状态框的右上角。 ZDMC

19 判断框 菱形框内填写条件变量的判断条件,经判断框后状态转移出现两个或多个分支,如图7.6中(a)所示。若条件是真,选定一个分支,若条件是假,选定另一个分支。图7.6 (b)是由两个判断框构成ASM图的实例。 ZDMC

20 条件框 条件框的形状为椭圆形,框内填写数据子系统进行的条件操作,框外填写必需的条件输出,条件框的输入通道必定来自判断框的分支,即条件框的操作或输出必须是在同时满足状态与条件的情况下才进行。 如图8.7 (b)所示。当系统处于状态S1时,如果条件X1=0,那么CLR被清“0”,否则CLR保持不变,同时不论X1为何值,系统的下一状态都是S2。 ZDMC

21 ASM图的时间划分 ASM块描述了一个时钟周期内系统的工作情况,它包括数据子系统和控制器两个方面,即在当前状态及条件下,数据子系统所完成的各种操作以及控制器转换的后续状态。所有的操作和状态转换都发生在时钟的同一个跳变边沿。所以ASM图是按时钟的节拍描述整个数字系统的操作。系统的主时钟不仅作用到数据子系统的寄存器上,而且也作用到控制器的触发器上。 ZDMC

22 4位移位寄存器的ASM 图中A是一个四位移位寄存器,同步清零和移位置数,其中A3为A的最高位,RUN为外部输入的异步变量,LODA为移位置数变量,它为条件输出即LODA=S1·A3·RUN。 注意A0A1A2A3(顺序) ZDMC

23 4位移位寄存器状态转换表 状态机 现态 条件变量 移位寄存器内容 次态 A3 RUN A0 A1 A2 S0 Ø S1 1 S2 ZDMC

24 ASM图的建立原则 流程图中的工作块基本上对应了ASM图中的状态框。但如果工作块的操作不能在一个CP内同时进行,在ASM图中就必须将其分为几个状态框,在这几个状态之间实现无条件转移。 流程图中的判断块基本上对应了ASM图中的判断框。 如果判断条件是上个操作的结果,那么在ASM图中应在此判断框前增加一个状态框。 如果不增加一个状态框,则判断条件对应于前一个CP的工作块的操作结果。 在ASM图的最上层加一个起始状态。 ZDMC

25 例1 串行数据序列是每个时钟周期传送一个数据0或1的数据流。设x为输入的串行数据序列。当检测到数据流中出现所需的010数据时,使检测器的输出Z为1。试画出其ASM图。 ZDMC

26 例2 某计数器型控制器的ASM图,请根据图中的状态分配设计出对应的电路。 系统有一个外输入X,两个输出命令Z1和Z2,三个状态S0、S1和S2,即需要两个触发器来设置两个状态变量Q1Q2。触发器可采用JK型或D型触发器,此处采用D型触发器。 ZDMC

27 状态转换表 现态 次态 转换条件 Q2 Q1 X Q2n+1 Q1n+1 Z2 Z1 1 Ø
1 Ø 该表为简化状态转换表,因为10和11状态与输入X无关,所以对应于该两行X值可作为任意项Ø处理。 设0l的次态为00,以保证一旦出现0l状态后(电路自启动),经过一个时钟周期可以自动回到有用状态循环。 触发器的驱动方程: 输出方程: ZDMC

28 状态机设计 实际应用问题进行分析和归纳,以确定控制系统的任务以及要实现的功能。
列出采用的状态机全部可能的状态,并对每一个状态进行状态编码及定义相应的状态转换条件。 根据状态图(或把状态图转化为状态表,并对状态图和状态表进行必要的简化处理)和输出函数,画出状态转移图。 建立激励函数和输出函数,画出逻辑电路。 ZDMC

29 MOS管结构和符号 MOS: Metal-Oxide-Semiconductor Field-Effect Transistor
VGS(th)称为MOS管的开启电压 VGS=0漏极和源极之间相当于两个PN结背向地串联,所以D-S间不导通. iD=0 ZDMC

30 CMOS Devices Top View Cross Section nFET pFET
MOSFET (Metal Oxide Semiconductor Field Effect Transistor). Top View Cross Section nFET The gate acts like a capacitor. A high voltage on the gate attracts charge into the channel. If a voltage exists between the source and drain a current will flow. In its simplest approximation the device acts like a switch. pFET ZDMC

31 What Complementary about CMOS?
Complementary devices work in pairs G G S D S D n-channel open when voltage at G is low closes when: voltage(G) > voltage (S) +  p-channel closed when voltage at G is low opens when: voltage(G) < voltage (S) –  ZDMC

32 数字系统设计 HW 补充讲义 1,2 ZDMC


Download ppt "memory array (2n words by m bits)"

Similar presentations


Ads by Google