当前位置:文档之家› EDALabInstructor_090426

EDALabInstructor_090426

EDALabInstructor_090426
EDALabInstructor_090426

EDA 技术技术

实验实验指导书指导书指导书

EDA Technology EDA Technology

LAB LAB Instructor Instructor Instructor

绍兴文理学院绍兴文理学院

金宝根金宝根

20020099年03月

目 录

实验一使用原理图输入方法设计四位加法器 (1)

实验二使用原理图输入方法设计异步清除同步六进制加法计数器 (4)

实验三使用原理图输入方法设计四位并行输入串行输出寄存器 (8)

实验四十六进制减法计数器设计 (13)

实验五数据分配器和译码器设计 (15)

实验六正弦波信号发生器设计 (18)

实验七类型转换子程序设计 (20)

实验八八位加法器设计 (23)

实验九交通灯控制器设计 (25)

实验十数字钟设计 (28)

MaxplusII 项目设计基本操作流程 (30)

QuartusII使用流程 (31)

实验报告要求: (39)

实验一 使用原理图输入方法设计四位加法器

实验目的:

1. 初步掌握Quartus Ⅱ软件的基本操作与应用;

2. 熟悉用原理图输入方法设计电路;

3. 初步掌握采用EDA 软件进行电子设计的流程;

4. 初步理解模块化设计思想

实验内容实验内容::

1. 使用原理图输入方法设计四位加法器

2. 利用EDA 软件进行仿真分析

实验说明实验说明::

1. 根据真值表得出逻辑表达式(半加器、全加器)

2. 根据逻辑表达式,画出半加器原理图并加以编译、仿真

3. 以半加器为底层模块,画出全加器原理图并加以编译、仿真

4. 以全加器为底层模块,画出四位全加器原理图并加以编译、仿真 顶层原理图例化如下:

实验主要仪器设备及材料实验主要仪器设备及材料::

PC 机、EDA 软件(QuartusII )

实验思考实验思考::

设计原理设计原理::

半加器真值表: 全加器真值表:

A B S C 0 0 0 0 0 1 1 0 1 0 1 0 1 1

1

有半加器真值表得:

AB

C B A B A S =+=

有全加器真值表得(S’为半加器的和输出值):

ABCin Cin

B A Cin B A Cin B A S +++=

S Cin B A Cin B A Cin AB B A Cin B A B A Cin ′

⊕=⊕+⊕=+++=)()

()(

ABCin Cin AB Cin B A BCin A Cout +++=

AB

S Cin AB

B A B A Cin +′=++=)(

半加器原理图:

A B C in S C out 0 0 0 0 0 0 0 1 1 0 0 1 0 1 0 0 1 1 0 1 1 0 0 1 0 1 0 1 0 1 1 1 0 0 1 1

1

1

1

1

全加器原理图:

全加器原理图:

实验二 使用原理图输入方法设计异步清除同步六进制加法计数器

实验目的:

初步掌握Quartus Ⅱ软件的基本操作与应用; 熟悉用原理图输入方法设计电路;

进一步掌握采用EDA 软件进行电子设计的流程; 初步理解时序逻辑的原理图设计流程

实验内容实验内容::

使用原理图输入方法设计异步清除同步六进制加法计数器 利用EDA 软件进行仿真分析

实验说明验说明::

采用D 触发器及适当的门电路设计一带异步清零功能的同步六进制计数器 画出六进制计数器的状态转移表(图),并根据表(图)画出对应卡诺图 根据卡诺突推出对应驱动逻辑表达式 根据驱动状态方程,画出原理图并加以编译

根据编译后生成的时序仿真文件,进行激励源设置(即设置输入波形)加以仿真

分析检验

顶层原理图例化如下所示:

实验主要仪器设备及材料实验主要仪器设备及材料::

PC 机、EDA 软件(QuartusII )

实验思考实验思考::

设计原理设计原理::

因为 23 = 8 > 6 > 2 2 ,所以六进制计数器,需3个二进制输入项。这里我们设为d2, d1, d0。

通过三个D 触发器,得到三个现态输出项,我们设为Q 0n Q 1n Q 2n , 并将输出项次态设为:Q 0n+1 Q 1n+1 Q 2n+1。由此,得状态转移表如下:

Q 2n Q 1n Q 0n Clk Q 2n+1 Q 1n+1 Q 0n+1 D 2 D 1 D 0 0 0 0 up 0 0 1 0 0 1 0 0 1 up 0 1 0 0 1

0 0 1 0 up 0 1 1 0 1 1 0 1 1 up 1 0 0 1 0 0 1 0 0 up 1 0 1 1 0 1 1 0 1 up 0 0 0 0 0 0 1 1 0 up X X X X X X 1 1

1

up

X

X

X

X

X

X

由状态转移表,画出输入状态的卡诺图,如下: D2:

由左表得:

D 2 = n

n n n Q Q Q Q 0

201+

D1:

由左表得:

D1 =

n

n

n

n

n Q

Q

Q

Q

Q

1

1

2

+

D0:

由左表得:

D0 =

n Q

原理图原理图::

实验三 使用原理图输入方法设计使用原理图输入方法设计四位并行输入串行输出寄存器四位并行输入串行输出寄存器

实验目的实验目的::

掌握采用EDA 软件进行电子设计的流程; 进一步熟悉用原理图输入方法设计电路

加深对PLD 设计过程的理解,掌握层次化、模块化设计思想

实验内容实验内容::

使用原理图输入方法设计四位并行输入串行输出寄存器 利用EDA 软件进行仿真分析

实验说明实验说明::

设计四位寄存器用于寄存并行输入的四位数据并加以编译、仿真

设计四进制同步计数器,输出供二四译码器调用作为输入。并加以编译、仿真 在四位计数器基础上,设计一个四分频电路来控制锁存,并加以编译仿真 设计二四译码器,输出作为四位寄存器串行输出的选通信号。并加以编译、仿真 将此三模块级联调用并配合适当门电路,实现四位并行输入串行输出寄存器。并

加以编译、仿真分析。 顶层原理图例化如下:

实验主要仪器设备及材料实验主要仪器设备及材料::

PC 机、EDA 软件(QuartusII )

实验思考实验思考::

设计原理设计原理::

四位寄存器:

四进制同步加法计数器(设计方法,参照实验二):

There’s sth. Error in this schematic. Since the f4 gets rising edge at the 3rd clock, it latch the data at that time. But at this time, the decoder make the Q4 with ‘1’, this outputs the Q4 of the new latch data. This gets an error.

make counter reset, while f4 get up-side. then the counter & decoder restart with 0, and can be synchronous with f4 which drives the register lock.

note: while simulating, be sure make clock starts with 1, and preset clr is 0 ( to reset the counter).

二四译码器:

四位并行输入串行输出寄存器:

注:输入同register4输入端口名,输出端口名为: sout

实验实验四四 十六进制减法计数器设计

实验目的实验目的::

熟悉基于QuartusII 的VHDL 设计流程 了解VHDL 的基本结构;

通过编写程序掌握VHDL 数据类型及运算操作符; 用VHDL 语言设计十六进制减计数器,并进行电路仿真。

实验内容实验内容::

使用VHDL 语言,设计十六进制减法计数器 利用EDA 软件进行仿真分析

实验说明实验说明::

使用VHDL 语言,十六进制减法计数器(利用时钟脉冲计数),并进行仿真分析; 顶层原理图例化:

Note : change width of the output port, calculate it by yourself.

实验主要仪器设备及材料实验主要仪器设备及材料::

PC 机、EDA 软件(QuartusII )

实验思考实验思考::

Lecture notes:

Counter: increase or decrease

Counter increase or decreas 1 while a clock pulse comes(either rising_edge or falling_edge, both is OK. Or both is active, if this, it counts 2 every clock)

Requirements:

1.can be enabled or not to work

2.can be reseted synchronously or asynchronously

3.one use variable as counter carrier, the other uses signal as counter carrier

pay attention to the difference between variable and signal:

1.declarative field

2.assignment mark

3.assingment delay

https://www.doczj.com/doc/4517668316.html,age of each

实验五 数据分配器和译码器设计

实验目的实验目的::

熟悉基于QuartusII 的VHDL 设计流程 了解VHDL 的基本结构;

通过编写程序掌握VHDL 数据类型及运算操作符;

用VHDL 语言设计数据分配器和译码器,并进行电路仿真。

实验内容实验内容::

使用VHDL 语言,设计数据分配器(八位输入,四位输出)和七段显示译码器 把两者通过元件例化,结合,组成 数据分配显示电路(图形连接) 利用EDA 软件进行仿真分析

实验说明实验说明::

了解数据分配和译码器的工作模式

使用VHDL 语言,设计数据分配器和译码器,并进行仿真分析;

顶层原理图例化:

实验主要仪器设备及材料实验主要仪器设备及材料::

PC 机、EDA 软件(QuartusII )

实验思考实验思考::

Lecture notes:

Data allocator:

Use a select signal to allocate the input data ( a vector) to different channel.(vector) Decoder:

Decoder: 4 bit width input data, and 7 bit width output data

7-segments LED:

Eg: signal seg7 : std_logic_vector(7 downto 0) := (h, g, f, e, d, c, b, a);

Assume ‘1’ for flashing the corresponding segment while ‘0’ for off.

Then the hexadecimal “b” is “01111100”

b

-- *****

-- g * h * c

-- *****

-- f * * d

-- ***** *a

-- e

We can use either sequential statements or concurrent statements to implement the function. Such as if…then; case…when; with…select; when…else.

But please note the difference among these statements. Whchi have priority, which have mutual feather, and so on

For design, you can use either sequential statements or concurrent statements to implement the function. And use components instantiation to connect the allocator with decoder.

We set one more ports: 4-bit width data output port for hardware implementation.

Also, we set two colorful lights: one for higher 4 bit and the other for lower 4 bits.

USE THE BLOCK DIGRAM / SHEMATIC FILE TO IMPLEMENT THE TOP-DESIGN.

Requirements:

1.8 bit width input data vector, and with 4-bit width output data

2.can be enabled or not to work

3.after simulate successfully, download the programming file to the target

device.

4.connect the necessary pins with buttons by wire. ( the corresponding pins

to entity ports Info. can be found in the report file which is generated

automatically by the compiler.)

5.check the results

Here we use the static LEDs while downloading the programming file, that means we do not need to decode the output data. We can directly use the static LEDs which lie on the top right of the experimental case.

Introduce the EDA experimental case.

The operating flow refers to the document “QuartusII项目设计基本操作流程”.

Note: 1. must set the target device before compiling

2.make sure you select the ByteBlaster(MV) while programming

实验六 正弦波信号发生器设计

实验目的实验目的::

熟悉基于QuartusII 的VHDL 设计流程 了解VHDL 的基本结构;

通过编写程序掌握VHDL 数据类型及运算操作符; 用VHDL 设计简单正弦波信号发生器。

实验内容实验内容::

计算正弦波的采样点(值),上升(或下降采样64点); 使用VHDL 语言,设计简单正弦波信号发生器; 利用EDA 软件进行仿真分析。

实验说明实验说明::

使用VHDL 语言,设计64进制计数器,用于依次计数选择各采样点值; 使用VHDL 语言,使用单独实体(元件引用)或结构体内代码实现采样值的选

择输出以形成正弦波形; 顶层原理图例化:

实验主要仪器设备及材料实验主要仪器设备及材料::

PC 机、EDA 软件(QuartusII )

相关主题
文本预览
相关文档 最新文档