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

Subversion Repositories sqmusic

[/] [sqmusic/] [trunk/] [ver/] [sq_opn_basic.v] - Diff between revs 19 and 20

Go to most recent revision | Only display areas with differences | Details | Blame | View Log

Rev 19 Rev 20
/*
/*
        SQmusic
        SQmusic
 
 
  (c) Jose Tejada Gomez, 9th May 2013
  (c) Jose Tejada Gomez, 9th May 2013
  You can use this file following the GNU GENERAL PUBLIC LICENSE version 3
  You can use this file following the GNU GENERAL PUBLIC LICENSE version 3
  Read the details of the license in:
  Read the details of the license in:
  http://www.gnu.org/licenses/gpl.txt
  http://www.gnu.org/licenses/gpl.txt
 
 
  Send comments to: jose.tejada@ieee.org
  Send comments to: jose.tejada@ieee.org
 
 
*/
*/
 
 
`timescale 1ns/1ps
`timescale 1ns/1ps
 
 
module sq_opn_basic;
module sq_opn_basic;
 
 
reg clk, reset_n;
reg clk, reset_n;
wire signed [12:0] linear;
reg [6:0] gain;
 
wire signed [13:0] linear;
 
 
parameter fnumber = 11'h1;
parameter fnumber = 11'h40E;
parameter block   =  3'h0;
parameter block   =  3'h4;
parameter multiple=  4'h1;
parameter multiple=  4'h1;
 
 
initial begin
initial begin
  $dumpvars(0,sq_opn_basic);
  $dumpvars(0,sq_opn_basic);
  $dumpon;
  $dumpon;
  reset_n = 0;
  reset_n = 0;
 
  gain = 7'd0;
  #300 reset_n=1;
  #300 reset_n=1;
  $display("SOUND START");
  $display("SOUND START");
  #(1e10)
  #0.01e9
 
  forever #0.01e9 begin
 
    if( gain == 7'h7F )
  $finish;
  $finish;
 
    else
 
      gain <= gain + 1;
 
//    if( $realtime > 64*0.01e9 ) $finish;
 
  end
 
//  $finish;
end
end
 
 
always begin
always begin
  clk = 0;
  clk = 0;
  forever #(125/2*144) clk = ~clk & reset_n;
  forever #(125/2) clk = ~clk & reset_n;
end
end
 
 
sq_slot slot(
sq_slot slot(
        .clk     (clk),
        .clk     (clk),
        .reset_n (reset_n),
        .reset_n (reset_n),
        .fnumber (fnumber),
        .fnumber (fnumber),
        .block   (block),
        .block   (block),
  .multiple(multiple),
  .multiple(multiple),
 
  .totallvl(gain),
  .linear  (linear)
  .linear  (linear)
);
);
 
 
// always #(1e9/44100) $display("%d", linear);
//always #(1e9/44100) $display("%d", linear);
 
 
 
 
endmodule
endmodule
 
 

powered by: WebSVN 2.1.0

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