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

Subversion Repositories psg16

[/] [psg16/] [trunk/] [rtl/] [verilog/] [PSGShaper.v] - Blame information for rev 5

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 robfinch
`timescale 1ns / 1ps
2
// ============================================================================
3
//      (C) 2007,2012  Robert Finch
4
//      All rights reserved.
5
//      robfinch<remove>@opencores.org
6
//
7
//      PSGShaper.v 
8
//              Shape the channels by applying the envelope to the tone generator
9
//      output.
10
//
11
//
12
// This source file is free software: you can redistribute it and/or modify 
13
// it under the terms of the GNU Lesser General Public License as published 
14
// by the Free Software Foundation, either version 3 of the License, or     
15
// (at your option) any later version.                                      
16
//                                                                          
17
// This source file is distributed in the hope that it will be useful,      
18
// but WITHOUT ANY WARRANTY; without even the implied warranty of           
19
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            
20
// GNU General Public License for more details.                             
21
//                                                                          
22
// You should have received a copy of the GNU General Public License        
23
// along with this program.  If not, see <http://www.gnu.org/licenses/>.    
24
//
25
//      
26
//============================================================================ */
27
 
28
module PSGShaper(clk_i, ce, tgi, env, o);
29
input clk_i;            // clock
30
input ce;                       // clock enable
31
input [11:0] tgi;        // tone generator input
32
input [7:0] env; // envelop generator input
33
output [19:0] o; // shaped output
34
reg [19:0] o;            // shaped output
35
 
36
// shape output according to envelope
37
always @(posedge clk_i)
38
        if (ce)
39
                o <= tgi * env;
40
 
41
endmodule

powered by: WebSVN 2.1.0

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