1 / 11

第十讲 时序逻辑电路设计

第十讲 时序逻辑电路设计. 主讲人:方跃春 长沙民政学院电子信息工程系. 四位二进制加减法器. Sub A[3..0] B[3..0]. S[3..0] Co. 上周上机讲解 1、四位二进制加减法器设计. 设计程序: subadd4_V. 2、四位二进制乘法器设计. 四位 二进 制乘 法器 设计. A[3..0] B[3..0]. S[7..0]. S=AXB. 程序: Multi4_v. 新课:时序逻辑电路设计. 时序逻辑电路:任意时刻,电路的输出状态不仅与该时刻输入状态有关,而且与电路前状态有关。或者说电路具有记忆功能。

aldona
Download Presentation

第十讲 时序逻辑电路设计

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 第十讲 时序逻辑电路设计 主讲人:方跃春 长沙民政学院电子信息工程系

  2. 四位二进制加\减法器 Sub A[3..0] B[3..0] S[3..0] Co 上周上机讲解1、四位二进制加\减法器设计 设计程序:subadd4_V

  3. 2、四位二进制乘法器设计 四位 二进 制乘 法器 设计 A[3..0] B[3..0] S[7..0] S=AXB 程序:Multi4_v

  4. 新课:时序逻辑电路设计 时序逻辑电路:任意时刻,电路的输出状态不仅与该时刻输入状态有关,而且与电路前状态有关。或者说电路具有记忆功能。 时序逻辑电路显著特征:必需要有时钟触发脉冲,编译后会生成触发器。 如:各种触发器、寄存器、计数器等。

  5. CP 一、D触发器设计

  6. d触发器程序: LIBRARY ieee;--调用ieee库 USE ieee.std_logic_1164.all; --使用ieee库中的STD_LOGIC_1164包集合 ENTITY dffe IS --实体取名为dffe PORT (clrn,prn,ena,clk, d: IN STD_LOGIC; q : OUT STD_LOGIC); END dffe; ARCHITECTURE a OF dffe IS--a是结构体的名字 BEGIN process(clk) begin if (clrn='0' and prn='1' )then q<='0';

  7. elsif(clrn='1' and prn='0' )then q<='1'; elsif (clk'event and clk='1')then if(ena='1' andclrn='1' and prn='1' ) then q<=d; end if; end if; end process; END a;

  8. 八位寄存器 CLRN CLK D[7..0] Q[7..0] 二、8位寄存器设计

  9. 课堂练习: 设计8位寄存器程序!

  10. RAM 双向IO RW CLK 三、位随机存储器(RAM)的设计 随机存储器是可随意改变储存数据的一种存储器。当数据变化时,可通过写(RW)控制将数据从数据线上保存到存储器中;也可通过读(RW)控制将数据从存储器读出到数据线上。

  11. 控制线 双向数据线 Clk rw IO X 0 不变 ↑ 1 从存储器读出到IO ↑ 0 从IO写入存储器

More Related