李亚民老师更注重硬件设计思想的训练。
他给出的硬件设计方法更贴近底层硬件,下面看看他的设计思想:
                                                                                                                                   a7a6a5a4a3a2a1a0
                                                                                                                           *       b7b6b5b4b3b2b1b0
                                                                                                                  --------------------------------------------------
                                                                                                                 a7b0  a6b0  a5b0  a4b0  a3b0  a2b0  a1b0  a0b0
                                                                                                      a7b1  a6b1   a5b1  a4b1  a3b1  a2b1  a1b1  a0b1
                                                                                           a7b2  a6b2  a5b2   a4b2   a3b2  a2b2  a1b2  a0b2
                                                                                 a7b3  a6b3  a5b3  a4b3   a3b3   a2b3  a1b3  a0b3
                                                                       a7b4  a6b4  a5b4  a4b4  a3b4   a2b4   a1b4  a0b4
                                                            a7b5  a6b5   a5b5  a4b5  a3b5  a2b5   a1b5   a0b5
                                                 a7b6  a6b6   a5b6   a4b6  a3b6  a2b6  a1b6   a0b6
      +                              a7b7  a6b7  a5b7    a4b7   a3b7  a2b7  a1b7  a0b7
-----------------------------------------------------------------------------------------------------------------------------------------------------------

 //date :2013/6/20
//designer :pengxiaoen
//function : unsigned 8 bit multipliter module mul8_unsigned (
a_in,b_in,
result
);
input [:] a_in, b_in;
output [:] result ; wire [:] ab0 = b_in[] ? a_in : 'd0;
wire [:] ab1 = b_in[] ? a_in : 'd0;
wire [:] ab2 = b_in[] ? a_in : 'd0;
wire [:] ab3 = b_in[] ? a_in : 'd0;
wire [:] ab4 = b_in[] ? a_in : 'd0;
wire [:] ab5 = b_in[] ? a_in : 'd0;
wire [:] ab6 = b_in[] ? a_in : 'd0;
wire [:] ab7 = b_in[] ? a_in : 'd0; assign result = ( ({'b0,ab0[7:0]} +
{'b0,ab1[7:0],1'b0}) +
({'b0,ab2[7:0],2'b0} +
{'b0,ab3[7:0],3'b0}) +
({'b0,ab4[7:0],4'b0} +
{'b0,ab5[7:0],5'b0}) +
({'b0,ab6[7:0],6'b0} +
{'b0,ab7[7:0],7'b0})
); endmodule

这种设计思想很好,但是这个就有点悲剧了

一共用了126个逻辑单元
特权的16bit unsigned multipliter 才用了103个。
吴厚航 PK 李亚民 ,呵呵,不知道怎么样去比较这两个设计思想的优缺点,求指点啊

李老师说如果没有加括号,就也许会顺序执行,但是我加了和么有加么有区别啊

mul8_unsigned multipliter的更多相关文章

  1. iOS 屏幕适配:autoResizing autoLayout和sizeClass

    1. autoResizing autoresizing是苹果早期的ui布局适配的解决办法,iOS6之前完全可以胜任了,因为苹果手机只有3.5寸的屏幕,在加上手机app很少支持横屏,所以iOS开发者基 ...

  2. iOS开发——屏幕适配篇&autoResizing autoLayout和sizeClass

    autoResizing autoLayout和sizeClass,VFL,Masonry详解 1. autoResizing autoresizing是苹果早期的ui布局适配的解决办法,iOS6之前 ...

  3. ChatCell

    import UIKit let chatCellHeight: CGFloat = 72 let chatCellInsetLeft =  chatCellHeight + 8 class Chat ...

  4. 转:iOS 屏幕适配,autoResizing autoLayout和sizeClass图文详解

    1. autoResizing autoresizing是苹果早期的ui布局适配的解决办法,iOS6之前完全可以胜任了,因为苹果手机只有3.5寸的屏幕,在加上手机app很少支持横屏,所以iOS开发者基 ...

  5. MobileNets总结

    Google在2017年上半年发表了一篇关于可以运行在手机等移动设备上的神经网络结构--MobileNets.MobileNets是基于深度可分离卷积(depthwise separable conv ...

  6. (STM32F4) 精準的Delay不透過Timer

    從一個厲害的國外工程師看來的delay寫法,使用while loop會使用幾個指令去計算,可能會需要多少時間. while(variable--); 這行代碼執行一次預估會消耗MCU 4 clock ...

  7. iOS 屏幕适配,autoResizing autoLayout和sizeClass图文详解

    === 1. autoResizing autoresizing是苹果早期的ui布局适配的解决办法,iOS6之前完全可以胜任了,因为苹果手机只有3.5寸的屏幕,在加上手机app很少支持横屏,所以iOS ...

  8. autoResizing autoLayout和sizeClass

    原文网址: http://www.cnblogs.com/cxbblog/p/4166876.html 1. autoResizing autoresizing是苹果早期的ui布局适配的解决办法,iO ...

随机推荐

  1. pexpect-pxssh-登陆Linux-执行命令

    #!/usr/bin/python import pexpect import pxssh try: remote=pxssh.pxssh() hostname=raw_input('hostname ...

  2. iphone抓取移动网络报文的方法

    iphone抓取移动网络报文的方法 对iPhone进行越狱,网上有很多教程,这里不做说明.越狱后会有cydia这个app,首先对用户身份进行设置,选用开发者身份.打开这个应用,搜索openssh,找到 ...

  3. 手机SIM卡知识大科普

    SIM卡 SIM卡是(Subscriber Identity Module 客户识别模块)的缩写,也称为智能卡.用户身份识别卡,GSM数字移动电话机必须装上此卡方能使用.它在一电脑芯片上存储了数字移动 ...

  4. 使用 Media Center 遥控器(Windows Vista Premium)

    本文适用于安装了 Windows Vista Premium 并附带遥控器的 HP 和 Compaq 台式电脑. 本文简要介绍了三种Windows Media Center 遥控器上每个按钮的功能. ...

  5. 笔试题引出float数据的存储方式的深究

    笔试题: #include <iostream>#include <stdio.h>#include <string.h>#include <conio.h& ...

  6. 七、cocos2dx之粒子系统

    本文由qinning199原创,转载请注明:http://www.cocos2dx.net/?p=66 一.介绍 粒子系统指的是一个使用大量很小的精灵或者其他的一些绘制对象模拟一些模糊效果.使用传统的 ...

  7. HDU4099(斐波那契数列与字典树)

    题目:Revenge of Fibonacci 题意:给出斐波那契数列的前k位,k不超过40,找出最小的正整数n,满足F(n)的前k位与给定数的前k位相同,斐波那契数列的项数不超过100000. 解析 ...

  8. 不重新编译PHP文件的情况下php GD库扩展库的编译安装(centos)

    gd-2.0.33.tar.gz http://www.boutell.com/gd/ jpegsrc.v6b.tar.gz http://www.ijg.org/ libpng-1.2.7.tar. ...

  9. Java安全机制之泛型(JDK1.5)

    泛型,类型安全机制. 好处: 1.将运行时期出现问题ClassCastException转移到了编译时期,方便解决问题,减少运行时期的问题,有利于程序的健壮性. 2.避免了强制转换的麻烦 泛型格式: ...

  10. Binary Tree Preorder Traversal and Binary Tree Postorder Traversal

    Binary Tree Preorder Traversal Given a binary tree, return the preorder traversal of its nodes' valu ...