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

Subversion Repositories rtf68ksys

[/] [rtf68ksys/] [trunk/] [rtl/] [verilog/] [PSGShaper.v] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 robfinch
/* ============================================================================
2
        (C) 2007  Robert Finch
3
        All rights reserved.
4
        rob@birdcomputer.ca
5
 
6
        bcPSGShaper.v
7
                Shape the channels by applying the envelope to the tone generator
8
        output.
9
 
10
 
11
    This source code is available for evaluation and validation purposes
12
    only. This copyright statement and disclaimer must remain present in
13
    the file.
14
 
15
 
16
        NO WARRANTY.
17
    THIS Work, IS PROVIDEDED "AS IS" WITH NO WARRANTIES OF ANY KIND, WHETHER
18
    EXPRESS OR IMPLIED. The user must assume the entire risk of using the
19
    Work.
20
 
21
    IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY
22
    INCIDENTAL, CONSEQUENTIAL, OR PUNITIVE DAMAGES WHATSOEVER RELATING TO
23
    THE USE OF THIS WORK, OR YOUR RELATIONSHIP WITH THE AUTHOR.
24
 
25
    IN ADDITION, IN NO EVENT DOES THE AUTHOR AUTHORIZE YOU TO USE THE WORK
26
    IN APPLICATIONS OR SYSTEMS WHERE THE WORK'S FAILURE TO PERFORM CAN
27
    REASONABLY BE EXPECTED TO RESULT IN A SIGNIFICANT PHYSICAL INJURY, OR IN
28
    LOSS OF LIFE. ANY SUCH USE BY YOU IS ENTIRELY AT YOUR OWN RISK, AND YOU
29
    AGREE TO HOLD THE AUTHOR AND CONTRIBUTORS HARMLESS FROM ANY CLAIMS OR
30
    LOSSES RELATING TO SUCH UNAUTHORIZED USE.
31
 
32
============================================================================ */
33
 
34
module PSGShaper(clk_i, ce, tgi, env, o);
35
input clk_i;            // clock
36
input ce;                       // clock enable
37
input [11:0] tgi;        // tone generator input
38
input [7:0] env; // envelop generator input
39
output [19:0] o; // shaped output
40
reg [19:0] o;            // shaped output
41
 
42
// shape output according to envelope
43
always @(posedge clk_i)
44
        if (ce)
45
                o <= tgi * env;
46
 
47
endmodule

powered by: WebSVN 2.1.0

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