commit | 822f23f438199b9a67fb5b92c9cd94cd7306c28a | [log] [tgz] |
---|---|---|
author | June Tate-Gans <jtgans@google.com> | Mon Dec 04 18:33:41 2023 +0000 |
committer | June Tate-Gans <jtgans@google.com> | Tue Dec 05 14:34:10 2023 +0000 |
tree | 5bf14bf0b105edd8569e358f2e33f03949bf6135 | |
parent | c6a976c185595cac3cfadf81e64a17e4dbf2b678 [diff] |
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
This project hosts the Renode simulation description, platform definition, and simulation models for customized components.