这里写目录标题
- 累加累乘器
累加累乘器
`timescale 1ns/10ps
module inout_test();
parameter ratio = 2;
reg [15:0]num ;
reg [31:0]save_add_v;
reg [31:0]save_multi_v;
initial
begin
save_add_v = 100;
save_multi_v = 100;
forever begin
save_add_v = save_add_v + ratio;
save_multi_v = save_multi_v * ratio;
#1;
$display("This is a test program");
$display("save_add_v:%d,save_multi_v:%d" , save_add_v , save_multi_v);
if($time >4)
$finish;
end
end
endmodule;
输出: