Advertisement
MBJ

Execute

MBJ
Apr 22nd, 2019
1,299
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. `timescale 1ns/1ps
  2.  
  3. module Execute(
  4.                 input [31:0] A, B, PC_2,    // note: these are busses A and B, not actually a and b (PC_1 and IM)
  5.                 // A can be PC_1, B can be IM
  6.                 input [4:0] SH, FS,
  7.                 input clk, rst, MW, // all for data block
  8.                 // IO
  9.                 output [31:0] F, Data_out, BrA, RAA,    // RAA = A
  10.                 output VxorN, Z, C, N, V    // VxorN to reg, Z to top phase comb. ckt.
  11.                 );
  12. // note: clocked (resettable too) reg's all in TOP MODULE
  13.  
  14. // Module instantiations
  15. Adder A0(
  16.         .B(B), .PC_2(PC_2),
  17.         // IO
  18.         .BrA(BrA)
  19.         );
  20.  
  21. ALU  A1(
  22.         .A(A), .B(B),
  23.         .SH(SH), .FS(FS),
  24.         // IO
  25.         .Z(Z), .F(F), .V(V),
  26.         .C(C), .N(N)
  27.         );
  28.  
  29. Data_block D0(  //.instantiated(ThisModule)
  30.                 .Address(A), .Data_in(B),
  31.                 .clk(clk), .rst(rst), .MW(MW),
  32.                 // IO
  33.                 .Data_out(Data_out)
  34.                 );
  35.  
  36. assign VxorN = V^N;     // one of the reg blocks for layer 4
  37. assign RAA = A;
  38.  
  39.  
  40. endmodule
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement