test(BitScrambler): added more basic test cases
e.g. to test different eof mode, prefetch mode
This commit is contained in:
@@ -224,7 +224,10 @@ esp_err_t bitscrambler_load_program(bitscrambler_handle_t bs, const void *progra
|
||||
//Set options from header
|
||||
bitscrambler_ll_set_lut_width(bs->hw, bs->cfg.dir, hdr.lut_width);
|
||||
bitscrambler_ll_enable_prefetch_on_reset(bs->hw, bs->cfg.dir, hdr.prefetch);
|
||||
bitscrambler_ll_set_eof_mode(bs->hw, bs->cfg.dir, hdr.eof_on);
|
||||
// the bitscrambler assembler (bsasm.py) treats 'eof_on=1' as "upstream", a.k.a, read from upstream
|
||||
// quote from bsasm.py: {'op': 'eof_on', 'default': 1, 'enum': {'upstream': 1, 'downstream': 0}},
|
||||
bitscrambler_eof_mode_t eof_mode = hdr.eof_on ? BITSCRAMBLER_EOF_MODE_READ : BITSCRAMBLER_EOF_MODE_WRITE;
|
||||
bitscrambler_ll_set_eof_mode(bs->hw, bs->cfg.dir, eof_mode);
|
||||
bitscrambler_ll_set_tailing_bits(bs->hw, bs->cfg.dir, hdr.trailing_bits);
|
||||
//fixed options
|
||||
bitscrambler_ll_set_dummy_mode(bs->hw, bs->cfg.dir, BITSCRAMBLER_DUMMY_MODE_DUMMY);
|
||||
|
||||
@@ -132,6 +132,7 @@ esp_err_t bitscrambler_loopback_create(bitscrambler_handle_t *handle, int attach
|
||||
gdma_strategy_config_t gdma_strategy_conf = {
|
||||
.auto_update_desc = true,
|
||||
.owner_check = false,
|
||||
.eof_till_data_popped = true,
|
||||
};
|
||||
gdma_apply_strategy(bs->rx_channel, &gdma_strategy_conf);
|
||||
gdma_apply_strategy(bs->tx_channel, &gdma_strategy_conf);
|
||||
|
||||
Reference in New Issue
Block a user