-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtopmodule.sv
More file actions
70 lines (60 loc) · 1.01 KB
/
Copy pathtopmodule.sv
File metadata and controls
70 lines (60 loc) · 1.01 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
61
62
63
64
65
66
67
68
69
70
`timescale 1ns / 1ps
module TopModule #(parameter NX = 6, NH = 30, BITS = 16) (
input clk,
input START
);
wire TR, VL, SW, FIN, RST;
wire [BITS-1:0] TRAIN, VALID, EPOCH;
wire [BITS-1:0] Error;
wire [BITS-1:0] lr;
wire [NH-1:0][NX:0][BITS-1:0] W1;
wire [NH:0][BITS-1:0] W2;
wire [NX-1:0][BITS-1:0] x;
wire [BITS-1:0] y, out;
wire S_Train, S_Error;
Control #(.BITS(BITS)) ControlBlock(
.clk(clk),
.TRAIN(TRAIN),
.VALID(VALID),
.EPOCH(EPOCH),
.Error(Error),
.S_Train(S_Train),
.S_Error(S_Error),
.Start(START),
.TR(TR),
.VL(VL),
.SAVE(SW),
.END(FIN)
);
Pattern #(.NX(NX), .NH(NH), .BITS(BITS)) PatternBlock(
.clk(clk),
.TR(TR),
.VL(VL),
.SW(SW),
.START(START),
.END(FIN),
.W1(W1),
.W2(W2),
.lr(lr),
.x(x),
.y(y),
.TRAIN(TRAIN),
.VALID(VALID),
.EPOCH(EPOCH)
);
Architecture #(.NX(NX), .NH(NH), .BITS(BITS)) ArchBlock(
.clk(clk),
.TR(TR),
.VL(VL),
.END(FIN),
.x(x),
.lr(lr),
.y(y),
.yhat(out),
.Error(Error),
.S_Train(S_Train),
.S_Error(S_Error),
.WH(W1),
.WO(W2)
);
endmodule // TopModule