-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwengine.v
78 lines (63 loc) · 1.64 KB
/
wengine.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
68
69
70
71
72
73
74
75
76
77
`timescale 1ns / 1ps
module wengine( clk,
reset,
msgIn,
feed,
next,
w0,
w1,
w2,
w3
);
input clk;
input reset;
input [511:0] msgIn;
input [3:0] feed;
input [3:0] next;
output [31:0] w0;
output [31:0] w1;
output [31:0] w2;
output [31:0] w3;
wire [543:0] w0tow1;
wire [543:0] w1tow2;
wire [543:0] w2tow3;
wire stage0;
wengine0 weng0( .clk(clk),
.reset(reset),
.din(msgIn),
.dout(w0tow1),
.stage(stage0),
.feed(feed[0]),
.next(next[0]),
.wout(w0)
);
wengine1 weng1( .clk(clk),
.reset(reset),
.din(w0tow1),
.dout(w1tow2),
.feed(feed[1]),
.next(next[1]),
.wout(w1)
);
wengine1 weng2( .clk(clk),
.reset(reset),
.din(w1tow2),
.dout(w2tow3),
.feed(feed[2]),
.next(next[2]),
.wout(w2)
);
wengine2 weng3( .clk(clk),
.reset(reset),
.din(w2tow3),
.feed(feed[3]),
.next(next[3]),
.wout(w3)
);
shifter cnt_stage0( .clk(clk),
.reset(reset),
.load(feed[0]),
.val(20'b11111000000000000000),
.out(stage0)
);
endmodule