Device-specific symbol definitions for the ChipWhisperer CW310 device. More...
#include <stdbool.h>
#include "sw/device/lib/arch/device.h"
#include "sw/device/lib/base/macros.h"
#include "sw/device/silicon_creator/lib/drivers/ibex.h"
#include "sw/device/silicon_creator/lib/drivers/uart.h"
#include "uart_regs.h"
Go to the source code of this file.
Functions | |
uint64_t | to_cpu_cycles (uint64_t usec) |
A platform-specific function to convert microseconds to cpu cycles. More... | |
void | device_fpga_version_print (void) |
Prints the FPGA version. More... | |
Variables | |
const device_type_t | kDeviceType = kDeviceFpgaCw310 |
Indicates the device that this program has been linked for. More... | |
const uint64_t | kClockFreqCpuMhz = 24 |
const uint64_t | kClockFreqCpuHz = kClockFreqCpuMhz * 1000 * 1000 |
The CPU clock frequency of the device, in hertz. More... | |
const uint64_t | kClockFreqHiSpeedPeripheralHz = 24 * 1000 * 1000 |
The high-speed peripheral clock frequency of the device, in hertz. More... | |
const uint64_t | kClockFreqPeripheralHz = 6 * 1000 * 1000 |
The peripheral clock frequency of the device, in hertz. More... | |
const uint64_t | kClockFreqUsbHz = 48 * 1000 * 1000 |
The USB clock frequency of the device, in hertz. More... | |
const uint64_t | kClockFreqAonHz = 250 * 1000 |
The always on clock frequency of the device, in hertz. More... | |
const uint64_t | kUartBaudrate = 115200 |
The baudrate of the UART peripheral (if such a thing is present). | |
const uint32_t | kUartNCOValue |
The pre-calculated UART NCO value based on the Baudrate and Peripheral clock. More... | |
const uint32_t | kUartBaud115K |
Additional pre-calculated UART NCO values. More... | |
const uint32_t | kUartBaud230K |
const uint32_t | kUartBaud460K |
const uint32_t | kUartBaud921K |
const uint32_t | kUartBaud1M33 |
const uint32_t | kUartBaud1M50 |
const uint32_t | kUartTxFifoCpuCycles |
The time it takes to transmit the entire UART TX fifo in CPU cycles. More... | |
const uint32_t | kAstCheckPollCpuCycles |
Maximum duration of the AST initialization check poll in CPU cycles. More... | |
const uintptr_t | kDeviceTestStatusAddress = 0 |
An address to write to report test status. More... | |
const uintptr_t | kDeviceLogBypassUartAddress = 0 |
An address to write use for UART logging bypass. More... | |
Device-specific symbol definitions for the ChipWhisperer CW310 device.
Definition in file device_fpga_cw310.c.
void device_fpga_version_print | ( | void | ) |
Prints the FPGA version.
This function is a NOP unless we are building for an FPGA.
Definition at line 63 of file device_fpga_cw310.c.
uint64_t to_cpu_cycles | ( | uint64_t | usec | ) |
A platform-specific function to convert microseconds to cpu cycles.
This is primarily used for spin waits that use the cpu cycle counters. For platforms with clock periods slower than 1 us this will round up.
Definition at line 25 of file device_fpga_cw310.c.
const uint32_t kAstCheckPollCpuCycles |
Maximum duration of the AST initialization check poll in CPU cycles.
This number depends on kClockFreqCpuHz
and the resulting duration must be 100us.
Definition at line 56 of file device_fpga_cw310.c.
const uint64_t kClockFreqAonHz = 250 * 1000 |
The always on clock frequency of the device, in hertz.
This is the operating clock used by the always on timer, power manager and other peripherals that continue to operate after the device is in sleep state.
Definition at line 33 of file device_fpga_cw310.c.
const uint64_t kClockFreqCpuHz = kClockFreqCpuMhz * 1000 * 1000 |
The CPU clock frequency of the device, in hertz.
This is the operating clock for the main processing host.
Definition at line 23 of file device_fpga_cw310.c.
const uint64_t kClockFreqHiSpeedPeripheralHz = 24 * 1000 * 1000 |
The high-speed peripheral clock frequency of the device, in hertz.
This is the operating clock used by the spi host
Definition at line 27 of file device_fpga_cw310.c.
const uint64_t kClockFreqPeripheralHz = 6 * 1000 * 1000 |
The peripheral clock frequency of the device, in hertz.
This is the operating clock used by timers, uarts, other peripheral interfaces.
Definition at line 29 of file device_fpga_cw310.c.
const uint64_t kClockFreqUsbHz = 48 * 1000 * 1000 |
The USB clock frequency of the device, in hertz.
This is the operating clock used by the USB phy interface and USB's software interface.
Definition at line 31 of file device_fpga_cw310.c.
const uintptr_t kDeviceLogBypassUartAddress = 0 |
An address to write use for UART logging bypass.
If this is zero, there is no address to write to bypass UART logging.
Definition at line 61 of file device_fpga_cw310.c.
const uintptr_t kDeviceTestStatusAddress = 0 |
An address to write to report test status.
If this is zero, there is no address to write to report test status.
Depending on the simulation environment and the value written to this address, the simulation may stop.
Definition at line 59 of file device_fpga_cw310.c.
const device_type_t kDeviceType = kDeviceFpgaCw310 |
Indicates the device that this program has been linked for.
This can be used, for example, for conditioning an operation on the precise device type.
Definition at line 19 of file device_fpga_cw310.c.
const uint32_t kUartBaud115K |
Additional pre-calculated UART NCO values.
If the pre-calculated value is zero, then the corresponding baudrate is not supported.
Definition at line 40 of file device_fpga_cw310.c.
const uint32_t kUartBaud1M33 |
Definition at line 48 of file device_fpga_cw310.c.
const uint32_t kUartBaud1M50 |
Definition at line 50 of file device_fpga_cw310.c.
const uint32_t kUartBaud230K |
Definition at line 42 of file device_fpga_cw310.c.
const uint32_t kUartBaud460K |
Definition at line 44 of file device_fpga_cw310.c.
const uint32_t kUartBaud921K |
Definition at line 46 of file device_fpga_cw310.c.
const uint32_t kUartNCOValue |
The pre-calculated UART NCO value based on the Baudrate and Peripheral clock.
Definition at line 37 of file device_fpga_cw310.c.
const uint32_t kUartTxFifoCpuCycles |
The time it takes to transmit the entire UART TX fifo in CPU cycles.
Definition at line 53 of file device_fpga_cw310.c.