Advertisement
Guest User

Untitled

a guest
Nov 26th, 2014
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.04 KB | None | 0 0
  1. process(Clock)
  2. begin
  3. if (Reset = '1') then
  4. MainFSM_State <= ST_IDLE;
  5. Func1FSM_State <= ST_IDLE;
  6. Func2FSM_State <= ST_IDLE;
  7. else
  8. MainFSM_State <= MainFSM_NextState;
  9. Func1FSM_State <= Func1FSM_NextState;
  10. Func2FSM_State <= Func2FSM_NextState;
  11. end if;
  12. end process;
  13.  
  14. process(MainFSM_State, Input, ...,
  15. Func1FSM_Output, Func1FSM_Return,
  16. Func2FSM_Output, Func2FSM_Return)
  17. begin
  18. Func1FSM_Call <= '0';
  19. Func2FSM_Call <= '0';
  20.  
  21. MainFSM_Output <= x"00";
  22.  
  23. case MainFSM_State is
  24. when ST_IDLE =>
  25. if (Input = '1') then
  26. Func1FSM_Call <= '1';
  27. MainFSM_NextState <= ST_FUNC1_EXECUTING;
  28. end if;
  29.  
  30. when ST_FUNC1_EXECUTING =>
  31. MainFSM_Output <= Func1FSM_Output;
  32.  
  33. if (Func1FSM_Return = '1') then
  34. Func2FSM_Call <= '1';
  35. end if;
  36.  
  37. ....
  38. end case;
  39. end process;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement