Advertisement
tekkundahsi

Untitled

May 7th, 2019
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. module ram128x16(
  2. input [6:0] adrs,
  3. inout [15:0] data,
  4. input _ce, _we, _oe
  5.  
  6. );
  7. reg [3:0] _cee;
  8.  
  9. ram64x8 u1(adrs[5:0], data[15:8], _cee[0], _we, _oe);
  10. ram64x8 u2(adrs[5:0], data[7:0], _cee[0], _we, _oe);
  11. ram64x8 u3(adrs[5:0], data[15:8], _cee[1], _we, _oe);
  12. ram64x8 u4(adrs[5:0], data[7:0], _cee[1], _we, _oe);
  13. //1 - to - 2 decode
  14. always @ (*)
  15. begin
  16. if(_ce == 0)
  17. case(adrs[6:6])
  18. 0: _cee = 4'b1110;
  19. 1: _cee = 4'b0111;
  20. default: _cee = 4'hf;
  21. endcase
  22. else
  23. _cee = 4'hf;
  24. end
  25. endmodule
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement