-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathvolumizer.t.v
55 lines (42 loc) · 883 Bytes
/
volumizer.t.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
`include "volumizer.v"
module test_volumizer();
reg clk;
reg envelope_add;
reg trigger;
reg[2:0] period;
reg[3:0] starting_volume;
wire[3:0] volume;
volumizer test_vol (.clk_64(clk),
.envelope_add(envelope_add),
.trigger(trigger),
.period(period),
.starting_volume(starting_volume),
.volume(volume)
);
initial
clk <= 0;
always
#4 clk <= ~clk;
initial begin
$dumpfile("volumizer.vcd");
$dumpvars();
envelope_add <= 1'b0;
trigger <= 1'b0;
period <= 3'b001;
starting_volume <= 4'hf;
#8;
trigger <= 1'b1;
#8;
trigger <= 1'b0;
#200
envelope_add <= 1'b1;
starting_volume <= 4'h8;
period <= 3'b011;
#8
trigger <= 1'b1;
#8;
trigger <= 1'b0;
#500
$finish();
end
endmodule