Hardware description
Parameters:
Data
: Data of type
unsigned 8
, containing a byte of data to write to the packet.
ResultPtr
: Pointer to data of type
unsigned 1
. Returns 1 (failure) or 0
(success).
Timing:
1 or 6 clock cycles alternately. This is because the macro writes a byte at a time,
but Ethernet accesses are 16-bit. When a byte of data is already buffered on the
chip the write only takes 1 clock cycle.
Timing may differ if other accesses to the chip precede a write operation.
Description:
Writes a single byte of data to a packet.
Returns
ResultPtr
= 1 to indicate an error if the expected number of bytes have
already been written to the packet, or if there is no write in progress.
Data is written a byte at a time, but communications with the Ethernet chip are
16-bit, so a byte is buffered in the Ethernet data structure, until there are 16 bits to
write.
You must call
RC200EthernetWriteBegin()
before this macro.
Completing the write process
extern macro proc RC200EthernetWriteEnd (
StatusPtr
,
ResultPtr
);
Parameters:
StatusPtr
: Pointer to data of type
unsigned 16
. Returns the status data from
the transmitted packet.
ResultPtr
: Pointer to data of type
unsigned 1
. Returns 1 (failure – packet has
not been transmitted) or 0 (success).
Timing:
45 clock cycles to 5ms (timeout), depending on speed of response of Ethernet
device.
Description:
Completes the process of writing a packet, by commanding the Ethernet device to
send it onto the network and waiting for completion or timeout.
You must call this macro after all the data has been written to a packet.
5.17 Reconfiguring the FPGA
extern macro proc RC200Reconfigure (
ImageAddress
);
Parameters:
ImageAddress
: Data of type
unsigned 16
, specifying the block address to start
accessing the SmartMedia card at for reconfiguration.
Timing:
If reconfiguration is success, the macro does not return.
Description:
This macro reconfigures the FPGA from the SmartMedia.
You must run it in parallel with
RC200CPLDRun()
, and after calling
RC200CPLDEnable()
. It checks if a SmartMedia card is present, and if it is, it
writes the SmartMedia block address to two CPLD registers, and then reads from
another CPLD register which causes the CPLD to reconfigure the FPGA from that
address. The address is passed in as a logical address, which is the physical
address on the Smar 1. This allows for the CIS (Card Information
Structure) block. If no SmartMedia card is present, the macro returns, otherwise it
enters a loop until the FPGA is reconfigured.
www.celoxica.com
Page 68