|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册
x
我遇到了个问题 怎么也想不通 1bit全加器程序和 testbench程序 我的想法是在输入a
> 管脚上产生周期方波 但是做仿真之后a上面没有方波出现 不知道问题出在哪里 很困惑
是在modelsim环境里运行的
module add(cout,sum,a,b,cin);
> input a,b;
> input cin;
> output cout;
> output sum;
> assign {cout,sum}=a+b+cin;
> endmodule
>
>
> `timescale 1ns/100ps
> module testbench();
> reg a,b,cin;
> reg clk;
> wire cout,sum;
> add U1(
> .cout(cout),
> .sum(sum),
> .a(a),
> .b(b),
> .cin(cin)
> );
>
> initial
> begin a=1'b0;
> forever #10 a=!a;
> end
> endmodule |
|