Advertisement
regzarr

reg_file

Oct 31st, 2019
449
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. module red_file_4x8 (
  2.   input [7:0]wr_data,
  3.         [1:0]wr_addr,
  4.         wr_e,
  5.         [1,0]rd_addr,
  6.   output [7:0]rd_data);
  7.  
  8.   wire [3:0]w;
  9.  
  10.   decoder dec (.e(we_e), .s(wr_addr), w[0], w[1], w[2], w[3]);
  11.  
  12.   reg1 # (.w(2)
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.   module rgst # (
  22.   parameter w = 8,
  23.   parameter iv = { w { 1'b0} } )
  24.   ( input [w-1 : 0] d,
  25.     input clk, rst_b, clr, ld,
  26.     output reg [w-1 : 0] q );
  27.  
  28. endmodule
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement