Package: spi_device_env_pkg
- File: spi_device_env_pkg.sv
Description
Copyright lowRISC contributors.
Licensed under the Apache License, Version 2.0, see LICENSE for details.
SPDX-License-Identifier: Apache-2.0
Signals
Name | Type | Description |
---|---|---|
msg_id | string | |
get_mirrored_value | get_allocated_sram_size_bytes | |
get_mirrored_value | get_allocated_sram_size_bytes | |
get_mirrored_value | get_allocated_sram_size_bytes |
Constants
Name | Type | Value | Description |
---|---|---|---|
uint | uint | 1 | alerts |
LIST_OF_ALERTS | string | { "fatal_fault"} |
|
uint | uint | 'h1000 | SPI SRAM is 2kB |
uint | uint | 4096 | 672 depth |
uint | uint | $clog2(SRAM_SIZE) - 1 | |
SRAM_PTR_PHASE_BIT | uint | SRAM_MSB + 1 | |
uint | uint | 4 | |
uint | uint | 8 |
Types
Name | Type | Description |
---|---|---|
spi_device_intr_e | enum { RxFifoFull, RxFifoGeLevel, TxFifoLtLevel, RxFwModeErr, RxFifoOverflow, TxFifoUnderflow, NumSpiDevIntr } |
local parameters and types |
sram_avail_type_e | enum bit { SramDataAvail, SramSpaceAvail } |
Functions
- get_sram_space_bytes (uint wptr,
uint rpt) return (uint)
Description
functions
get size of empty space in mem
- get_sram_filled_bytes (uint wptr,
uint rpt) return (uint)
Description
get size of filled data in mem
- get_allocated_sram_size_bytes (uint base,
uint) return (uint)
Description
get the memory size
- get_sram_new_ptr (uint ptr,
) return (uint)
Description
use this function to calculate the new ptr value
if new rx_rptr exceeds programmed sram size in bytes, then wrap it and flip the phase bit
else, restore the 'saved' phase bit