Advertisement
regzarr

reg_file_16x32

Nov 7th, 2019
470
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. module reg_file_16x32(
  2.   input [31:0] d,
  3.   input [3:0] s,
  4.   input we, clk, rst_b, clr,
  5.   output [511:0] blk
  6.   );
  7.  
  8.   wire [15:0]wires;
  9.   dec_4s decoder(.s(s), .we(we), .o(wires));
  10.  
  11.  
  12.  
  13.   generate
  14.     genvar i;
  15.     for(i = 0; i < 16; i = i + 1) begin: vect
  16.       rgst register(.d(d), .ld(wires[i]), .clk(clk), .rst_b(rst_b), .clr(clr),
  17.                     .q(blk[(i+1)*32 - 1 : i*32]));
  18.     end
  19.   endgenerate
  20.  
  21. endmodule
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement