pulp-runtime/include/hal/udma/spim/udma_spim_v3.h
Corrado Bonfanti 18ab940220 Add AVS BUS support and basic test
* Add configuration register to set AVS mode
* Add connections to the SPI controller and txrx interface
* Set idle level of sdio[0] signal of SPI master to '1', according to
the AVS protocol
* Add SPI slave device capability to trigger an event for requesting a read from
master by driving low the MISO (SDATA for AVS) when AVS mode is set.
This happens during tx/rx idle phases
* Add basic Write commit/Read test with pulp-runtime. AVS slave is
simulated in tb_avs.sv and tb_avs_fpga.sv.
2022-02-10 20:03:42 +01:00

29 lines
1.2 KiB
C

/*
* Copyright (C) 2018 ETH Zurich and University of Bologna
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef __HAL_UDMA_UDMA_SPIM_V3_H__
#define __HAL_UDMA_UDMA_SPIM_V3_H__
#include "archi/udma/spim/udma_spim_v3.h"
#define UDMA_SPIM_OFFSET(id) UDMA_PERIPH_OFFSET(ARCHI_UDMA_SPIM_ID(id))
#define UDMA_SPIM_CMD_ADDR(id) (ARCHI_UDMA_ADDR + UDMA_SPIM_OFFSET(id) + 0x20)
#define UDMA_SPIM_RX_ADDR(id) (ARCHI_UDMA_ADDR + UDMA_SPIM_OFFSET(id) + 0x00)
#define UDMA_SPIM_TX_ADDR(id) (ARCHI_UDMA_ADDR + UDMA_SPIM_OFFSET(id) + 0x10)
#define UDMA_SPIM_CUSTOM_ADDR(id) (ARCHI_UDMA_ADDR + UDMA_SPIM_OFFSET(id) + UDMA_CHANNEL_CUSTOM_OFFSET + 0x10)
#define UDMA_SPIM_AVS(id) (UDMA_SPIM_CUSTOM_ADDR(id) + 0x04)
#endif