123
你的精振频率和目标频率不成倍数,值又太低,所以精度有限。
module fsoc(rst,clk,fout);
input rst,clk;
output fout;
reg [2:0] cnt;
always @(posedge clk)
begin
if (rst==1)
cnt <=3'h0;
else if (cnt <(2048/192) cnt <=cnt+1'b1;
else cnt <=3'h0;
end
endmodule
发表时间:2006年12月3日7:23:23