Differences

This shows you the differences between two versions of the page.

Link to this comparison view

soc:laboratoare:04:dfa_states_changing [2024/03/10 22:14]
maria_teona.olteanu
soc:laboratoare:04:dfa_states_changing [2026/03/22 16:31] (current)
robert_fabian.tudor
Line 4: Line 4:
 <code Verilog> <code Verilog>
     always@ ( * ) begin     always@ ( * ) begin
-        ​NextState ​CurrentState ​;+        ​l_r_nextState ​l_r_currentState ​;
    
-        case ( CurrentState ​)+        case ( l_r_currentState ​)
             STATE_Initial : begin             STATE_Initial : begin
-                ​NextState ​= STATE_1 ;+                ​l_r_nextState ​= STATE_1 ;
             end             end
             STATE_1 : begin             STATE_1 : begin
-                if (!Input+                if (!i_w_in
-                    ​NextState ​= STATE_2 ;+                    ​l_r_nextState ​= STATE_2 ;
             end             end
             STATE_2 : begin             STATE_2 : begin
-                if (Input+                if (i_w_in
-                    ​NextState ​= STATE_3 ;+                    ​l_r_nextState ​= STATE_3 ;
             end             end
             STATE_3 : begin             STATE_3 : begin
-                if (Input+                if (i_w_in
-                    ​NextState ​= STATE_4 ;+                    ​l_r_nextState ​= STATE_4 ;
                 else                 else
-                    ​NextState ​STATE_1 ​;+                    ​l_r_nextState ​STATE_2 ​;
             end             end
             STATE_4 : begin             STATE_4 : begin
-                if (Input+                if (i_w_in
-                    ​NextState ​= STATE_1 ;+                    ​l_r_nextState ​= STATE_1 ;
                 else                 else
-                    ​NextState ​= STATE_2 ;+                    ​l_r_nextState ​= STATE_2 ;
             end             end
-            //Stări pentru tratarea erorilor +            // Stări pentru tratarea erorilor 
-            //Dacă automatul ajunge în aceste stări se va reseta.+            // Dacă automatul ajunge în aceste stări se va reseta.
             STATE_5_PlaceHolder : begin             STATE_5_PlaceHolder : begin
-                ​NextState ​= STATE_Initial ;+                ​l_r_nextState ​= STATE_Initial ;
             end             end
             STATE_6_PlaceHolder : begin             STATE_6_PlaceHolder : begin
-                ​NextState ​= STATE_Initial ;+                ​l_r_nextState ​= STATE_Initial ;
             end             end
             STATE_7_PlaceHolder : begin             STATE_7_PlaceHolder : begin
-                ​NextState ​= STATE_Initial ;+                ​l_r_nextState ​= STATE_Initial ;
             end             end
         endcase         endcase
     end     end
 </​code>​ </​code>​
soc/laboratoare/04/dfa_states_changing.1710101685.txt.gz · Last modified: 2024/03/10 22:14 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