-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFetch.v
More file actions
60 lines (51 loc) · 1.17 KB
/
Fetch.v
File metadata and controls
60 lines (51 loc) · 1.17 KB
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
`timescale 1ns / 1ps
//////////////////////////////////////////////////////////////////////////////////
// Company:
// Engineer:
//
// Create Date: 05.02.2025 11:40:59
// Design Name:
// Module Name: Fetch
// Project Name:
// Target Devices:
// Tool Versions:
// Description:
//
// Dependencies:
//
// Revision:
// Revision 0.01 - File Created
// Additional Comments:
//
//////////////////////////////////////////////////////////////////////////////////
module Fetch(
input enable,
input Reset, Branch,
input [9:0] TargetAddress,
input [31:0] plus32,
output ready_fetch,
output [31:0] Instruction,
output [9:0] Add
);
wire ack_decode = enable;
wire [9:0] Address, Previous;
wire [31:0] I;
reg [9:0] JumpTo;
wire ready;
Prog_Count PC(
.clk(ack_decode),
.Reset(Reset),
.Jump(Branch),
.JumpTo(TargetAddress),
.Address(Address));
Prog_Mem IMEM(
.Reset(Reset),
.Address(Address),
.Instruction(I),
.plus32(plus32),
.ready(ready)
);
assign ready_fetch = ready;
assign Add = Address;
assign Instruction = I;
endmodule