Entity: spi_s2p

Diagram

clk_i rst_ni [3:0] s_i order_i io_mode_i data_valid_o spi_byte_t data_o [BitCntW-1:0] bitcnt_o

Description

Copyright lowRISC contributors. Licensed under the Apache License, Version 2.0, see LICENSE for details. SPDX-License-Identifier: Apache-2.0

SPI Serial-to-Parallel interface

Ports

Port name Direction Type Description
clk_i input
rst_ni input inverted CSb input
s_i input [3:0] SPI data
data_valid_o output to following logic
data_o output spi_byte_t
bitcnt_o output [BitCntW-1:0] up to 256B payload
order_i input Configuration
io_mode_i input

Signals

Name Type Description
cnt count_t
bitcnt bitcount_t
data_d spi_byte_t
data_q spi_byte_t

Constants

Name Type Value Description
Bits int unsigned $bits(spi_byte_t) /////////////// Definitions // /////////////// Maximum Length of a transaction is: 8 bit opcode + 24 or 32 bit address + max 8 bit dummy cycle + 256B payload Or in FwMode, half of DPSRAM
BitWidth int unsigned $clog2(Bits)

Types

Name Type Description
count_t logic [BitWidth-1:0]
bitcount_t logic [BitCntW-1:0]

Processes

Type: always_comb

Type: always_ff

Type: always_ff

Description
total bit count

Type: always_ff

Description
Bitcount in a byte

Type: always_comb

Description
data valid