|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册
x
请教:下面的程序的 throughput 为什么是2.7bits/clock?????谢谢
module powerv3(
output [7:0] XPower,
output
finished,
input [7:0] X,
input
clk,
input
start
);
reg [7:0] ncount;
reg [7:0] XPower1;
assign finished = (ncount == 0);
assign XPower = XPower1;
always@(posedge clk)
if(start)
begin
XPower1 <= X;
ncount <= 2;
end
else if(!finished)
begin
ncount <= ncount - 1;
XPower1 <= XPower1 * X;
end
endmodule
|
|