Advertisement
alex1232222

Untitled

Dec 12th, 2020
278
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VHDL 3.73 KB | None | 0 0
  1. LIBRARY ieee;
  2. use ieee.std_logic_1164.all;
  3. use ieee.numeric_std.all;
  4. --use ieee.std_logic_unsigned.all;
  5. entity mashup_sign Is
  6. end mashup_sign;
  7.  
  8. architecture mashup of mashup_sign IS
  9.  
  10. signal clk_T_all        : std_logic;
  11. signal r_reset_T_all        : std_logic;
  12. signal r_ready_T_all        : std_logic;
  13. signal r_towork_request_T_DMA   : std_logic;
  14. signal r_comand_address_T_DMA   : std_logic_vector(0 to 15);
  15. signal r_cs_DMA_RAM     : std_logic;
  16. signal r_cs_CPU_RAM     : std_logic;
  17. signal r_command_DMA_RAM    : std_logic_vector (0 to 1);
  18. signal r_address_DMA_RAM    : std_logic_vector (0 to 15);
  19. signal r_address_CPU_RAM    : std_logic_vector (0 to 15);
  20. signal r_output_DMA_Test    : std_logic_vector (0 to 2);
  21. signal r_data_RAM_DMA       : std_logic_vector (0 to 63);
  22. signal r_data_CPU_RAM       : std_logic_vector (0 to 63);
  23. signal r_data_DMA_RAM       : std_logic_vector (0 to 63);
  24.  
  25.  
  26.  
  27. component FSM_DMA_C is
  28. port (                         -- r_ - register
  29.     clk         :IN     std_logic; --
  30.     r_ready         :IN std_logic; -- 0 ничё не меняется
  31.     r_towork_request    :IN     std_logic; --
  32.     r_reset         :IN     std_logic; --
  33.     r_command_address   :IN std_logic_vector (0 to 15); --
  34.     r_data_in       :IN std_logic_vector (0 to 63); --+
  35.     r_cs            :OUT    std_logic; --+
  36.     r_address_out       :OUT    std_logic_vector (0 to 15); --+
  37.     r_data_out      :OUT    std_logic_vector (0 to 63); --+
  38.     r_command       :OUT    std_logic_vector (0 to 1); --+ 01 read , 10 - write
  39.     r_output        :OUT    std_logic_vector (0 to 2)); --+
  40. end component;
  41.  
  42.  
  43.  
  44. component RAM is
  45. port (
  46.     r_reset             :in std_logic; --+
  47.     r_ready             :in std_logic; --+
  48.     clk             : in std_logic; --+
  49.     r_CPU_cs            : in std_logic; --+
  50.     r_CPU_data_in           : in std_logic_vector (0 to 63); --+
  51.     r_CPU_address           : in std_logic_vector (0 to 15); --+
  52.     r_DMA_cs            : in std_logic; --+
  53.     r_DMA_data_in           : in std_logic_vector (0 to 63); --+
  54.     r_DMA_command           : in std_logic_vector (0 to 1); --+
  55.     r_DMA_address           : in std_logic_vector (0 to 15);--+
  56.     r_DMA_data_out          : out std_logic_vector (0 to 63)); --+
  57. end component;
  58.  
  59.  
  60.  
  61.  
  62. component Tester is
  63. Port (
  64.     r_CPU_cs        :OUT    std_logic; --+
  65.     r_CPU_RAM_data_in   :OUT    std_logic_vector (0 to 63); --+
  66.     r_CPU_RAM_address   :OUT    std_logic_vector (0 to 15); --+
  67.     r_output        :IN std_logic_vector (0 to 2); --+
  68.     r_ready         :OUT    std_logic; -- 0 ничё не меняется
  69.     r_request       :OUT    std_logic; --+
  70.     clk         :OUT    std_logic; --+
  71.     r_address_DMA_in        :OUT    std_logic_vector (0 to 15); --+
  72.     r_reset         :OUT    std_logic); --+
  73. END component;
  74.  
  75. begin
  76. Inst_FSM_DMA_C : FSM_DMA_C PORT MAP (
  77.         clk             => clk_T_all,
  78.         r_ready         => r_ready_T_all,
  79.         r_towork_request    => r_towork_request_T_DMA,
  80.         r_reset         => r_reset_T_all,
  81.         r_command_address   => r_comand_address_T_DMA,
  82.         r_data_in       => r_data_RAM_DMA,
  83.         r_cs            => r_cs_DMA_RAM,
  84.         r_address_out       => r_address_DMA_RAM,
  85.         r_data_out      => r_data_DMA_RAM,
  86.         r_command       => r_command_DMA_RAM,
  87.         r_output        => r_output_DMA_Test
  88.         );
  89.  
  90. Inst_RAM : RAM PORT MAP (
  91.         clk             => clk_T_all,
  92.         r_reset         => r_reset_T_all,
  93.         r_ready         => r_ready_T_all,
  94.         r_CPU_cs        => r_cs_CPU_RAM,
  95.         r_CPU_data_in       => r_data_CPU_RAM,     
  96.         r_CPU_address       => r_address_CPU_RAM,
  97.         r_DMA_cs        => r_cs_DMA_RAM,
  98.         r_DMA_data_in       => r_data_DMA_RAM,
  99.         r_DMA_command       => r_command_DMA_RAM,
  100.         r_DMA_address       => r_address_DMA_RAM,
  101.         r_DMA_data_out      => r_data_RAM_DMA);
  102.  
  103. Inst_Tester : Tester PORT MAP (
  104.         r_CPU_cs        => r_cs_CPU_RAM,
  105.     r_CPU_RAM_data_in   => r_data_CPU_RAM,
  106.     r_CPU_RAM_address   => r_address_CPU_RAM,
  107.     r_output        => r_output_DMA_Test,
  108.     r_ready         => r_ready_T_all,
  109.     r_request       => r_towork_request_T_DMA,
  110.     clk         => clk_T_all,
  111.     r_address_DMA_in    => r_comand_address_T_DMA,
  112.     r_reset         => r_reset_T_all
  113. );
  114. end mashup;
  115.  
  116.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement