Monday, September 11, 2017

VHDL Testbench using Oscilloscope Waveforms

I got a little tired of writing a generator for synthetic data in a VHDL testbench, so I thought, maybe just use an oscilloscope trace with real-workd data for this purpose.

So, here's the VHDL code, I've only captured one channel and it's stored as unsigned 8-bit characters, so everything is very easy.



signal aes3_in : std_logic;
signal aes3_analog : natural;
type t_stim_file is file of character;
data_in: process
   -- waveform captured on a rigol oscilloscope, 1ch, 8bit, 1GS/s
   file stim_file : t_stim_file open read_mode is "aes_48khz_24bit.wfm";
   variable v : character;
   variable n : natural range 0 to 255;
begin
   -- skip over the first 3300 bytes, header of the wfm file
   for i in 0 to 3300 loop
      read(stim_file, v);
   end loop;
   while not endfile(stim_file) loop
      read(stim_file, v);
      n := character'pos(v);
      aes3_analog <= n;
      aes3_in <= '1' when n > 90 else '0';
      wait for 1 ns; -- 1GHz sampling rate
   end loop;
   assert false report "end of test" severity failure; -- end testbench here
end process;



Monday, July 24, 2017

Mixing Station X Air Pro XR18 Default Layout

Working with a Behringer XR18 Mixer and using the brilliant Mixing Station Air software, I've made a custom layout for it. It can be downloaded from github.


Thursday, March 23, 2017

Roland TD-25 (Drum Sound Module) Pinout and Waveforms

Debugging an issue with a Roland TD-25K electronic drum set.

First, here are the outputs of the trigger-pads. Yellow is "tip" of a TRS connector, cyan is "ring". Both the bell and the dampening signals of the cymbals connect to the ring and there's a constant voltage offset (which you don't see because the 2nd (cyan) channel was AC coupled.

PDX-100 Snare Pad



CY-13R Ride Cymbal, "Cymbal" connector:



Ride Cymbal, "Bell" connector:



Also, I traced the pinout of the Roland TD-25 multipin/dsub connector.


                   /--+
                +-/   |
                |   O |  1 KIK-T
   T1-T      14 | O   |
                |   O |  2 KIK gnd
   T1-R      15 | O   |
                |   O |  3 SNR-T
   T1 gnd    16 | O   |
                |   O |  4 SNR-R
   T2-T      17 | O   |
                |   O |  5 SNR gnd
   T2-R      18 | O   |
                |   O |  6 HH+T2 gnd
   T3 gnd    19 | O   |
                |   O |  7 HH-T
   T3-T      20 | O   |
                |   O |  8 HH-R
   T3-R      21 | O   |
                |   O |  9 HHC gnd
  RD/RDB gnd 22 | O   |
                |   O | 10 HHC-T
  RD-R       23 | O   |
                |   O | 11 CR1 gnd
  RD-T       24 | O   |
                |   O | 12 CR1 T
  RDB-R      25 | O   |
                |   O | 13 CR1 R
                +-\   |
                   \-+

gnd: sleeve/ground, T: tip, R: ring
T1/T2/T3: Tom 1, 2, 3
RD: Ride
RDB: Ride Bell
HH: Hihat
HHC: Hihat pedal
KIK: Kick/Bassdrum
SNR: Snare
CR1: Crash Cymbal