Advertisement
MBJ

Top Phase

MBJ
Apr 22nd, 2019
1,335
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. `timescale 1ns/1ps
  2.  
  3. module Top_phase(
  4.                 input [1:0] BS,
  5.                 input PS, Z,
  6.                 input [31:0] PC_1, BrA, RAA,
  7.                 output [31:0] PC    // to top top verilog, PC register driven by this output
  8.                 );
  9.  
  10. // below is combinational circuit for the MUX_C
  11. wire top_gate_right, top_gate_middle, top_gate_left;
  12. // look at page 10-34 and look at the top phase for this
  13. assign top_gate_right = Z^PS;
  14. assign top_gate_middle = (BS[1])|top_gate_right;
  15. assign top_gate_left = (BS[0])&top_gate_middle;
  16.  
  17. // remember, 'MC' is actually BS[1] and the wire driven from top_gate_left
  18. wire [1:0] MC;
  19.  
  20. assign MC[1] = BS[1];
  21. assign MC[0] = top_gate_left;
  22.  
  23. MUX_C M0    (
  24.             .BrA(BrA), .PC_1(PC_1),
  25.             .RAA(RAA), .MC(MC),
  26.             .PC(PC) // output reg
  27.             );
  28.  
  29. endmodule
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement