-
Notifications
You must be signed in to change notification settings - Fork 0
/
pipeline_register.v
67 lines (65 loc) · 1.46 KB
/
pipeline_register.v
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
`timescale 1ns / 1ps
//////////////////////////////////////////////////////////////////////////////////
// Company:
// Engineer:
//
// Create Date: 22:59:13 04/19/2019
// Design Name:
// Module Name: pipeline_register
// Project Name:
// Target Devices:
// Tool versions:
// Description:
//
// Dependencies:
//
// Revision:
// Revision 0.01 - File Created
// Additional Comments:
//
//////////////////////////////////////////////////////////////////////////////////
module pipeline_register(
input clk,
input reset,
input [1:0] opcode,
input [2:0] rDest,
input [2:0] rSrc,
input [2:0] immediate_data,
input [7:0] jump_address,
input signed [7:0] data,
output reg [1:0] opc,
output reg [2:0] reg_src,
output reg [2:0] reg_dest,
output reg [2:0] im_da,
output reg [7:0] pja,
output reg signed [7:0] reg_data
);
// always @ (reset)
// begin
// if (reset == 1)
// begin
// opc = 2'bxx;
// reg_src = 3'b111;
// reg_dest = 3'b111;
// im_da = 1;
// pja = 1;
// reg_data = 1;
// end
// end
//
always @ (posedge clk)
begin
// $write("Opcode %b: ", opcode);
// $write("rSRc %b: ", rSrc);
// $write("rDest %b: ", rDest);
// $write("id %b: ", immediate_data);
// $write("ja %b: ", jump_address);
// $write("data %b: ", data);
opc = opcode;
reg_src = rSrc;
reg_dest = rDest;
im_da = immediate_data;
pja = jump_address;
reg_data = data;
end
endmodule