Advertisement
MBJ

Write back

MBJ
Apr 22nd, 2019
1,306
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. `timescale 1ns/1ps
  2.  
  3. module Write_back(
  4.                  input [31:0] F, Data_out,
  5.                  input VxorN,   // gonna be 0 padded (for SLT set less than)
  6.                  input [1:0] MD,    // 11 unused?.?
  7.                  input RW,
  8.                  input [4:0] DA,    // destination address
  9.                  // IO --> NO OUTPUTS!!!
  10.                  output [31:0] Bus_D    // reg file in top verilog module!!, so no clock or reset
  11.                  ); // remember, RW, DA, MD comes from current registered versions --> Two negedge sets
  12.                 // ie MD_1, RW_1, DA_1 into these bad boys
  13.  
  14. wire [31:0] status = 0; // 0 padded VxorN
  15.  
  16. assign status = {31'd0,VxorN};  // defaults to LSB, 0 padding
  17.  
  18. MUX_D MD0(
  19.             .MD(MD), .F(F),
  20.             .Data_out(Data_out),
  21.             .status(status),
  22.             // IO
  23.             .Bus_D(Bus_D)
  24.             );
  25.  
  26. // This will output to top module to input into register file
  27.  
  28. endmodule
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement