-
Notifications
You must be signed in to change notification settings - Fork 0
/
pwm_generator.v.bak
38 lines (28 loc) · 1019 Bytes
/
pwm_generator.v.bak
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
// AstroTinker Bot : Task 1A : PWM Generator
/*
Instructions
-------------------
Students are not allowed to make any changes in the Module declaration.
This file is used to design a module which will scale down the 3.125MHz Clock Frequency to 195.125KHz and perform Pulse Width Modulation on it.
Recommended Quartus Version : 20.1
The submitted project file must be 20.1 compatible as the evaluation will be done on Quartus Prime Lite 20.1.
Warning: The error due to compatibility will not be entertained.
-------------------
*/
//PWM Generator
//Inputs : clk_3125KHz, duty_cycle
//Output : clk_195KHz, pwm_signal
module pwm_generator(
input clk_3125KHz,
input [3:0] duty_cycle,
output reg clk_195KHz, pwm_signal
);
initial begin
clk_195KHz = 0; pwm_signal = 1;
end
//////////////////DO NOT MAKE ANY CHANGES ABOVE THIS LINE//////////////////
/*
Add your logic here
*/
//////////////////DO NOT MAKE ANY CHANGES BELOW THIS LINE//////////////////
endmodule