	  usage.txt   Revision 1.0  1/24/97

* This software was written by Symbios Logic Inc. to develop and test new
* products.  Symbios Logic assumes no liability for its use.  This software is
* released to the public domain to illustrate certain programming techniques
* for the 53c8xx chips in target mode.

Purpose:
There are three main purposes for the 8xxtarg software:
	1. To simulate hard drives that can achieve synchronous transfer rates that
	are faster than any drives currently on the market.  i.e. Ultra2 SCSI.

	2. To remove all mechanical latencies normally associated with hard drives
	so that initiator code can be tested for peak performance.

	3. To provide programmers with sample target code to aid in development of
	target applications using Symbios Logic PCI chips.

System Considerations:
The system that the RAM disk runs on has a direct impact on the performance of
the SCSI bus.  A fast motherboard and PCI chipset is recommended for best
operation.  The current test system used by Symbios Logic is as follows:
	PCI chipset:		 Intel Triton chipset.
	PCI bus clock:		 33 MHz
	System RAM:			 128 Mbytes
	Processor:			 100 MHz Pentium
	PCI latency timer: 80h

The latency timer value and the Triton chipset allow us to achieve zero wait
state operation on most memory writes, and only a short, initial delay on
memory reads.

Operation:

Initialization:
The 8xxtarg software starts by asking the user to input the desired logical
block size for the drive.  Standard hard drives use a block size of 512 bytes,
but any of the listed values are legal.  However, most host adapters will
require a separate driver to work with drives that have non-512 byte logical
blocks.

The software will then report the size of the RAM disk.  This will be about
1 megabyte less than the amount of memory in the system.  If this section
reports a number of bytes that is far too large, and a negative number of
megabytes, then emm386 or some other memory manager is probably running in the
system.  This will need to be disabled before the Ram disk will work properly.
If the number is very close to 64 meg, then the software will ask the user to
input the total amount of memory in the system.  This is because the system
will not report memory over 64 meg.

The next prompt will be for the size of the disk cache.  The disk cache size
determines when the RAM disk will perform a disconnect, or when it will send a
save pointers message, if disconnects are not allowed.  The maximum value that
is allowed is 1024Kbytes, or 1 meg.  The general idea is this, if lots of
disconnects are wanted, then a small value should be input, if not, then a
large number should be input.  A standard value that I use is 512Kbytes.

At this point, the software scans all devices on the PCI bus and finds all
devices that have the Symbios Logic device ID.  A list of all available devices
and what types they are is then printed to the screen.  The user should then
select which device will be acting as the RAM disk controller.

The user is then prompted to input the frequency of the SCSI clock in megahertz.
If the chip supports a clock doubler or quadrupler, and the clock speed isn't
too high, the user is asked if this feature should be enabled.

If the selected chip supports a 16-bit SCSI bus, then the user is asked if the
bus the chip is connected to is 16-bit or 8-bit.

The software then asks the user what SCSI ID the RAM disk should use.  The
valid range is 0-7 for 8-bit busses, and 0-15 for 16-bit busses.

If the selected chip has internal SCRIPTS RAM, then the program attempts to
move the SCRIPTS code into the internal RAM.  The user is informed if this
operation was successful or not.

At this point, the initialization is done.  The program will start SCRIPTS
running, print out the user menu, and wait for either an interrupt or user
input.

Menu Options:
Selecting any of the menu options presented will halt the SCRIPTS processor
after completion of the current SCSI sequence.  If SCSI transfers are taking
place when an option is selected, then the chip will respond to selection but
do nothing else until the menu function completes.  Some initiators will see
this as an error if too much time elapses between the selection and the
beginning of the SCSI sequence.  For this reason, it is not recommended that
these options be used while any activity is on the SCSI bus.

Two of the below listed options will change the state of the RAM disk with
respect to the SCSI bus, and several others can do so.  In these cases, the
initiator should be reset for proper operation.

The following menu options are available to the user:
	1. Alter disk cache size:  This option allows the user to change the cache
	size described above.

	2. Save RAM disk to hard drive:  This option allows the user to save the
	current contents of the RAM disk to a regular hard drive on the target
	system for future use.  The user will be prompted for a complete path and
	file name.  The user is informed whether the operation was successful or not.

	3. Restore RAM disk from hard drive:  This option allows the user to restore
	a previously saved RAM disk to memory.  The user will be prompted for a
	complete path and file name.  The user is informed whether the operation
	was successful or not.

	4. Print a logical block to the screen:  This option allows the user to view
	any logical block residing on the RAM disk.  The user is prompted for a
	logical block address, and the contents of the logical block are printed to
	the screen.

	5. Modify a logical block:  This option allows the user to modify one or
	more bytes within a logical block on the RAM disk.  The user is asked for
	the logical block address, and how many bytes to modify.  If only one byte
	is to be modified, the user is asked for the new byte.  If more than one
	byte is to be modified, the user is asked for a starting value, and a value
	by which to increment each byte thereafter.  This can be used to fill the
	block with a known pattern.

	6. Read a chip register:  This option allows the user to read the value of
	any chip register.  The user is asked for the register offset.  The value in
	the register is printed to the screen.  Note:  Only an 8-bit value is
	returned, to view larger registers, multiple accesses are required.

	7. Modify a chip register:  This option allows the user to modify any
	read/write chip register.  The user is asked for the register offset, and
	the current contents of the register are printed to the screen.  The user is
	then asked for the new value. Note:  no error checking is done to see if the
	register can be written to or if the value is valid for the particular
	register.  Also, only an 8-bit value can be written, to write a larger
	register, multiple accesses are required.

	8. Read a PCI configuration register:  This option allows the user to read
	the value of  any PCI configuration register.  The user is asked for the
	register offset.  The value in the register is printed to the screen.
	Note:  Only an 8-bit value is returned, to view larger registers, multiple
	accesses are required.

	9. Modify a PCI configuration register:  This option allows the user to
	modify any read/write PCI configuration register.  The user is asked for the
	register offset, and the current contents of the register are printed to the
	screen.  The user is then asked for the new value.
	Note:  no error checking is done to see if the register can be written to or
	if the value is valid for the particular register.  Also, only an 8-bit
	value can be written, to write a larger register, multiple accesses are
	required.

	I. Change SCSI ID:  This option allows the user to change the current SCSI
	ID for the RAM disk.  The current ID is printed and the user is prompted for
	the new ID.

	Q. Quit:  This option quits the program and returns to DOS.

