1  Serial-parallel multiplier

  Figure 12.1 shows the RTL diagram of a serial-parallel multiplier. One of the input vectors (a) is applied serially to the circuit (one bit at a time, starting from the LSB), while the other (b) is applied in parallel (all bits simultaneously). Say that a has M bits, while b has N. Then, after all M bits of a have been presented to the system, a string of M ‘0’s must follow, in order to complete the (M þ N)-bit output product.

  

  This system is pipelined, and is constructed using AND gates, full-adder units, plus registers (flip-flops). Each unit of the pipeline (except the leftmost one) requires one adder and two registers, plus an AND gate to compute one of the inputs. Thus for an M x N multiplier, O(N) of such units are required.

2  VHDL

  1) and_2.vhd

 library IEEE;
use ieee.std_logic_1164.all; entity and_2 is
port
(
a, b: in std_logic;
y: out std_logic
);
end and_2; architecture sim of and_2 is
begin
y <= a and b; end sim;

  2) reg.vhd

 library IEEE;
use ieee.std_logic_1164.all; entity reg is
port
(
d, clk, rst: in std_logic;
q: out std_logic
);
end reg; architecture sim of reg is
begin
process(clk, rst)
begin
if (rst = '') then q <= '';
elsif (clk'event and clk = '') then q <= d;
end if;
end process; end sim;

  3) fau.vhd

 library IEEE;
use ieee.std_logic_1164.all; entity fau is
port
(
a, b, cin: in std_logic;
s, cout: out std_logic
);
end fau; architecture sim of fau is
begin
s <= a xor b xor cin;
cout <= (a and b) or (a and cin) or (b and cin); end sim;

  4)  pipe

 library IEEE;
use ieee.std_logic_1164.all; library work;
use work.my_components.all; entity pipe is
port
(
a, b, clk, rst: in std_logic;
q: out std_logic
);
end pipe; architecture sim of pipe is
signal s, cin, cout: std_logic;
begin
U1: component fau port map(a, b, cin, s, cout);
U2: component reg port map(cout, clk, rst, cin);
U3: component reg port map(s, clk, rst, q);
end sim;

  5) my_components.vhd

 library IEEE;
use ieee.std_logic_1164.all; package my_components is component and_2 is
port
(
a, b: in std_logic;
y: out std_logic
);
end component; component fau is
port
(
a, b, cin: in std_logic;
s, cout: out std_logic
);
end component; component reg is
port
(
d, clk, rst: in std_logic;
q: out std_logic
);
end component; component pipe is
port
(
a, b, clk, rst: in std_logic;
q: out std_logic
);
end component; end my_components;

  6) multiplier.vhd

 library IEEE;
use ieee.std_logic_1164.all; library work;
use work.my_components.all; entity multiplier is
port
(
a, clk, rst: in std_logic;
b: in std_logic_vector( downto );
prod: out std_logic
);
end multiplier; architecture sim of multiplier is
signal and_out, reg_out: std_logic_vector( downto );
begin
U1: component and_2 port map(a, b(), and_out());
U2: component and_2 port map(a, b(), and_out());
U3: component and_2 port map(a, b(), and_out());
U4: component and_2 port map(a, b(), and_out());
U5: component reg port map(and_out(), clk, rst, reg_out());
U6: component pipe port map(and_out(), reg_out(), clk, rst, reg_out());
U7: component pipe port map(and_out(), reg_out(), clk, rst, reg_out());
U8: component pipe port map(and_out(), reg_out(), clk, rst, reg_out()); prod <= reg_out(); end sim;

