Loop_VConvH_proc_linebuf_0.vhd 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. -- ==============================================================
  2. -- File generated on Wed Jun 26 16:53:30 CEST 2019
  3. -- Vivado(TM) HLS - High-Level Synthesis from C, C++ and SystemC v2018.3 (64-bit)
  4. -- SW Build 2405991 on Thu Dec 6 23:36:41 MST 2018
  5. -- IP Build 2404404 on Fri Dec 7 01:43:56 MST 2018
  6. -- Copyright 1986-2018 Xilinx, Inc. All Rights Reserved.
  7. -- ==============================================================
  8. --
  9. library ieee;
  10. use ieee.std_logic_1164.all;
  11. use ieee.std_logic_unsigned.all;
  12. entity Loop_VConvH_proc_linebuf_0_ram is
  13. generic(
  14. MEM_TYPE : string := "block";
  15. DWIDTH : integer := 32;
  16. AWIDTH : integer := 10;
  17. MEM_SIZE : integer := 672
  18. );
  19. port (
  20. addr0 : in std_logic_vector(AWIDTH-1 downto 0);
  21. ce0 : in std_logic;
  22. q0 : out std_logic_vector(DWIDTH-1 downto 0);
  23. addr1 : in std_logic_vector(AWIDTH-1 downto 0);
  24. ce1 : in std_logic;
  25. d1 : in std_logic_vector(DWIDTH-1 downto 0);
  26. we1 : in std_logic;
  27. clk : in std_logic
  28. );
  29. end entity;
  30. architecture rtl of Loop_VConvH_proc_linebuf_0_ram is
  31. signal addr0_tmp : std_logic_vector(AWIDTH-1 downto 0);
  32. type mem_array is array (0 to MEM_SIZE-1) of std_logic_vector (DWIDTH-1 downto 0);
  33. shared variable ram : mem_array := (others=>(others=>'0'));
  34. attribute syn_ramstyle : string;
  35. attribute syn_ramstyle of ram : variable is "block_ram";
  36. attribute ram_style : string;
  37. attribute ram_style of ram : variable is MEM_TYPE;
  38. begin
  39. memory_access_guard_0: process (addr0)
  40. begin
  41. addr0_tmp <= addr0;
  42. --synthesis translate_off
  43. if (CONV_INTEGER(addr0) > mem_size-1) then
  44. addr0_tmp <= (others => '0');
  45. else
  46. addr0_tmp <= addr0;
  47. end if;
  48. --synthesis translate_on
  49. end process;
  50. p_memory_access_0: process (clk)
  51. begin
  52. if (clk'event and clk = '1') then
  53. if (ce0 = '1') then
  54. q0 <= ram(CONV_INTEGER(addr0_tmp));
  55. end if;
  56. end if;
  57. end process;
  58. p_memory_access_1: process (clk)
  59. begin
  60. if (clk'event and clk = '1') then
  61. if (ce1 = '1') then
  62. if (we1 = '1') then
  63. ram(CONV_INTEGER(addr1)) := d1;
  64. end if;
  65. end if;
  66. end if;
  67. end process;
  68. end rtl;
  69. Library IEEE;
  70. use IEEE.std_logic_1164.all;
  71. entity Loop_VConvH_proc_linebuf_0 is
  72. generic (
  73. DataWidth : INTEGER := 32;
  74. AddressRange : INTEGER := 672;
  75. AddressWidth : INTEGER := 10);
  76. port (
  77. reset : IN STD_LOGIC;
  78. clk : IN STD_LOGIC;
  79. address0 : IN STD_LOGIC_VECTOR(AddressWidth - 1 DOWNTO 0);
  80. ce0 : IN STD_LOGIC;
  81. q0 : OUT STD_LOGIC_VECTOR(DataWidth - 1 DOWNTO 0);
  82. address1 : IN STD_LOGIC_VECTOR(AddressWidth - 1 DOWNTO 0);
  83. ce1 : IN STD_LOGIC;
  84. we1 : IN STD_LOGIC;
  85. d1 : IN STD_LOGIC_VECTOR(DataWidth - 1 DOWNTO 0));
  86. end entity;
  87. architecture arch of Loop_VConvH_proc_linebuf_0 is
  88. component Loop_VConvH_proc_linebuf_0_ram is
  89. port (
  90. clk : IN STD_LOGIC;
  91. addr0 : IN STD_LOGIC_VECTOR;
  92. ce0 : IN STD_LOGIC;
  93. q0 : OUT STD_LOGIC_VECTOR;
  94. addr1 : IN STD_LOGIC_VECTOR;
  95. ce1 : IN STD_LOGIC;
  96. we1 : IN STD_LOGIC;
  97. d1 : IN STD_LOGIC_VECTOR);
  98. end component;
  99. begin
  100. Loop_VConvH_proc_linebuf_0_ram_U : component Loop_VConvH_proc_linebuf_0_ram
  101. port map (
  102. clk => clk,
  103. addr0 => address0,
  104. ce0 => ce0,
  105. q0 => q0,
  106. addr1 => address1,
  107. ce1 => ce1,
  108. we1 => we1,
  109. d1 => d1);
  110. end architecture;