Altera SoCAL  16.0
The Altera SoC Abstraction Layer (SoCAL) API Reference Manual
 All Data Structures Variables Typedefs Groups
Register : Device Size Register - devsz

Description

Register Layout

Bits Access Reset Description
[3:0] RW 0x2 Number of address Bytes
[15:4] RW 0x100 Number of Bytes per Device Page
[20:16] RW 0x10 Number of Bytes per Block
[31:21] ??? 0x0 UNDEFINED

Field : Number of address Bytes - numaddrbytes

Number of address bytes. A value of 0 indicates 1 byte.

Field Access Macros:

#define ALT_QSPI_DEVSZ_NUMADDRBYTES_LSB   0
 
#define ALT_QSPI_DEVSZ_NUMADDRBYTES_MSB   3
 
#define ALT_QSPI_DEVSZ_NUMADDRBYTES_WIDTH   4
 
#define ALT_QSPI_DEVSZ_NUMADDRBYTES_SET_MSK   0x0000000f
 
#define ALT_QSPI_DEVSZ_NUMADDRBYTES_CLR_MSK   0xfffffff0
 
#define ALT_QSPI_DEVSZ_NUMADDRBYTES_RESET   0x2
 
#define ALT_QSPI_DEVSZ_NUMADDRBYTES_GET(value)   (((value) & 0x0000000f) >> 0)
 
#define ALT_QSPI_DEVSZ_NUMADDRBYTES_SET(value)   (((value) << 0) & 0x0000000f)
 

Field : Number of Bytes per Device Page - bytesperdevicepage

Number of bytes per device page. This is required by the controller for performing FLASH writes up to and across page boundaries.

Field Access Macros:

#define ALT_QSPI_DEVSZ_BYTESPERDEVICEPAGE_LSB   4
 
#define ALT_QSPI_DEVSZ_BYTESPERDEVICEPAGE_MSB   15
 
#define ALT_QSPI_DEVSZ_BYTESPERDEVICEPAGE_WIDTH   12
 
#define ALT_QSPI_DEVSZ_BYTESPERDEVICEPAGE_SET_MSK   0x0000fff0
 
#define ALT_QSPI_DEVSZ_BYTESPERDEVICEPAGE_CLR_MSK   0xffff000f
 
#define ALT_QSPI_DEVSZ_BYTESPERDEVICEPAGE_RESET   0x100
 
#define ALT_QSPI_DEVSZ_BYTESPERDEVICEPAGE_GET(value)   (((value) & 0x0000fff0) >> 4)
 
#define ALT_QSPI_DEVSZ_BYTESPERDEVICEPAGE_SET(value)   (((value) << 4) & 0x0000fff0)
 

Field : Number of Bytes per Block - bytespersubsector

Number of bytes per Block. This is required by the controller for performing the write protection logic. The number of bytes per block must be a power of 2 number.

Field Access Macros:

#define ALT_QSPI_DEVSZ_BYTESPERSUBSECTOR_LSB   16
 
#define ALT_QSPI_DEVSZ_BYTESPERSUBSECTOR_MSB   20
 
#define ALT_QSPI_DEVSZ_BYTESPERSUBSECTOR_WIDTH   5
 
#define ALT_QSPI_DEVSZ_BYTESPERSUBSECTOR_SET_MSK   0x001f0000
 
#define ALT_QSPI_DEVSZ_BYTESPERSUBSECTOR_CLR_MSK   0xffe0ffff
 
#define ALT_QSPI_DEVSZ_BYTESPERSUBSECTOR_RESET   0x10
 
#define ALT_QSPI_DEVSZ_BYTESPERSUBSECTOR_GET(value)   (((value) & 0x001f0000) >> 16)
 
#define ALT_QSPI_DEVSZ_BYTESPERSUBSECTOR_SET(value)   (((value) << 16) & 0x001f0000)
 

Data Structures

struct  ALT_QSPI_DEVSZ_s
 

Macros

#define ALT_QSPI_DEVSZ_OFST   0x14
 

Typedefs

typedef struct ALT_QSPI_DEVSZ_s ALT_QSPI_DEVSZ_t
 

Data Structure Documentation

struct ALT_QSPI_DEVSZ_s

WARNING: The C register and register group struct declarations are provided for convenience and illustrative purposes. They should, however, be used with caution as the C language standard provides no guarantees about the alignment or atomicity of device memory accesses. The recommended practice for writing hardware drivers is to use the SoCAL access macros and alt_read_word() and alt_write_word() functions.

The struct declaration for register ALT_QSPI_DEVSZ.

Data Fields
uint32_t numaddrbytes: 4 Number of address Bytes
uint32_t bytesperdevicepage: 12 Number of Bytes per Device Page
uint32_t bytespersubsector: 5 Number of Bytes per Block
uint32_t __pad0__: 11 UNDEFINED

Macro Definitions

#define ALT_QSPI_DEVSZ_NUMADDRBYTES_LSB   0

The Least Significant Bit (LSB) position of the ALT_QSPI_DEVSZ_NUMADDRBYTES register field.

#define ALT_QSPI_DEVSZ_NUMADDRBYTES_MSB   3

The Most Significant Bit (MSB) position of the ALT_QSPI_DEVSZ_NUMADDRBYTES register field.

