2

我不断收到这个错误,我尝试了各种方法来修复它,但它对我没有帮助。

我希望有人能在这方面帮助我。

有问题的代码片段如下:

if((HR == AHR) and (MIN == AMIN)) To be exact.

always @ (posedge CLK)
begin
case(state)
NORMAL: begin
        DHR <= HR;
        DMIN <= MIN;
        if(ALON)
            begin
            AENABLED <= 1;

            if((HR == AHR) and (MIN == AMIN))
                begin
                ALARM <= 1;
                if(SNOOZE) // we assume that SNOOZE is to be operated only when the Alarm is ON!
                    begin
                    AMIN <= AMIN + 2;
                    if(AMIN == 60)
                        begin
                        AMIN <= 0;
                        AHR <= AHR + 1;
                            if(AHR == 24)
                                AHR <= 0;
                        end
                    else if(AMIN == 61) // since AMIN is incremented by 2 it can either be 60 or 61 depending on previous alarm time
                        begin
                        AMIN <= 1;
                        AHR <= AHR + 1;
                            if(AHR == 24)
                            AHR <= 0;
                        end
                    end
                end
            end
4

1 回答 1

3

and不是verilog!试试&&吧。

于 2012-12-13T12:08:25.970 回答