Advertisement
Guest User

Untitled

a guest
Jul 29th, 2014
184
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.02 KB | None | 0 0
  1. type avg_log is array (0 to 31) of std_Logic_vector(19 downto 0);
  2. signal V1 :avg_log :=(others=>others=>'0');
  3.  
  4. library ieee;
  5. use ieee.std_logic_1164.all;
  6.  
  7. package p_avg is
  8. type avg_log is array (0 to 31) of std_Logic_vector(19 downto 0);
  9. end package p_avg;
  10.  
  11. use work.p_avg.all;
  12. entity my_e is
  13. port(
  14. ...
  15. V1 : out avg_log := (others => (others => '0'));
  16. ...
  17. );
  18. end entity;
  19.  
  20. library ieee;
  21. use ieee.std_logic_1164.all;
  22.  
  23. package p_avg is
  24. type avg_log is array (0 to 31) of std_logic_vector(19 downto 0);
  25. end package p_avg;
  26.  
  27.  
  28.  
  29. library ieee;
  30. use ieee.std_logic_1164.all;
  31. library work;
  32. use work.p_avg.all;
  33.  
  34. entity my_e is
  35. port(
  36. v1_o : out avg_log);
  37. end entity;
  38.  
  39. architecture sim of my_e is
  40. begin
  41. v1_o <= (others => (others => '0'));
  42. end architecture;
  43.  
  44.  
  45.  
  46. library ieee;
  47. use ieee.std_logic_1164.all;
  48. library work;
  49. use work.p_avg.all;
  50.  
  51. entity tb is
  52. end entity;
  53.  
  54. architecture sim of tb is
  55. signal v1 : avg_log;
  56. begin
  57.  
  58. my_e_1 : entity work.my_e
  59. port map(
  60. v1_o => v1);
  61.  
  62. end architecture;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement