interig 发表于 2010-6-27 23:53:59

FPGA笔试题:用Verilog/VHDL写出程序,要求要有饱和处理

a和b低8位的相加结果放在c,用Verilog/VHDL写出程序,要求要有饱和处理<br>
<br>
<br>
大家做做。

CHANG 发表于 2010-6-28 01:23:18

<br>
a和b低8位的相加结果放在c,用Verilog/VHDL写出程序,要求要有饱和处理<br>
<br>
<br>
大家做做。 什么是饱和处理?

inter 发表于 2010-6-28 02:59:53

什么是饱和处理阿?

interige 发表于 2010-6-28 03:17:55

应该就是防溢出的处理吧,结果超出表示范围时取最大或最小值

CHAN 发表于 2010-6-28 04:26:48

楼上是正解,防止溢出

longtime 发表于 2010-6-28 06:11:41

那该怎么处理?

CHA 发表于 2010-6-28 07:42:15

是指的最高位 有溢出吧 ?

ICE 发表于 2010-6-28 08:04:39

这个题目怎么还有解答?<br>
关注中~

CHA 发表于 2010-6-28 09:56:31

貌视不带进位的加法器
        http://bbs.vibesic.com/images/smilies/default/smile.gif
<br>
努力看看

UFP 发表于 2010-6-28 10:57:47

module&nbsp;&nbsp;add(a,b,c);<br>
input&nbsp; &nbsp; &nbsp; &nbsp; a,b;<br>
output c;<br>
reg&nbsp;&nbsp;c;<br>
always@(a,b)<br>
if(a+b&gt;9'b011111111)&nbsp; &nbsp;c&lt;=8'b11111111;<br>
else&nbsp; &nbsp; &nbsp; &nbsp; c&lt;=a+b;<br>
endmodule<br>
新学中&nbsp; &nbsp;大家看看有没有问题
页: [1] 2
查看完整版本: FPGA笔试题:用Verilog/VHDL写出程序,要求要有饱和处理