Entity: spi_master_io

Diagram

clk nreset cpol cpha lsbfirst manual_mode send_data [7:0] clkdiv_reg [7:0] fifo_dout fifo_empty miso [2:0] spi_state fifo_read [63:0] rx_data rx_access sclk mosi ss

Description

#############################################################################

Purpose: SPI master IO state-machine

#############################################################################

Author: Andreas Olofsson

License: MIT (see LICENSE file in OH! repository) #

#############################################################################

Ports

Port name Direction Type Description
clk input core clock
nreset input async active low reset
cpol input cpol
cpha input cpha
lsbfirst input send lsbfirst
manual_mode input sets automatic ss mode
send_data input controls ss in manual ss mode
clkdiv_reg input [7:0] baudrate
spi_state output [2:0] current spi tx state
fifo_dout input [7:0] data payload
fifo_empty input
fifo_read output read new byte
rx_data output [63:0] rx data
rx_access output transfer done
sclk output spi clock
mosi output slave input
ss output slave select
miso input slave output

Signals

Name Type Description
fifo_empty_reg reg ############### # LOCAL WIRES ###############
load_byte reg
ss_reg reg
data_out wire [7:0]
clkphase0 wire [15:0]
period_match wire
phase_match wire
clkout wire
clkchange wire
data_done wire
spi_wait wire
shift wire
spi_active wire
tx_shift wire
rx_shift wire

Processes

Type: always

Type: always

Description
load is the result of the fifo_read

Type: always

Description
################################# # DRIVE OUTPUT CLOCK #################################

Type: always

Description
shift data generate access pulse at rise of ss

Instantiations

State machines

undefined