SimpleVOut  1.0.0 Initial
A Simple FPGA Core for Creating VGA/DVI/HDMI/OpenLDI Signals
ps7_init_gpl.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define OPCODE_EXIT   0U
 
#define OPCODE_CLEAR   1U
 
#define OPCODE_WRITE   2U
 
#define OPCODE_MASKWRITE   3U
 
#define OPCODE_MASKPOLL   4U
 
#define OPCODE_MASKDELAY   5U
 
#define NEW_PS7_ERR_CODE   1
 
#define EMIT_EXIT()   ( (OPCODE_EXIT << 4 ) | 0 )
 
#define EMIT_CLEAR(addr)   ( (OPCODE_CLEAR << 4 ) | 1 ) , addr
 
#define EMIT_WRITE(addr, val)   ( (OPCODE_WRITE << 4 ) | 2 ) , addr, val
 
#define EMIT_MASKWRITE(addr, mask, val)   ( (OPCODE_MASKWRITE << 4 ) | 3 ) , addr, mask, val
 
#define EMIT_MASKPOLL(addr, mask)   ( (OPCODE_MASKPOLL << 4 ) | 2 ) , addr, mask
 
#define EMIT_MASKDELAY(addr, mask)   ( (OPCODE_MASKDELAY << 4 ) | 2 ) , addr, mask
 
#define PS7_INIT_SUCCESS   (0)
 
#define PS7_INIT_CORRUPT   (1)
 
#define PS7_INIT_TIMEOUT   (2)
 
#define PS7_POLL_FAILED_DDR_INIT   (3)
 
#define PS7_POLL_FAILED_DMA   (4)
 
#define PS7_POLL_FAILED_PLL   (5)
 
#define PCW_SILICON_VERSION_1   0
 
#define PCW_SILICON_VERSION_2   1
 
#define PCW_SILICON_VERSION_3   2
 
#define PS7_POST_CONFIG
 
#define APU_FREQ   666666687
 
#define DDR_FREQ   533333374
 
#define DCI_FREQ   10158730
 
#define QSPI_FREQ   10000000
 
#define SMC_FREQ   100000000
 
#define ENET0_FREQ   25000000
 
#define ENET1_FREQ   10000000
 
#define USB0_FREQ   60000000
 
#define USB1_FREQ   60000000
 
#define SDIO_FREQ   100000000
 
#define UART_FREQ   100000000
 
#define SPI_FREQ   10000000
 
#define I2C_FREQ   111111115
 
#define WDT_FREQ   111111115
 
#define TTC_FREQ   50000000
 
#define CAN_FREQ   10000000
 
#define PCAP_FREQ   200000000
 
#define TPIU_FREQ   200000000
 
#define FPGA0_FREQ   125000000
 
#define FPGA1_FREQ   25000000
 
#define FPGA2_FREQ   33333336
 
#define FPGA3_FREQ   100000000
 
#define SCU_GLOBAL_TIMER_COUNT_L32   0xF8F00200
 
#define SCU_GLOBAL_TIMER_COUNT_U32   0xF8F00204
 
#define SCU_GLOBAL_TIMER_CONTROL   0xF8F00208
 
#define SCU_GLOBAL_TIMER_AUTO_INC   0xF8F00218
 

Functions

int ps7_config (unsigned long *)
 
int ps7_init ()
 
int ps7_post_config ()
 
int ps7_debug ()
 
char * getPS7MessageInfo (unsigned key)
 
void perf_start_clock (void)
 
void perf_disable_clock (void)
 
void perf_reset_clock (void)
 
void perf_reset_and_start_timer ()
 
int get_number_of_cycles_for_delay (unsigned int delay)
 

Variables

unsigned long * ps7_ddr_init_data
 do we need to make this name more unique ? More...
 
unsigned long * ps7_mio_init_data
 
unsigned long * ps7_pll_init_data
 
unsigned long * ps7_clock_init_data
 
unsigned long * ps7_peripherals_init_data
 

Detailed Description

This file can be included in FSBL code to get prototype of ps7_init() function and error codes

Definition in file ps7_init_gpl.h.

Macro Definition Documentation

◆ APU_FREQ

#define APU_FREQ   666666687

Definition at line 87 of file ps7_init_gpl.h.

◆ CAN_FREQ

#define CAN_FREQ   10000000

Definition at line 102 of file ps7_init_gpl.h.

◆ DCI_FREQ

#define DCI_FREQ   10158730

Definition at line 89 of file ps7_init_gpl.h.

◆ DDR_FREQ

#define DDR_FREQ   533333374

Definition at line 88 of file ps7_init_gpl.h.

◆ EMIT_CLEAR

#define EMIT_CLEAR (   addr)    ( (OPCODE_CLEAR << 4 ) | 1 ) , addr

Definition at line 62 of file ps7_init_gpl.h.

◆ EMIT_EXIT

#define EMIT_EXIT ( )    ( (OPCODE_EXIT << 4 ) | 0 )

Definition at line 61 of file ps7_init_gpl.h.

◆ EMIT_MASKDELAY

#define EMIT_MASKDELAY (   addr,
  mask 
)    ( (OPCODE_MASKDELAY << 4 ) | 2 ) , addr, mask

Definition at line 66 of file ps7_init_gpl.h.

◆ EMIT_MASKPOLL

#define EMIT_MASKPOLL (   addr,
  mask 
)    ( (OPCODE_MASKPOLL << 4 ) | 2 ) , addr, mask

Definition at line 65 of file ps7_init_gpl.h.

◆ EMIT_MASKWRITE

#define EMIT_MASKWRITE (   addr,
  mask,
  val 
)    ( (OPCODE_MASKWRITE << 4 ) | 3 ) , addr, mask, val

Definition at line 64 of file ps7_init_gpl.h.

◆ EMIT_WRITE

#define EMIT_WRITE (   addr,
  val 
)    ( (OPCODE_WRITE << 4 ) | 2 ) , addr, val

Definition at line 63 of file ps7_init_gpl.h.

◆ ENET0_FREQ

#define ENET0_FREQ   25000000

Definition at line 92 of file ps7_init_gpl.h.

◆ ENET1_FREQ

#define ENET1_FREQ   10000000

Definition at line 93 of file ps7_init_gpl.h.

◆ FPGA0_FREQ

#define FPGA0_FREQ   125000000

Definition at line 105 of file ps7_init_gpl.h.

◆ FPGA1_FREQ

#define FPGA1_FREQ   25000000

Definition at line 106 of file ps7_init_gpl.h.

◆ FPGA2_FREQ

#define FPGA2_FREQ   33333336

Definition at line 107 of file ps7_init_gpl.h.

◆ FPGA3_FREQ

#define FPGA3_FREQ   100000000

Definition at line 108 of file ps7_init_gpl.h.

◆ I2C_FREQ

#define I2C_FREQ   111111115

Definition at line 99 of file ps7_init_gpl.h.

◆ NEW_PS7_ERR_CODE

#define NEW_PS7_ERR_CODE   1

Definition at line 58 of file ps7_init_gpl.h.

◆ OPCODE_CLEAR

#define OPCODE_CLEAR   1U

Definition at line 53 of file ps7_init_gpl.h.

◆ OPCODE_EXIT

#define OPCODE_EXIT   0U

Definition at line 52 of file ps7_init_gpl.h.

◆ OPCODE_MASKDELAY

#define OPCODE_MASKDELAY   5U

Definition at line 57 of file ps7_init_gpl.h.

◆ OPCODE_MASKPOLL

#define OPCODE_MASKPOLL   4U

Definition at line 56 of file ps7_init_gpl.h.

◆ OPCODE_MASKWRITE

#define OPCODE_MASKWRITE   3U

Definition at line 55 of file ps7_init_gpl.h.

◆ OPCODE_WRITE

#define OPCODE_WRITE   2U

Definition at line 54 of file ps7_init_gpl.h.

◆ PCAP_FREQ

#define PCAP_FREQ   200000000

Definition at line 103 of file ps7_init_gpl.h.

◆ PCW_SILICON_VERSION_1

#define PCW_SILICON_VERSION_1   0

Definition at line 78 of file ps7_init_gpl.h.

◆ PCW_SILICON_VERSION_2

#define PCW_SILICON_VERSION_2   1

Definition at line 79 of file ps7_init_gpl.h.

◆ PCW_SILICON_VERSION_3

#define PCW_SILICON_VERSION_3   2

Definition at line 80 of file ps7_init_gpl.h.

◆ PS7_INIT_CORRUPT

#define PS7_INIT_CORRUPT   (1)

Definition at line 70 of file ps7_init_gpl.h.

◆ PS7_INIT_SUCCESS

#define PS7_INIT_SUCCESS   (0)

Definition at line 69 of file ps7_init_gpl.h.

◆ PS7_INIT_TIMEOUT

#define PS7_INIT_TIMEOUT   (2)

Definition at line 71 of file ps7_init_gpl.h.

◆ PS7_POLL_FAILED_DDR_INIT

#define PS7_POLL_FAILED_DDR_INIT   (3)

Definition at line 72 of file ps7_init_gpl.h.

◆ PS7_POLL_FAILED_DMA

#define PS7_POLL_FAILED_DMA   (4)

Definition at line 73 of file ps7_init_gpl.h.

◆ PS7_POLL_FAILED_PLL

#define PS7_POLL_FAILED_PLL   (5)

Definition at line 74 of file ps7_init_gpl.h.

◆ PS7_POST_CONFIG

#define PS7_POST_CONFIG

Definition at line 83 of file ps7_init_gpl.h.

◆ QSPI_FREQ

#define QSPI_FREQ   10000000

Definition at line 90 of file ps7_init_gpl.h.

◆ SCU_GLOBAL_TIMER_AUTO_INC

#define SCU_GLOBAL_TIMER_AUTO_INC   0xF8F00218

Definition at line 115 of file ps7_init_gpl.h.

◆ SCU_GLOBAL_TIMER_CONTROL

