Advertisement
Guest User

Untitled

a guest
Nov 15th, 2018
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.83 KB | None | 0 0
  1. when readS0 =>
  2. if amiga_risingedge = '1' then -- Rising edge of S0
  3. oTG68_RW <='1'; -- Pull /RW high to indicate read cycle
  4. iTG68_FCn <= FC;
  5. iTG68_SIZp <= "10";
  6. U5_U7_1oen_o <= '0'; -- Enable address bus| ----------------------
  7. amiga_addr <= cpu_addr(23 downto 0); -- Drive a valid address on the address bus
  8. mystate<=readS1;
  9. end if;
  10.  
  11. when readS1 =>
  12. if amiga_fallingedge = '1' then -- Falling edge of S1
  13. oTG68_ASn <= '0'; -- Pull /AS low to indicate that a valid address is on the bus
  14. oTG68_DSn <= '0'; -- Pull /USD,/LDS low|
  15. mystate<=readS2;
  16. end if;
  17.  
  18. when readS2 =>
  19. if amiga_risingedge = '1' then -- Rising edge of S2 ----------------------
  20. mystate<=readS3;
  21. end if;
  22.  
  23. when readS3 =>
  24. if amiga_fallingedge = '1' then -- Falling edge of S3
  25. if DSACK ="00" or DSACK ="01" or DSACK ="10" then -- Wait for cycle termination signal (DTACK) and inserts wait states
  26. mystate<=readS4;
  27. end if;
  28. end if;
  29.  
  30. when readS4 =>
  31. if amiga_risingedge = '1' then -- Rising edge of S4
  32. U4_2_U6_U7_2dir_o <= '0'; -- Data Bus as input to FPGA|
  33. U4_2_U6_U7_2oen_o <= '0';
  34. if cpu_addr(23 downto 20)=x"F" then
  35. cpu_datain<=ioTG68_DATA(15 downto 0);
  36. else
  37. cpu_datain<=ioTG68_DATA(31 downto 16);
  38. cpu_datain_temp <=ioTG68_DATA(15 downto 0);
  39. end if;
  40. mystate<=readS5;
  41. end if;
  42.  
  43.  
  44. when readS5 =>
  45. if amiga_fallingedge = '1' then -- Falling edge of S5
  46. oTG68_ASn <='1'; -- Negate /AS,/USD,/LDS|
  47. oTG68_DSn <='1';
  48. -- U5_U7_1oen_o <= '1'; -- Disable address bus|
  49. -- amiga_addr <= (others=>'Z'); -- Place Address bus in Hi-Z
  50. mystate <= delay1; -- |
  51. end if;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement