程序如下:
module TMI (address,ptr1,ptr2,b,control,count)
input[7:0] ptr1,ptr2;
input[15:0] address,b;
input control;
output[15:0] count;
parameter[7:0] base=8'b10000000;
wire[7:0] offset1,offset2;
wire[15:0] addr1,addr2,count1,count2;
assign offset1=base-ptr1;
assign offset2=base-ptr2;
assign addr1=address-{8'h00,offset1};
assign addr2=address-{8'h00,offset2};
assign count1=addr1+b;
assign count2=addr2+b;
assign count=(control==1'b1)?count1:count2;
end module;
这段程序要实现什么功能?
还有一个问题:逻辑综合的输入输出的描述形式



最新回复
wu.weihai (2008-10-23 19:08:23)
lyfhsd (2008-10-23 22:11:51)
cgc_good (2008-10-23 23:52:25)
liu851104 (2008-10-24 00:00:45)
就是上面的功能
只不过你的代码比较长而已
urchin (2008-10-24 19:18:32)
huangli_eda (2008-10-24 19:19:19)
同意楼上
baijin (2008-10-24 21:49:12)
urchin0424 (2008-10-25 10:54:08)
limingnefu (2008-10-25 10:56:46)
ycgfpga (2008-10-25 16:19:39)
我也去参加中兴笔试了,这道题好像还是比较简单的
xjtu_zhanglei (2008-10-27 12:10:09)
然后再加一个地址选择