i2s: Add functionality for a loopback sanity test

This simply makes the peripheral initiate record and playback at the
same time, while also shoveling bytes between both FIFOs to write to
disk. In essence, this does a round-trip through the peripheral code,
and should produce a 1:1 matching output on disk from the input file.
Unfortunately, there's no easy way to detect when the recording audio
data has run out, so it's on the user to stop it by disabling the
loopback bit in the control register. In short, to run this sanity
check, do the following:

  1. Set the input and output files in the Renode configuration script.
  2. Start the simulation
  3. Telnet to the Renode console
  4. Run `i2s0 WriteDoubleWord 0x0c 4`
  5. Wait a while.
  6. Run `i2s0 WriteDoubleWord 0x0c 0` or quit Renode.

At this point, the output file should contain the same data as what
was in the input file. Since we can't determine when the file is out
of bytes to read, it may end up zero padded.

Change-Id: I79eb3f017cea3dc415305372e5670789eb329266
1 file changed
tree: 5bf14bf0b105edd8569e358f2e33f03949bf6135
  1. platforms/
  2. shodan_infrastructure/
  3. CONTRIBUTING.md
  4. gdbinit
  5. kelvin.resc
  6. LICENSE
  7. README.md
  8. shodan.resc
  9. springbok.resc
README.md

Simulation Configuration

This project hosts the Renode simulation description, platform definition, and simulation models for customized components.

Project structure

  • platforms: renode platform definitions
  • shodan_infrastructure: customized component model used in Renode's runtime compilation