Update SPI clock frequency in testbench and enhance comments in effect selector for clarity on joystick mode switching
This commit is contained in:
@@ -30,7 +30,7 @@ ARCHITECTURE sim OF tb_digilent_jstk2 IS
|
||||
-- Testbench constants
|
||||
CONSTANT CLKFREQ : INTEGER := 100_000_000;
|
||||
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";
|
||||
|
||||
-- Component declaration for digilent_jstk2
|
||||
|
||||
@@ -50,17 +50,19 @@ BEGIN
|
||||
balance <= jstck_x;
|
||||
|
||||
-- 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
|
||||
-- LFO Mode: Y-axis controls Low Frequency Oscillator period
|
||||
-- Used for tremolo, vibrato, or other modulation effects
|
||||
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
|
||||
-- Volume/Balance Mode: Y-axis controls overall volume level
|
||||
-- Traditional audio mixer control mode
|
||||
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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user