VHDL之Serial-Parallel Multiplier的更多相关文章

  1. Serial,Parallel,CMS,G1四大GC收集器特点小结

    1.Serial收集器一个单线程的收集器,在进行垃圾收集时候,必须暂停其他所有的工作线程直到它收集结束.特点:CPU利用率最高,停顿时间即用户等待时间比较长.适用场景:小型应用通过JVM参数-XX:+ ...

  2. 转Serial,Parallel,CMS,G1四大GC收集器特点小结

    转 https://blog.csdn.net/u013812939/article/details/48782343 1.Serial收集器 一个单线程的收集器,在进行垃圾收集时候,必须暂停其他所有 ...

  3. The The Garbage-First (G1) collector since Oracle JDK 7 update 4 and later releases

    Refer to http://www.oracle.com/technetwork/tutorials/tutorials-1876574.html for detail. 一些内容复制到这儿 Th ...

  4. [转]Windows进程间通信的各种方法

    http://www.cnblogs.com/songQQ/archive/2009/06/03/1495764.html 道相似,不过它传输数据是通过不可靠的数据报(如TCP/IP协议中的UDP包) ...

  5. C#的变迁史 - C# 4.0 之并行处理篇

    前面看完了Task对象,这里再看一下另一个息息相关的对象Parallel. Parallel对象 Parallel对象封装了能够利用多核并行执行的多线程操作,其内部使用Task来分装多线程的任务并试图 ...

  6. 对Java垃圾回收最大的误解是什么

    当 我还是小孩的时候,父母常说如果你不好好学习,就只能去扫大街了.但他们不知道的是,清理垃圾实际上是很棒的一件事.可能这也是即使在Java的世界中, 同样有很多开发者对GC算法产生误解的原因--包括它 ...

  7. devices-list

    转自:https://www.kernel.org/pub/linux/docs/lanana/device-list/devices-2.6.txt LINUX ALLOCATED DEVICES ...

  8. Java Garbage Collection/垃圾收集 策略查看

    Java 的垃圾收集有各种各样的策略,默认的策略也会经常的改变. --比如到底是 serial , parallel, CMS; 具体到 Minor 怎么样,Old 又怎么样? 命令 java -XX ...

  9. [翻译]Java垃圾收集精粹(Java Garbage Collection Distilled)

    source URL: http://www.infoq.com/articles/Java_Garbage_Collection_Distilled Name: Java Garbage Colle ...

  10. JVM系列二:GC策略&内存申请、对象衰老

    JVM里的GC(Garbage Collection)的算法有很多种,如标记清除收集器,压缩收集器,分代收集器等等,详见HotSpot VM GC 的种类 现在比较常用的是分代收集(generatio ...

随机推荐

  1. Mutual Training for Wannafly Union #5

    A(UVA12336) 题意:给一个n*m(n,m<=1e5)的棋盘,棋盘上有一些障碍点不能放棋子,现在要在棋盘上放4个棋子,满足A->B->C->D->A,其中走的规则 ...

  2. SecureCRT复制粘贴快捷键

    复制:[Ctrl]+[Insert] 粘贴:[Shift]+[Insert]

  3. 【转】java中Thread类方法介绍

    原文: java中Thread类方法介绍 http://blog.csdn.net/seapeak007/article/details/53395609 这篇文章找时间分析一下!!!:http:// ...

  4. MySQL 入门(九)—— 查询数据

    查询数据就是从数据库中获取所须要的数据. 1.基本查询语句 即Select语句 当中.属性列表表示要查询的字段名.表名和视图列表表示从此处指定的表或者视图中查询数据.能够有多个:条件表达式1制定了查询 ...

  5. 苹果app审核,怎样申请加急审核

    苹果app加急审核,是为开发人员提供的特殊通道. 当线上有重大问题须要解决时,能够提出加急审核申请. 心急的朋友直接点 传送门 那么加急审核的入口在哪里呢 首先打开itunesconnect管理后台 ...

  6. unity3d-23种设计模式全解析

    http://www.jianshu.com/nb/4161593 2016.08.03 09:26 字数 1203 阅读 584评论 0喜欢 14 希望大家能共同学习,交流 谢谢支持zero(QQ: ...

  7. 关于ZEDboard

    核心芯片:核心ZYNQ XC7Z020CLG484 双核Cortex-A9 MPcore.主频达到667MHz,板载512MB内存 12V@3A的电源适配器 使用的SD卡中预装了Linaro系统,这是 ...

  8. C++ 訪问控制权限图解

    基类訪问权限 类继承方式 子类訪问权限           public   public   protected public protected   private   No Access   p ...

  9. Intellij IDEA报错:Could not save application settings: java.io.IOException: java.lang.AssertionError: Unexpected content storage modificat

    Question: i have a message saying "Could not save application settings: java.io.IOException: ja ...

  10. splay专题复习——bzoj 3224 &amp; 1862 &amp; 1503 题解

    [前言]快要省选二试了.上次去被虐出翔了~~这次即便是打酱油.也要打出风採!于是暂停新东西的学习.然后開始复习曾经的知识,为骗分做准备.PS:区间翻转的临时跳过,就算学了也来不及巩固了. [BZOJ3 ...