|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册
x
今天仿真网友yayapei在帖子中说到的鉴相器。其中,pf_up是local相比reference朝前,pf_down是滞后。
我编译后QII报错,各位看看
原作者——yayapei
其原代码见下:
module top_jianxiang(reference_frq, local_frq, pf_up, pf_down );
input reference_frq;
input local_frq;
output pf_up;
output pf_down ;
reg pf_up,pf_down;
always @(posedge reference_frq or posedge local_frq)
begin
if (local_frq == 0) // reference_frq的上升沿先到
pf_down <= 1;
else
if (local_frq == 1) // local_frq的上升沿先到
pf_down <= 0;
end
always @(posedge reference_frq or posedge local_frq)
begin
if (reference_frq == 0)
pf_up <= 1;
else
if (reference_frq == 1)
pf_up <= 0;
end
endmodule
在用Quartus II编译时报错:“Error (10200): Verilog HDL Conditional Statement error at top_jianxiang.v(11): cannot match operand(s) in the condition to the corresponding edges in the enclosing event control of the always construct”
很明显这是指代码中always部分有问题,将local_frq要求为上升沿启动always导致了错误!但小弟却担心改动此处将造成一发而动全身的结果,望高手支招! |
|