\begin{tabular}{| c | c | l | c | c | p{5cm} |}\hline
\begin{adjustwidth}{-0.3in}{-1in}% adjust the L and R margins by 1 inch
Offset & Size (in bytes) & Name & Access & Value & Description \\\hline
\begin{tabular}{| c | c | l | c | c | p{5cm} |}\hline
0x00 & 0x08 & MAGIC & RO & 0x5344574248454144LL & Magic number used to ensure that there is a valid header present. \\\hline
Offset & Size & Name & Access & Value & Description \\\hline
0x08 & 0x08 & ID\_BLOCK\_ADDR & RO & - & Address of the ID block. See section \ref{id_block} for more information. \\\hline
0x00 & 0x04 & MAGIC & RO & 0x53445742L & Magic number used to ensure that there is a valid header present. \\\hline
0x10 & 0x08 & TLCP\_BLOCK\_ADDR & RO & - & Address of the top-level child pointer block. See section \ref{child_pointer_block} for more information. \\\hline
0x04 & 0x02 & LCSD\_ATTR & RO & - & Attributes field describing various attributes of the LCSD version used. \\\hline
\end{tabular}
0x06 & 0x02 & DEVICE\_COUNT & RO & - & The number of top-level devices. \\\hline
0x08 & 0x08 & ID\_BLOCK\_ADDR & RO & - & Address of the \emph{identification block}. See section \ref{id_block} for more information. \\\hline
0x10 & 0x08 & TLCP\_BLOCK\_ADDR & RO & - & Address of the top-level child pointer block. See section \ref{child_pointer_block} for more information. \\\hline
\end{tabular}
\end{adjustwidth}
\end{table}
\end{table}
\end{savenotes}
\end{savenotes}
\end{center}
\end{center}
\begin{description}
\begin{description}
\item[MAGIC]\hfill\\
\item[MAGIC]\hfill\\
This field contains a unique value that allows software to ensure that
This field contains a unique value that allows software to ensure that
...
@@ -178,128 +187,73 @@ the header contains valid data. If the magic number does not match the
...
@@ -178,128 +187,73 @@ the header contains valid data. If the magic number does not match the
expected value, the software should abort.
expected value, the software should abort.
The magic number in the current version of the specification is expected to
The magic number in the current version of the specification is expected to
be 0x5344574248454144 or the ASCII string "SDWBHEAD" (big-endian) without the
be 0x53445742 or the ASCII string "SDWB" (big-endian) without the
string terminator.
string terminator.
\item[ID\_BLOCK\_ADDR]\hfill\\
\item[LCSD\_ATTR]\hfill\\
This field contains the address of the ID block in the memory space (see Section
This field contains various attributes that allow for identifying the size of
\ref{id_block} for more information).
various blocks that has been used. The bits of this field are described in detail
in Table \ref{hdr_block_attr_struct}.
\item[TLCP\_BLOCK\_ADDR]\hfill\\
This field contains the address of the top level child pointer block (see Section
\ref{tlcp_block} for more information).
\end{description}
\subsubsection{LCSD32 Header Block}
The LCSD32 header block is the one used in a 32 bit address space. The structure
of the LCSD32 header block is described in Table \ref{hdr_block_struct}.
0x08 & 0x04 & ID\_BLOCK\_ADDR & RO & - & Address of the ID block. See section \ref{id_block} for more information. \\\hline
2 - 15 & RESERVED & RO & - & Reserved \\\hline
0x0c & 0x04 & TLCP\_BLOCK\_ADDR & RO & - & Address of the top-level child pointer block. See section \ref{child_pointer_block} for more information. \\\hline
\end{tabular}
\end{tabular}
\end{table}
\end{table}
\end{savenotes}
\end{savenotes}
\end{center}
\end{center}
\begin{description}
\item[DEVICE\_COUNT]\hfill\\
\item[MAGIC]\hfill\\
This field contains the count of top level devices. This is used to determine how
This field contains a unique value that allows software to ensure that
far to read into the TLCP block when discovering devices. The two byte size of this
the header contains valid data. If the magic number does not match the
field allows for up to 65,536 top level child devices to be present.
expected value, the software should abort.
The magic number in the current version of the specification is expected to
be 0x5344574248454144 or the ASCII string "SDWBHEAD" (big-endian) without the
string terminator.
\item[ID\_BLOCK\_ADDR]\hfill\\
\item[ID\_BLOCK\_ADDR]\hfill\\
This field contains the address of the ID block in the memory space (see Section
This field contains the absolute address of the \emph{identification block} in the memory space (see
\ref{id_block} for more information).
Section \ref{id_block} for more information).
\item[TLCP\_BLOCK\_ADDR]\hfill\\
\item[TLCP\_BLOCK\_ADDR]\hfill\\
This field contains the address of the top level child pointer block (see Section
This field contains the absolute address of the top level child pointer block (see
\begin{tabular}{| c | c | l | c | c | p{5cm} |}\hline
\begin{adjustwidth}{-0.4in}{-1in}% adjust the L and R margins by 1 inch
Offset & Size (in bytes) & Name & Access & Value & Description \\\hline
\begin{tabular}{| l | c | l | c | c | p{5cm} |}\hline
0x00 & 0x08 & MAGIC & RO & 0x5344574248454144LL & Magic number used to ensure that there is a valid header present. \\\hline
Offset & Size (in bytes) & Name & Access & Value & Description \\\hline
0x08 & 0x02 & ID\_BLOCK\_ADDR & RO & - & Address of the ID block. See section \ref{id_block} for more information. \\\hline
0x00 & 0x08 & BSTREAM\_TYPE & RO & - & The bitstream type identifier. \\\hline
0x0c & 0x02 & TLCP\_BLOCK\_ADDR & RO & - & Address of the top-level child pointer block. See section \ref{child_pointer_block} for more information. \\\hline
0x08 & 0x04 & BSTREAM\_VERSION & RO & - & The version of the specific bitstream. \\\hline
The device ID of the Wishbone device. Together with the vendor ID, the
The device ID of the device. Together with the vendor ID, the
device ID may be used to match device drivers. The format can be specified
device ID may be used to match device drivers. The format can be specified
in any way by a vendor as the software reading this field will be
in any way by a vendor as the software reading this field will be
specific to each vendor (selected based on the metadata stored in the
specific to each vendor.
parent board) and is expected to know how to decode this field.
\item[WBD\_MAGIC (Offset: 0x0C)]\hfill\\
\item[LCSD\_MAGIC]\hfill\\
This is a unique value used to identify a valid Wishbone device structure. If
This is a unique value used to identify a valid device descriptor. If
an invalid magic value is found, it is assumed that there are no more devices
an invalid magic value is found, that device is ignored.
to be discovered and the auto-discovery is ended. Thus, it is used as the array
terminator for the Wishbone device block.
The magic number in all versions of the specification can be expected to
The magic number in all versions of the specification can be expected to
be 0x5742 or the ASCII string "WB" without the string terminator.
be 0x5742 or the ASCII string "WB" without the string terminator.
\item[WBD\_VER\_MAJOR (Offset: 0x0E)]\hfill\\
\item[LCSD\_VER\_MAJOR]\hfill\\
The major version of the device descriptor format. This field is incompatible
The major version of the device descriptor format. This field is incompatible
between versions. This means that a change in the descriptor structure itself
between versions. This means that a change in the descriptor structure itself
leads to an increase in the major version. An example of a major version change
leads to an increase in the major version. An example of a major version change
is the extension of HDL\_BASE and HDL\_SIZE to 16 bytes (128 bits).
is the extension of HDL\_BASE and HDL\_SIZE to 16 bytes (128 bits).
\item[WBD\_VER\_MINOR (Offset: 0x0F)]\hfill\\
\item[LCSD\_VER\_MINOR]\hfill\\
The minor version of the device descriptor format. This field is compatible
The minor version of the device descriptor format. This field is compatible
between versions. This means that a change only in the minor number means the
between versions. This means that a change only in the minor number means the
structure is preserved. An example of a minor version change is the addition
structure is preserved. An example of a minor version change is the addition
of a new flag in the WBD\_FLAGS field.
of a new flag in the DEVICE\_FLAGS field.
\item[HDL\_BASE (Offset: 0x10)]\hfill\\
\item[DEVICE\_OFFSET]\hfill\\
This field contains the base address of the Wishbone device.
This field contains the offset of the start of the device descriptor within
The software reading this field should know what address width to expect.
the address space of the device. This can be an internal offset, in which
case the offset is subtracted from the address of the descriptor to get the
base address of the device. It may also be an external offset, in which
case the offset is added to the address of the device descriptor to get the
base address of the device. The type is specified by the INTERNAL\_OFFSET
flag in the DEVICE\_FLAGS register.
\item[HDL\_SIZE (Offset: 0x18)]\hfill\\
\item[DEVICE\_FLAGS]\hfill\\
This field contains device specific flags. The structure is given below in
table \ref{dev_flags}.
\begin{center}
\begin{savenotes}
\begin{table}[!ht]\footnotesize
\caption{LCSD64 device flags field structure}\label{dev_flags}\centering
\begin{tabular}{| c | l | c | c | p{5cm} |}\hline
Bits & Name & Access & Value & Description \\\hline
0 & EXTERNAL\_OFFSET & RO &\vtop{\hbox{\strut 0 = Internal}\hbox{\strut 1 = External}}& Specified whether the offset provided in the DEVICE\_OFFSET field is internal of external. \\\hline
1 & ENDIAN & RO &\vtop{\hbox{\strut 0 = Big Endian}\hbox{\strut 1 = Little Endian}}& Specifies the endianness of the address range of this device. \\\hline
2 & IGNORE & RO &\vtop{\hbox{\strut 0 = Use this descriptor}\hbox{\strut 1 = Ignore descriptor}}& Specifies whether the device should be considered to be present or not. \\\hline