Use the `BackingFile` property of the SPI flash block in order to allow
SPI flash writes to persist across runs. This will write out the SPI
flash contents as data is written.
Signed-off-by: Sean Cross <sean@xobs.io>
This audio codec lives on I2C and doesn't really do much for us.
However, by adding this device we can now pass `test oqc`.
The next step will be to implement `BetrustedI2S` which is where the
actual audio emulation occurs.
Signed-off-by: Sean Cross <sean@xobs.io>
Because of the previous commit, endianness was incorrect and we weren't
reading the full range of values.
Correct the endianness and support continuous reads. Also expose various
settings so they may be adjusted.
Signed-off-by: Sean Cross <sean@xobs.io>
Previously, the code would only allow for reading one register at a
time. This caused that one register to be duplicated repeatedly.
As a result, readings such as Voltage were incorrect.
Signed-off-by: Sean Cross <sean@xobs.io>
Add the loader into the main workspace, removing it from its own
sub-workspace. We can do this now that we can specify the linker script
in `build.rs`.
This improves IDE support, and should shrink disk storage requirements.
Signed-off-by: Sean Cross <sean@xobs.io>
This adds a working Ethernet implementation based on the WF200. It
currently gets connected to a Linux machine running a udhcpd server,
however it could also get connected to a TUN/TAP connection on Linux or
Mac.
Signed-off-by: Sean Cross <sean@xobs.io>
The COM bus is fundamentally three things: The SoC, the EC, and the glue
that binds the two together.
Now that we have the `EnsureTypeIsLoaded` trick, split the file into
three different groups.
Signed-off-by: Sean Cross <sean@xobs.io>
Emulate both the SPINOR block as well as the OSPI flash attached to it.
With this change, the PDDB can now be initialized and resets itself
properly. Additionally, data persists across virtual reboots.
Data does not persist across runs of the emulator. That will follow in
an upcoming patch.
Signed-off-by: Sean Cross <sean@xobs.io>
Previously, the HOLD signal was updated in a different clock domain from
the transmission signal. This could result in the HOLD bit being set
even if there was no data available.
Update the HOLD bit if it's present as part of the Transmit cycle.
Signed-off-by: Sean Cross <sean@xobs.io>
Connect the EC to the SoC. This allows for emulating both the EC and SoC
in tandem. Messages flow via a 16-bit bus. When data is not available,
`0xdddd` is returned.
There is a HOLD line that goes from the EC to the SoC. This is tied to
the inverse of presence of data in the EC FIFO -- when it's empty, HOLD
is `1`, and when there is data it's `0`.
Signed-off-by: Sean Cross <sean@xobs.io>
Previously, the memlcd had 22 bytes of dirty bits following a line. This
was reduced to 2 bytes, but the logic checking the dirty bytes had not
been updated.
Reduce the dirty byte count to 2 bytes.
Signed-off-by: Sean Cross <sean@xobs.io>
Add the loader into the main workspace, removing it from its own
sub-workspace. We can do this now that we can specify the linker script
in `build.rs`.
This improves IDE support, and should shrink disk storage requirements.
Signed-off-by: Sean Cross <sean@xobs.io>