如果声明和else语句正在ML605板上执行 - 硬件

时间:2014-12-26 08:57:34

标签: hardware verilog fpga

我的代码的问题是在ML605板上执行if和else情况。请告诉我我在哪里做错了。我发布的代码是关于Multibooting

 always@(posedge clk_100Mhz)
    begin
            if(TRIGGER == 1'b1)                                 
             begin
                    led_test_01 <= 1;
          case(NEXT_STATE)

                STATE_00:
                    begin
                        ICAP_WRITE <= 1'b0;
                        CE <= 1'b0;
                        status <= 8'h1;
                        I <= 32'hFFFFFFFF;                          //Dummy word
                        NEXT_STATE <= STATE_01;
                    end
                STATE_01:
                    begin
                        ICAP_WRITE <= 1'b0;
                        CE <= 1'b0;
                        status <= 8'h2;
                         I  <= 32'h5599AA66;                        //sync word
                        NEXT_STATE <= STATE_02;
                    end
                STATE_02:
                    begin
                        ICAP_WRITE <= 1'b0;
                        CE <= 1'b0;
                        status <= 8'h3;
                        I <= 32'h04000000;                          //Type 1 NO OP
                        NEXT_STATE <= STATE_03;
                    end
                STATE_03:
                    begin
                        ICAP_WRITE <= 1'b0;
                        CE <= 1'b0;
                        status <= 8'h4;
                        I <= 32'h0C400080;                      //Type 1 Write 1 words to WBSTAR
                        NEXT_STATE <= STATE_04;
                    end
   /* THE SECOND BIT FILE IS NOT BEING ADDED...SO THE OUTPUT IS NOT COMING... */
                    STATE_04:
                        begin
                            ICAP_WRITE <= 1'b0;
                            CE <= 1'b0;
                            status <= 8'hff;
             //               I <= 32'h3062CE5D;                    //Warm boot start address
                                        I <= 32'h0031E72E;                  // THE ORIGINAL BIT FILE ADDRESS IS 32'h4673BA
                                    A <= 4'b1010;                       
                            NEXT_STATE <= STATE_05;             // AFTER BIT SWAPPING THE ADDRESS BECOMES 32'h3062CE5D
                        end
                    STATE_05:
                        begin
                            ICAP_WRITE <= 1'b0;
                            CE <= 1'b0;
                            status <= 8'h6;
                            I <= 32'h0C000180;                  //Type1 Write 1 words to CMD 
                            NEXT_STATE <= STATE_06;
                        end
                    STATE_06:
                        begin
                            ICAP_WRITE <= 1'b0;
                            CE <= 1'b0;
                            status <= 8'h7;
                            I <= 32'h000000F0;                  //IPROG COMMAND
                            NEXT_STATE <= STATE_07;
                        end
                    STATE_07:
                        begin
                            ICAP_WRITE <= 1'b0;
                            CE <= 1'b0;
                            status <= 8'h8;
                            I <= 32'h04000000;                  //TYPE 1 NO OP
                            NEXT_STATE <=STATE_08 ;
                        end
                    STATE_08:
                        begin
                            CE <= 1'b1;
                            status <= 8'hA;
                            NEXT_STATE <= STATE_08;
                        end  
                    default:

                        begin
                        ICAP_WRITE <= 1'b1;
                            CE <= 1'b1;
                            status <= 8'hD;
                            I <= 32'hAAAAAAAA;
                            NEXT_STATE <= STATE_00;
                        end
                    endcase
              end
        else 
        begin 
                  $display(TRIGGER);
                   ICAP_WRITE <= 1'b0;
               CE <= 1'b0;
                    A <= 4'b0000;                       
               status <= 8'hE;
               I <= 32'h0;          
      end
end

上面代码的模拟工作正常,但在主板上它不起作用。任何有关做什么的建议都会有所帮助。

提前致谢。

0 个答案:

没有答案