Add a three-voice sound chip for the PmodAMP2 on JA
Ports 90h-9Dh: three square-wave voices and a noise source, a mixer, 16 log volumes with attack/decay envelopes, summed and played through a sigma-delta output on JA[0]. CLS and reset hush it. Includes a testbench (scripts/sim-sound.sh), a BASIC example and manual section. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
b629cbec00
commit
2d1be15786
11 files changed
+428
-3
No files matched your search
@@ -53,7 +53,8 @@ module basys3_terminal #(
|
||||
input PS2Clk,
|
||||
input PS2Data,
|
||||
output QspiCSn,
|
||||
inout [3:0] QspiDB
|
||||
inout [3:0] QspiDB,
|
||||
output [3:0] JA // PmodAMP2: audio in, gain, -, shutdown (low)
|
||||
);
|
||||
localparam [7:0] XON = 8'h11, XOFF = 8'h13;
|
||||
|
||||
@@ -349,9 +350,14 @@ module basys3_terminal #(
|
||||
.scroll_x(scroll_x), .scroll_y(scroll_y), .g_border(g_border),
|
||||
.sp_go(sp_go), .sp_line(sp_line), .sp_buf(sp_buf), .sp_x(sp_x), .sp_on(sp_on),
|
||||
.sp_pix(sp_pix), .sp_ftick(pix_frame), .keys(keys_down),
|
||||
.fl_cs_n(QspiCSn), .fl_sck(fl_sck), .fl_mosi(QspiDB[0]), .fl_miso(QspiDB[1])
|
||||
.fl_cs_n(QspiCSn), .fl_sck(fl_sck), .fl_mosi(QspiDB[0]), .fl_miso(QspiDB[1]),
|
||||
.audio(JA[0])
|
||||
);
|
||||
|
||||
// PmodAMP2 on JA's top row: gain high is 6 dB (low would be 12 dB), and
|
||||
// the amplifier is on unless its shutdown pin is low.
|
||||
assign JA[3:1] = 3'b101;
|
||||
|
||||
// The flash clock is the configuration clock pin, reached through STARTUPE2.
|
||||
// DQ2/DQ3 (write protect, hold) stay high.
|
||||
assign QspiDB[1] = 1'bz;
|
||||
|
||||
Reference in new issue
Block a user