This is an old revision of the document!


  • aici implementăm algoritmul/logica de tranziție a automatului.
  • tranzițiile între stări se fac în funcție de starea curentă și de intrări.
    always@ ( * ) begin
        l_r_nextState = l_r_currentState ;
 
        case ( l_r_currentState )
            STATE_Initial : begin
                l_r_nextState = STATE_1 ;
            end
            STATE_1 : begin
                if (!i_w_in)
                    l_r_nextState = STATE_2 ;
            end
            STATE_2 : begin
                if (i_w_in)
                    l_r_nextState = STATE_3 ;
            end
            STATE_3 : begin
                if (i_w_in)
                    l_r_nextState = STATE_4 ;
                else
                    l_r_nextState = STATE_2 ;
            end
            STATE_4 : begin
                if (i_w_in)
                    l_r_nextState = STATE_1 ;
                else
                    l_r_nextState = STATE_2 ;
            end
            //Stări pentru tratarea erorilor
            //Dacă automatul ajunge în aceste stări se va reseta.
            STATE_5_PlaceHolder : begin
                NextState = STATE_Initial ;
            end
            STATE_6_PlaceHolder : begin
                NextState = STATE_Initial ;
            end
            STATE_7_PlaceHolder : begin
                NextState = STATE_Initial ;
            end
        endcase
    end
soc/laboratoare/04/dfa_states_changing.1711010568.txt.gz · Last modified: 2024/03/21 10:42 by maria_teona.olteanu
CC Attribution-Share Alike 3.0 Unported
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0