Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
15 years ago

Same codes on different version of Quartus, one takes forever to compile.

Hi all,

I compiled my codes in Quartus 9.1 and Quartus 10.1, on my laptop and one lab PC.

And the codes run on my laptop in Quartus 9.1 was compiled pretty smoothly. But for the same codes run on the lab PC in Quartus 10.1, it takes like forever and just get stuck in 2% progress.

I'm wondering is there any bugs with that? I changed another PC in the lab with version 10.1, and it's still the same condition...

If anyone can help, appreciate it a lot.


module statemachine(Y,reset,clock,X);
    // Input Port(s)
    input Y;
    input reset;
    input clock;
    // Output Port(s)
    output X;
    reg state,nextstate;
    reg X;
    
    parameter state0=0;
    parameter state1=1;
    always@(*)
    case(state)
    
     state0:begin
     X=0;
     nextstate=(~Y)?state1:state0;
            end
    
     state1:begin
     X=1;
     nextstate=(Y)?state0:state1;
            end
    
    // if(state==state0)
   // X=0;
   // else if(state==state1)
   // X=1;
   // if(state==state0)
   //   if(~Y)
   //     nextstate=state1;
   // if(state==state1)
   //   if(Y)
   //     nextstate=state0;
        
        
    endcase
    
    always@(posedge clock ,negedge reset)
    begin
    if(~reset)
    state<=state0;
    else
    state<=nextstate;
    end
    // Additional Module Item(s)
endmodule

3 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    I was curious and run your project on my quartus 10.1 and it compiled successfuly.

    It can be incomplete quartus installation - did you install DEVICES? If you installed not all devices check if you use the proper device.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Curiously, the "state machine" reduces to a single DFF. One should expect, that Quartus is able to keep with it. Does the problem occur, when compiling exactly this code? Or only, when it's embedded in a hierarchy? In the latter case, the other code may be important.