#define ALT_QSPI_DEVSZ_NUMADDRBYTES_WIDTH   4

The width in bits of the ALT_QSPI_DEVSZ_NUMADDRBYTES register field.

#define ALT_QSPI_DEVSZ_NUMADDRBYTES_SET_MSK   0x0000000f

The mask used to set the ALT_QSPI_DEVSZ_NUMADDRBYTES register field value.

#define ALT_QSPI_DEVSZ_NUMADDRBYTES_CLR_MSK   0xfffffff0

The mask used to clear the ALT_QSPI_DEVSZ_NUMADDRBYTES register field value.

#define ALT_QSPI_DEVSZ_NUMADDRBYTES_RESET   0x2

The reset value of the ALT_QSPI_DEVSZ_NUMADDRBYTES register field.

#define ALT_QSPI_DEVSZ_NUMADDRBYTES_GET (   value)    (((value) & 0x0000000f) >> 0)

Extracts the ALT_QSPI_DEVSZ_NUMADDRBYTES field value from a register.

#define ALT_QSPI_DEVSZ_NUMADDRBYTES_SET (   value)    (((value) << 0) & 0x0000000f)

Produces a ALT_QSPI_DEVSZ_NUMADDRBYTES register field value suitable for setting the register.

#define ALT_QSPI_DEVSZ_BYTESPERDEVICEPAGE_LSB   4

The Least Significant Bit (LSB) position of the ALT_QSPI_DEVSZ_BYTESPERDEVICEPAGE register field.

#define ALT_QSPI_DEVSZ_BYTESPERDEVICEPAGE_MSB   15

The Most Significant Bit (MSB) position of the ALT_QSPI_DEVSZ_BYTESPERDEVICEPAGE register field.

#define ALT_QSPI_DEVSZ_BYTESPERDEVICEPAGE_WIDTH   12

The width in bits of the ALT_QSPI_DEVSZ_BYTESPERDEVICEPAGE register field.

#define ALT_QSPI_DEVSZ_BYTESPERDEVICEPAGE_SET_MSK   0x0000fff0

The mask used to set the ALT_QSPI_DEVSZ_BYTESPERDEVICEPAGE register field value.

#define ALT_QSPI_DEVSZ_BYTESPERDEVICEPAGE_CLR_MSK   0xffff000f

The mask used to clear the ALT_QSPI_DEVSZ_BYTESPERDEVICEPAGE register field value.

#define ALT_QSPI_DEVSZ_BYTESPERDEVICEPAGE_RESET   0x100

The reset value of the ALT_QSPI_DEVSZ_BYTESPERDEVICEPAGE register field.

#define ALT_QSPI_DEVSZ_BYTESPERDEVICEPAGE_GET (   value)    (((value) & 0x0000fff0) >> 4)

Extracts the ALT_QSPI_DEVSZ_BYTESPERDEVICEPAGE field value from a register.

#define ALT_QSPI_DEVSZ_BYTESPERDEVICEPAGE_SET (   value)    (((value) << 4) & 0x0000fff0)

Produces a ALT_QSPI_DEVSZ_BYTESPERDEVICEPAGE register field value suitable for setting the register.

#define ALT_QSPI_DEVSZ_BYTESPERSUBSECTOR_LSB   16

The Least Significant Bit (LSB) position of the ALT_QSPI_DEVSZ_BYTESPERSUBSECTOR register field.

#define ALT_QSPI_DEVSZ_BYTESPERSUBSECTOR_MSB   20

The Most Significant Bit (MSB) position of the ALT_QSPI_DEVSZ_BYTESPERSUBSECTOR register field.

#define ALT_QSPI_DEVSZ_BYTESPERSUBSECTOR_WIDTH   5

The width in bits of the ALT_QSPI_DEVSZ_BYTESPERSUBSECTOR register field.

#define ALT_QSPI_DEVSZ_BYTESPERSUBSECTOR_SET_MSK   0x001f0000

The mask used to set the ALT_QSPI_DEVSZ_BYTESPERSUBSECTOR register field value.

#define ALT_QSPI_DEVSZ_BYTESPERSUBSECTOR_CLR_MSK   0xffe0ffff

The mask used to clear the ALT_QSPI_DEVSZ_BYTESPERSUBSECTOR register field value.

#define ALT_QSPI_DEVSZ_BYTESPERSUBSECTOR_RESET   0x10

The reset value of the ALT_QSPI_DEVSZ_BYTESPERSUBSECTOR register field.

#define ALT_QSPI_DEVSZ_BYTESPERSUBSECTOR_GET (   value)    (((value) & 0x001f0000) >> 16)

Extracts the ALT_QSPI_DEVSZ_BYTESPERSUBSECTOR field value from a register.

#define ALT_QSPI_DEVSZ_BYTESPERSUBSECTOR_SET (   value)    (((value) << 16) & 0x001f0000)

Produces a ALT_QSPI_DEVSZ_BYTESPERSUBSECTOR register field value suitable for setting the register.

#define ALT_QSPI_DEVSZ_OFST   0x14

The byte offset of the ALT_QSPI_DEVSZ register from the beginning of the component.

Typedef Documentation

The typedef declaration for register ALT_QSPI_DEVSZ.