Skip to content

The board for my digital signal processing lab course this term is Analog Devices' ADSP-SC589 EZ-Board: one ARM core and two SHARC DSP cores, with an ADC and a DAC on the board. Almost every assignment has the same shape: audio comes in through the ADC, gets processed on a SHARC core, and goes back out through the DAC.

The code is at github.com/soundadam/sc589-audio. The board setup and audio path are adapted from ADI’s examples and carry ADI’s copyright notice, so they can’t be published; the repository holds only the parts I wrote.

No toolchain for the Mac

ADI’s development environment, CrossCore Embedded Studio (CCES), ships for Windows and x86 Linux only, and the debugger drivers have no macOS version either. I only have a Mac with me, not a Windows laptop, so the workflow is split in two:

  • Compiling happens on Windows. A Windows machine with CCES installed does nothing but build. A script on the Mac sends it the current code, builds from the command line, and fetches the resulting boot file (.ldr).
  • Running happens on the Mac. The board has a USB serial port, which goes to the Mac. With the board set to boot from UART, the Mac sends the .ldr over the serial port following the chip’s Boot ROM protocol, and once the program runs, its output comes back over the same port.

Editing, loading and checking results all happen on the Mac, with no debugger. The cost is no single-stepping; for that I still have to go to the Windows side.

The filters are plain C with no board dependency, so they build and test on the Mac too. Coefficient design, plots and the reports use Python and LaTeX.

First lab: FIR versus IIR

The first assignment is two low-pass filters with a 2 kHz cut-off on the board, a 31st-order FIR and an 8th-order IIR, comparing impulse response, magnitude, phase, group delay and computational cost. Both filters run side by side on a stereo pair; at boot the board prints their impulse responses and cycle counts to the serial port, and the figures and numbers in the report are generated from that output.

The results are the textbook ones:

  • The FIR’s coefficients are symmetric, so its phase is linear: every frequency is delayed by 15.5 samples and waveforms keep their shape.
  • The 8th-order IIR has a much steeper transition band and fewer multiplies per sample, but its phase is not linear, and the delay peaks near the cut-off.
  • Which one to use depends on whether waveform shape or selectivity and cost matters more.

The report source is in coursework/E01-fir-iir/ in the repository.

If you also work on a Mac and have to touch an ADI SHARC board, the UART boot script (host/board/uart_boot.py) may be usable as is. Why I went this way and what else I tried is in the repository’s ADR 0001 (in Chinese).