Advertisement
Guest User

sram1x4

a guest
Dec 10th, 2016
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.11 KB | None | 0 0
  1. library ieee;
  2. use ieee.std_logic_1164.all;
  3.  
  4. entity Sram1b4 is
  5. port(data : in std_logic_vector(3 downto 0);
  6. we, cs, oe, chipSel: in std_logic;
  7. qout : out std_logic_vector(3 downto 0));
  8. end Sram1b4;
  9.  
  10. architecture arch of Sram1b4 is
  11.  
  12. component SRAMCell
  13. port( inp, sel, WEna: in std_logic;
  14. qout: out std_logic);
  15. end component;
  16.  
  17. component tlb
  18. port(a_in, b_in : in std_logic;
  19. a_out : out std_logic);
  20. end component;
  21.  
  22. signal wecs, csoe: std_logic;
  23. signal beforeout : std_logic_vector(3 downto 0);
  24.  
  25. begin
  26.  
  27. wecs <= we and cs;
  28. csoe <= cs and oe;
  29.  
  30. Sram1: SraMCell
  31. port map (data(3), chipSel, wecs, beforeout(3));
  32. Sram2: SraMCell
  33. port map (data(2), chipSel, wecs, beforeout(2));
  34. Sram3: SraMCell
  35. port map (data(1), chipSel, wecs, beforeout(1));
  36. Sram4: SramCell
  37. port map (data(0), chipSel, wecs, beforeout(0));
  38. dataout3: tlb
  39. port map (beforeout(3), csoe, qout(3));
  40. dataout2: tlb
  41. port map (beforeout(2), csoe, qout(2));
  42. dataout1: tlb
  43. port map (beforeout(1), csoe, qout(1));
  44. dataout0: tlb
  45. port map (beforeout(0), csoe, qout(0));
  46. end arch;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement