Quartus II 实验 (二) 您所在的位置:网站首页 用vhdl设计一个8位加法器 Quartus II 实验 (二)

Quartus II 实验 (二)

#Quartus II 实验 (二)| 来源: 网络整理| 查看: 265

0x1 前言 

计算机组成原理实验项目要求之一,使用Quartus II的VHDL语言制作一个 4位加法器和4位乘法器,并烧到试验箱中进行测试。

关于我所使用的试验箱DICE-E213的部分介绍请参照 Quartus II 实验 (一)——软件和试验箱DICE-E213的基本说明 

 

0x2 四位乘法器 首先说明目录结构:

|

|-- and4a

|-- ls283

|-- mul4p  

二进制加法过程

模块说明 and4a 乘法模块,负责将 每一位乘数 与 被乘数 相乘ls283 加法模块,负责将中间结果相加。

>>> 需要特别注意的是上述每一个都是一个工程,完成以后需要进行编译;在主程序中需要将上面两个模块引入,才能正常调用。

 

and4a Library ieee; Use ieee.std_logic_1164.all; Use ieee.std_logic_unsigned.all; Entity and4a is Port(a:in std_logic_vector(3 downto 0); en:in std_logic; r:out std_logic_vector(3 downto 0)); End and4a; Architecture behave of and4a is Begin Process(en,a(3 downto 0)) Begin If (en='1') then rop1(3),r=>sa); U2:ls283 port map(o1=>sb(4 downto 1),o2=>sa,res=>result(7 downto 3)); U3:and4a port map(a=>op2,en=>op1(2),r=>sc); U4:ls283 port map(o1=>sc,o2=>sd(4 downto 1),res=>sb); u5:ls283 port map(o1=>sg,o2=>se,res=>sd); u6:and4a port map(a=>op2,en=>op1(0),r=>sf); result(0)


【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有