User manual

DSM tutorials
DataBus
Connects the server to the input expression of the flash data bus interface.
StatusBus
Connects the server to the input expression of the flash status bus interface.
CEn
Connects the server to the output expression on the flash chip enable pin.
WEn
Connects the server to the output expression on the flash write enable pin.
OEn
Connects the server to the output expression on the flash output enable pin.
DataOE
Connects the server to the output enable expression on the flash data bus
(enables output from the FPGA/PLD to the device).
Addr
Connects the server to the output expression on the flash address bus.
Data
Connects the server to the output expression on the flash data bus.
ByteEnable
Connects the server to the output expression on the flash byte enable pin.
APIAddress
Shared between the API clients and server, used to communicate the address
for a read or write operation.
APIData
Shared between the API clients and server, used to communicate the Data for
a read or write operation.
APIBlockNumber
Shared between the API clients and server, used to communicate the block
number for a block erase operation.
APICommand
Used by the API clients to send commands to the server.
A single instance of the
Flash structure can be declared, initialized and connected to pins by a call to
the
FlashInit() macro, which is declared as follows:
extern macro proc FlashInit (FlashPtrPtr,
FlashAddrPins,
FlashDataPins,
FlashChipEnablePins,
FlashOutputEnablePin,
FlashWriteEnablePin,
FlashStatusPin,
FlashByteEnablePin,
FlashEraseEnablePin);
The
APICommand channel can take any of three values equivalent to the different operations, these
values are defined using the following macro expressions.
static macro expr FlashAPICommandReadWord = 1<<0;
static macro expr FlashAPICommandWriteWord = 1<<1;
static macro expr FlashAPICommandEraseBlock = 1<<2;
The commands are decoded inside the server with a
switch-case construct. Using the series x=2
n
to
generate values for each branch assists the DK compiler in optimizing away branches that are never
used. This is desirable since a programmer may not use all of the available operations in an application.
The server process has the following skeleton structure:
www.celoxica.com
Page 41