Advertisement
Guest User

Untitled

a guest
Dec 13th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.28 KB | None | 0 0
  1. when read =>
  2. if( req = "001") then
  3. next_state <= read;
  4. licz <= '0';
  5. elsif (req = "010") then
  6. next_state <= compare;
  7. licz <= '1';
  8. elsif (req = "100") then
  9. next_state <= write1;
  10. licz <= '0';
  11. else
  12. next_state <= idle;
  13. licz <= '0';
  14. end if;
  15. enable <= "00";
  16. drive <= '1';
  17. creset <= '0';
  18.  
  19.  
  20. when write1 =>
  21. next_state <= write2;
  22. enable <= "01";
  23. licz <= '0';
  24. drive <= '0';
  25. creset <= '1';
  26.  
  27.  
  28. when write2 =>
  29.  
  30. if (req = "100") then
  31. next_state <= write1;
  32. enable <="10";
  33. licz <= '0';
  34.  
  35.  
  36. elsif (req = "001") then
  37. next_state <= read;
  38. enable <= "00";
  39. licz <= '0';
  40.  
  41. elsif (req = "010") then
  42. next_state <= compare;
  43. enable <= "00";
  44. licz <= '1';
  45.  
  46.  
  47. else
  48. next_state <= idle;
  49. enable <= "00";
  50. licz <= '0';
  51.  
  52. end if;
  53.  
  54. drive <= '0';
  55. creset <= '0';
  56.  
  57. when compare =>
  58. if (req = "010") then
  59. next_state <= compare;
  60. licz <= '1';
  61. elsif (req = "100") then
  62. next_state <= write1;
  63. licz <= '0';
  64.  
  65. elsif (req = "001") then
  66. next_state <= read;
  67. licz <= '0';
  68.  
  69. else
  70. next_state <= idle;
  71. licz <= '0';
  72.  
  73. end if;
  74. enable <= "00";
  75. drive <= '0';
  76. creset <= '0';
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement