OpenCores
URL https://opencores.org/ocsvn/sqmusic/sqmusic/trunk

Subversion Repositories sqmusic

[/] [sqmusic/] [trunk/] [sqm/] [sqm_pwm_1_tb.v] - Blame information for rev 4

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 4 gryzor
/*
2
        SQmusic
3
        logarithmic PWM controller to use with SQMUSIC
4
  Version 0.1, tested on simulation only with Capcom's 1942
5
 
6
  (c) Jose Tejada Gomez, 11th May 2013
7
  You can use this file following the GNU GENERAL PUBLIC LICENSE version 3
8
  Read the details of the license in:
9
  http://www.gnu.org/licenses/gpl.txt
10
 
11
  Send comments to: jose.tejada@ieee.org
12
 
13
*/
14
 
15
// Compile with: 
16
// iverilog sqm_pwm_1_tb.v sqm_pwm.v -s sqm_pwm_1_tb -o sqm_pwm_1_tb
17
 
18
`timescale 1ns/1ps
19
module sqm_pwm_1_tb;
20
 
21
reg clk;
22
always begin
23
  clk=0;
24
  #10 clk <= ~clk;
25
end
26
 
27
reg [3:0]A;
28
always begin
29
  A=0;
30
  #5000 A <= A+1;
31
end
32
 
33
reg reset_n;
34
initial begin
35
  $dumpvars();
36
  $dumpon;
37
  reset_n=0;
38
  #15 reset_n=1;
39
  #80000 $finish;
40
end
41
 
42
SQM_PWM_1 apwm( .clk(clk), .reset_n(reset_n), .din(A), .pwm(y_a) );
43
 
44
endmodule

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.