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

Subversion Repositories psg16

[/] [psg16/] [trunk/] [rtl/] [verilog/] [PSGToneGenerator.v] - Diff between revs 4 and 5

Show entire file | Details | Blame | View Log

Rev 4 Rev 5
Line 27... Line 27...
input rst;
input rst;
input clk;
input clk;
input ack;              // wave table input acknowledge
input ack;              // wave table input acknowledge
input [11:0] wave;      // wave table data input
input [11:0] wave;      // wave table data input
input test;
input test;
input [4:0] vt;         // voice type
input [5:0] vt;         // voice type
input [23:0] freq;
input [23:0] freq;
input [23:0] pw;        // pulse width
input [23:0] pw;        // pulse width
input sync;
input sync;
input ringmod;
input ringmod;
input  [31:0] prev_acc;  // from previous voice
input  [31:0] prev_acc;  // from previous voice
Line 76... Line 76...
always @(acc or msb)
always @(acc or msb)
        outputT <= msb ? ~acc[26:15] : acc[26:15];
        outputT <= msb ? ~acc[26:15] : acc[26:15];
 
 
// Other waveforms, ho-hum
// Other waveforms, ho-hum
wire [11:0] outputP = {12{acc[27:16] < pw}};
wire [11:0] outputP = {12{acc[27:16] < pw}};
wire [11:0] outputS = acc[27:16];
wire [11:0] outputS = vt[5] ? ~acc[27:16] : acc[27:16];
wire [11:0] outputN = lfsr[11:0];
wire [11:0] outputN = lfsr[11:0];
 
 
wire [11:0] out;
wire [11:0] out;
PSGNoteOutMux #(12) u4 (.s(vt), .a(outputT), .b(outputS), .c(outputP), .d(outputN), .e(outputW), .o(out) );
PSGNoteOutMux #(12) u4 (.s(vt), .a(outputT), .b(outputS), .c(outputP), .d(outputN), .e(outputW), .o(out) );
assign o = out;
assign o = out;

powered by: WebSVN 2.1.0

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