#define SCU_GLOBAL_TIMER_CONTROL   0xF8F00208

Definition at line 114 of file ps7_init_gpl.h.

◆ SCU_GLOBAL_TIMER_COUNT_L32

#define SCU_GLOBAL_TIMER_COUNT_L32   0xF8F00200

Definition at line 112 of file ps7_init_gpl.h.

◆ SCU_GLOBAL_TIMER_COUNT_U32

#define SCU_GLOBAL_TIMER_COUNT_U32   0xF8F00204

Definition at line 113 of file ps7_init_gpl.h.

◆ SDIO_FREQ

#define SDIO_FREQ   100000000

Definition at line 96 of file ps7_init_gpl.h.

◆ SMC_FREQ

#define SMC_FREQ   100000000

Definition at line 91 of file ps7_init_gpl.h.

◆ SPI_FREQ

#define SPI_FREQ   10000000

Definition at line 98 of file ps7_init_gpl.h.

◆ TPIU_FREQ

#define TPIU_FREQ   200000000

Definition at line 104 of file ps7_init_gpl.h.

◆ TTC_FREQ

#define TTC_FREQ   50000000

Definition at line 101 of file ps7_init_gpl.h.

◆ UART_FREQ

#define UART_FREQ   100000000

Definition at line 97 of file ps7_init_gpl.h.

◆ USB0_FREQ

#define USB0_FREQ   60000000

Definition at line 94 of file ps7_init_gpl.h.

◆ USB1_FREQ

#define USB1_FREQ   60000000

Definition at line 95 of file ps7_init_gpl.h.

◆ WDT_FREQ

#define WDT_FREQ   111111115

Definition at line 100 of file ps7_init_gpl.h.

Function Documentation

◆ get_number_of_cycles_for_delay()

int get_number_of_cycles_for_delay ( unsigned int  delay)

Definition at line 12325 of file ps7_init.c.

References APU_FREQ.

Referenced by ps7_config().

Here is the caller graph for this function:

◆ getPS7MessageInfo()

char* getPS7MessageInfo ( unsigned  key)

◆ perf_disable_clock()

void perf_disable_clock ( void  )

Definition at line 12333 of file ps7_init.c.

References SCU_GLOBAL_TIMER_CONTROL.

Referenced by perf_reset_clock().

Here is the caller graph for this function:

◆ perf_reset_and_start_timer()

void perf_reset_and_start_timer ( )

Definition at line 12338 of file ps7_init.c.

References perf_reset_clock(), and perf_start_clock().

Referenced by ps7_config().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ perf_reset_clock()

void perf_reset_clock ( void  )

Definition at line 12317 of file ps7_init.c.

References perf_disable_clock(), SCU_GLOBAL_TIMER_COUNT_L32, and SCU_GLOBAL_TIMER_COUNT_U32.

Referenced by perf_reset_and_start_timer().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ perf_start_clock()

void perf_start_clock ( void  )

Definition at line 12308 of file ps7_init.c.

References SCU_GLOBAL_TIMER_CONTROL.

Referenced by perf_reset_and_start_timer().

Here is the caller graph for this function:

◆ ps7_config()

int ps7_config ( unsigned long *  )

Definition at line 12121 of file ps7_init.c.

References get_number_of_cycles_for_delay(), OPCODE_CLEAR, OPCODE_EXIT, OPCODE_MASKDELAY, OPCODE_MASKPOLL, OPCODE_MASKWRITE, OPCODE_WRITE, perf_reset_and_start_timer(), PS7_INIT_CORRUPT, PS7_INIT_SUCCESS, PS7_INIT_TIMEOUT, and PS7_MASK_POLL_TIME.

Referenced by ps7_debug(), ps7_init(), and ps7_post_config().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ps7_debug()

int ps7_debug ( )

Definition at line 12225 of file ps7_init.c.

References PCW_SILICON_VERSION_1, PCW_SILICON_VERSION_2, ps7_config(), ps7_debug_1_0, ps7_debug_2_0, ps7_debug_3_0, PS7_INIT_SUCCESS, and ps7GetSiliconVersion().

Here is the call graph for this function:

◆ ps7_init()

◆ ps7_post_config()

int ps7_post_config ( )

Variable Documentation

◆ ps7_clock_init_data

unsigned long* ps7_clock_init_data

Definition at line 12201 of file ps7_init.c.

Referenced by ps7_init().

◆ ps7_ddr_init_data

unsigned long* ps7_ddr_init_data

do we need to make this name more unique ?

Definition at line 12202 of file ps7_init.c.

Referenced by ps7_init().

◆ ps7_mio_init_data

unsigned long* ps7_mio_init_data

Definition at line 12199 of file ps7_init.c.

Referenced by ps7_init().

◆ ps7_peripherals_init_data

unsigned long* ps7_peripherals_init_data

Definition at line 12203 of file ps7_init.c.

Referenced by ps7_init().

◆ ps7_pll_init_data

unsigned long* ps7_pll_init_data

Definition at line 12200 of file ps7_init.c.

Referenced by ps7_init().