mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-15 08:30:02 +00:00
fix a few minor details missing in the tests
also update docs and completion tracker
This commit is contained in:
parent
4fa3dd3b59
commit
133bb2b74f
3 changed files with 23 additions and 6 deletions
|
|
@ -102,18 +102,18 @@ pub fn bio_tests() {
|
|||
// -[x] Host FIFO stall on empty test. Core stalls until host provides data.
|
||||
// -[x] Host FIFO stall on full test. Core stall until host reads data.
|
||||
// -[x] GPIO input path test
|
||||
// -[ ] Extclk as x20 stall source
|
||||
// -[ ] Check Extclk:gpio pin mapping (make sure bit ordering is not swapped)
|
||||
// -[x] Extclk as x20 stall source
|
||||
// -[x] Check Extclk:gpio pin mapping (make sure bit ordering is not swapped)
|
||||
// -[ ] GPIO direction control test
|
||||
// -[ ] FIFO level trigger test - eq, gt, lt on various channels, at various fullness levels
|
||||
// -[x] Stall on event - register bit test, between cores
|
||||
// -[x] Stall on event - register bit test, to host
|
||||
// -[x] Stall on event - FIFO level test
|
||||
// -[ ] Host IRQ generation test - some combination with event tests above to confirm IRQ generation
|
||||
// -[ ] Core ID read test
|
||||
// -[x] Core ID read test
|
||||
// -[ ] Core aclk counter test
|
||||
// Application tests:
|
||||
// -[ ] SPI loopback test - implement using extclk as spi clk for input
|
||||
// -[x] SPI loopback test - implement using extclk as spi clk for input
|
||||
// -[ ] I2C loopback test
|
||||
// -[ ] IR controller test
|
||||
// -[ ] Arithmetic test, utilizing load/store on core 0
|
||||
|
|
|
|||
|
|
@ -33,7 +33,11 @@ pub fn spi_test() {
|
|||
// this actually shouldn't matter, but set it to be "fast" for testing
|
||||
bio_ss.bio.wo(utra::bio::SFR_QDIV3, 0x1_0000);
|
||||
// snap GPIO outputs
|
||||
bio_ss.bio.wo(utra::bio::SFR_CONFIG, 1);
|
||||
bio_ss.bio.wo(
|
||||
utra::bio::SFR_CONFIG,
|
||||
bio_ss.bio.ms(utra::bio::SFR_CONFIG_SNAP_OUTPUT_TO_QUANTUM, 1)
|
||||
| bio_ss.bio.ms(utra::bio::SFR_CONFIG_SNAP_OUTPUT_TO_WHICH, 2)
|
||||
);
|
||||
|
||||
// bypass sync on all but clock
|
||||
bio_ss.bio.wo(utra::bio::SFR_SYNC_BYPASS, 0x500);
|
||||
|
|
@ -82,6 +86,17 @@ pub fn spi_test() {
|
|||
report_api(0x51C0_600D);
|
||||
}
|
||||
|
||||
// This is written to also test some additional features:
|
||||
// - loading word out of RAM (the random mask at the top)
|
||||
// - machine ID based dispatch
|
||||
// - how fast the SPI could run, hence the unrolled loop
|
||||
// - Receive clock triggering a code event (quanta register x20
|
||||
// is remapped to a GPIO input instead of the clock divider)
|
||||
// - Branch on quanta read (saves one clock cycle for a tight loop;
|
||||
// not strictly necessary but we use the idiom here to cap Tx loop)
|
||||
// This runs at about a 25MHz SPI clock rate, assuming an 800MHz
|
||||
// core clock for the complex. The Rx loop is potentially much faster
|
||||
// than the Tx loop.
|
||||
#[rustfmt::skip]
|
||||
bio_code!(
|
||||
spi_driver,
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ pub fn hello_multiverse() {
|
|||
bio_ss.bio.wo(
|
||||
utra::bio::SFR_CONFIG,
|
||||
bio_ss.bio.ms(utra::bio::SFR_CONFIG_SNAP_OUTPUT_TO_QUANTUM, 1)
|
||||
| bio_ss.bio.ms(utra::bio::SFR_CONFIG_SNAP_OUTPUT_TO_QUANTUM, 2), /* arbitrary choice, they
|
||||
| bio_ss.bio.ms(utra::bio::SFR_CONFIG_SNAP_OUTPUT_TO_QUANTUM, 1), /* arbitrary choice, they
|
||||
* should all be the same */
|
||||
);
|
||||
// start all the machines, all at once
|
||||
|
|
@ -236,6 +236,8 @@ pub fn host_fifo_tests() {
|
|||
bio_ss.bio.wo(utra::bio::SFR_CTRL, 0x0);
|
||||
let code = fifo_host_bitbang();
|
||||
bio_ss.load_code(code, 0);
|
||||
// reset all the fifos
|
||||
bio_ss.bio.wo(utra::bio::SFR_FIFO_CLR, 0xF);
|
||||
|
||||
// configure & run the 0th machine
|
||||
// clock it slowly, so the fifo builds up back pressure
|
||||
|
|
|
|||
Loading…
Reference in a new issue