software/liblitedram/accessors: Add seperators to improve readability.

This commit is contained in:
Florent Kermarrec 2023-01-30 09:00:23 +01:00
parent fb94cb0551
commit 8ad728cd22
2 changed files with 42 additions and 0 deletions

View File

@ -4,6 +4,10 @@
#if defined(CSR_SDRAM_BASE) && defined(CSR_DDRPHY_BASE) #if defined(CSR_SDRAM_BASE) && defined(CSR_DDRPHY_BASE)
/*----------------------------------------------------------------------------*/
/* Read DQ Delays Reset/Increment Functions */
/*----------------------------------------------------------------------------*/
#if defined(SDRAM_PHY_READ_LEVELING_CAPABLE) #if defined(SDRAM_PHY_READ_LEVELING_CAPABLE)
int read_dq_delay[SDRAM_PHY_MODULES]; int read_dq_delay[SDRAM_PHY_MODULES];
@ -21,6 +25,10 @@ void read_rst_dq_delay(int module) {
#endif // defined(SDRAM_PHY_READ_LEVELING_CAPABLE) #endif // defined(SDRAM_PHY_READ_LEVELING_CAPABLE)
/*----------------------------------------------------------------------------*/
/* Write DQ/DQS/Clk Delays Reset/Increment Functions */
/*----------------------------------------------------------------------------*/
#if defined(SDRAM_PHY_WRITE_LEVELING_CAPABLE) #if defined(SDRAM_PHY_WRITE_LEVELING_CAPABLE)
int sdram_clock_delay; int sdram_clock_delay;
@ -94,6 +102,10 @@ void write_rst_delay(int module) {
#endif // defined(SDRAM_PHY_WRITE_LEVELING_CAPABLE) #endif // defined(SDRAM_PHY_WRITE_LEVELING_CAPABLE)
/*----------------------------------------------------------------------------*/
/* Bitslip Delays Reset/Increment Functions */
/*----------------------------------------------------------------------------*/
#if defined(SDRAM_PHY_BITSLIPS) #if defined(SDRAM_PHY_BITSLIPS)
int read_dq_bitslip[SDRAM_PHY_MODULES]; int read_dq_bitslip[SDRAM_PHY_MODULES];
@ -124,6 +136,10 @@ void write_rst_dq_bitslip(int module) {
#endif // defined(SDRAM_PHY_BITSLIPS) #endif // defined(SDRAM_PHY_BITSLIPS)
/*----------------------------------------------------------------------------*/
/* SDRAM Module Selection Functions */
/*----------------------------------------------------------------------------*/
void sdram_select(int module, int dq_line) { void sdram_select(int module, int dq_line) {
ddrphy_dly_sel_write(1 << module); ddrphy_dly_sel_write(1 << module);
@ -148,6 +164,10 @@ void sdram_deselect(int module, int dq_line) {
#endif #endif
} }
/*----------------------------------------------------------------------------*/
/* SDRAM Actions */
/*----------------------------------------------------------------------------*/
void sdram_leveling_action(int module, int dq_line, action_callback action) { void sdram_leveling_action(int module, int dq_line, action_callback action) {
/* Select module */ /* Select module */
sdram_select(module, dq_line); sdram_select(module, dq_line);

View File

@ -11,6 +11,10 @@ extern "C" {
typedef void (*action_callback)(int module); typedef void (*action_callback)(int module);
/*----------------------------------------------------------------------------*/
/* Read DQ Delays Reset/Increment Functions */
/*----------------------------------------------------------------------------*/
#if defined(SDRAM_PHY_READ_LEVELING_CAPABLE) #if defined(SDRAM_PHY_READ_LEVELING_CAPABLE)
extern int read_dq_delay[SDRAM_PHY_MODULES]; extern int read_dq_delay[SDRAM_PHY_MODULES];
@ -19,6 +23,11 @@ void read_rst_dq_delay(int module);
#endif // defined(SDRAM_PHY_READ_LEVELING_CAPABLE) #endif // defined(SDRAM_PHY_READ_LEVELING_CAPABLE)
/*----------------------------------------------------------------------------*/
/* Write DQ/DQS/Clk Delays Reset/Increment Functions */
/*----------------------------------------------------------------------------*/
#if defined(SDRAM_PHY_WRITE_LEVELING_CAPABLE) #if defined(SDRAM_PHY_WRITE_LEVELING_CAPABLE)
extern int sdram_clock_delay; extern int sdram_clock_delay;
@ -37,6 +46,10 @@ void write_rst_delay(int module);
#endif // defined(SDRAM_PHY_WRITE_LEVELING_CAPABLE) #endif // defined(SDRAM_PHY_WRITE_LEVELING_CAPABLE)
/*----------------------------------------------------------------------------*/
/* Bitslip Delays Reset/Increment Functions */
/*----------------------------------------------------------------------------*/
#if defined(SDRAM_PHY_BITSLIPS) #if defined(SDRAM_PHY_BITSLIPS)
extern int read_dq_bitslip[SDRAM_PHY_MODULES]; extern int read_dq_bitslip[SDRAM_PHY_MODULES];
@ -49,8 +62,17 @@ void write_rst_dq_bitslip(int module);
#endif // defined(SDRAM_PHY_BITSLIPS) #endif // defined(SDRAM_PHY_BITSLIPS)
/*----------------------------------------------------------------------------*/
/* SDRAM Module Selection Functions */
/*----------------------------------------------------------------------------*/
void sdram_select(int module, int dq_line); void sdram_select(int module, int dq_line);
void sdram_deselect(int module, int dq_line); void sdram_deselect(int module, int dq_line);
/*----------------------------------------------------------------------------*/
/* SDRAM Actions */
/*----------------------------------------------------------------------------*/
void sdram_leveling_action(int module, int dq_line, action_callback action); void sdram_leveling_action(int module, int dq_line, action_callback action);
#ifdef SDRAM_PHY_WRITE_LEVELING_CAPABLE #ifdef SDRAM_PHY_WRITE_LEVELING_CAPABLE