Lab 3: Audio Processing System #3

Merged
PickleRick merged 43 commits from LAB3 into main 2025-06-07 22:18:48 +02:00
2 changed files with 5 additions and 3 deletions
Showing only changes of commit 1604a7afbc - Show all commits

View File

@@ -30,7 +30,7 @@ ARCHITECTURE sim OF tb_digilent_jstk2 IS
-- Testbench constants -- Testbench constants
CONSTANT CLKFREQ : INTEGER := 100_000_000; CONSTANT CLKFREQ : INTEGER := 100_000_000;
CONSTANT DELAY_US : INTEGER := 25; CONSTANT DELAY_US : INTEGER := 25;
CONSTANT SPI_SCLKFREQ : INTEGER := 66_666; CONSTANT SPI_SCLKFREQ : INTEGER := 5_000;
CONSTANT CMDSETLEDRGB : STD_LOGIC_VECTOR(7 DOWNTO 0) := x"84"; CONSTANT CMDSETLEDRGB : STD_LOGIC_VECTOR(7 DOWNTO 0) := x"84";
-- Component declaration for digilent_jstk2 -- Component declaration for digilent_jstk2

View File

@@ -50,17 +50,19 @@ BEGIN
balance <= jstck_x; balance <= jstck_x;
-- Y-axis control depends on selected effect mode -- Y-axis control depends on selected effect mode
-- Note: When switching between modes, the previous joystick values
-- are preserved in the non-active outputs (volume/lfo_period)
IF effect = '1' THEN IF effect = '1' THEN
-- LFO Mode: Y-axis controls Low Frequency Oscillator period -- LFO Mode: Y-axis controls Low Frequency Oscillator period
-- Used for tremolo, vibrato, or other modulation effects -- Used for tremolo, vibrato, or other modulation effects
lfo_period <= jstck_y; lfo_period <= jstck_y;
-- Volume remains at last set value (not updated in LFO mode) -- Volume remains at last set value (preserved from previous volume mode)
ELSE ELSE
-- Volume/Balance Mode: Y-axis controls overall volume level -- Volume/Balance Mode: Y-axis controls overall volume level
-- Traditional audio mixer control mode -- Traditional audio mixer control mode
volume <= jstck_y; volume <= jstck_y;
-- LFO period remains at last set value (not updated in volume mode) -- LFO period remains at last set value (preserved from previous LFO mode)
END IF; END IF;