02.03.2014 Views

BSP Developer's Guide

BSP Developer's Guide

BSP Developer's Guide

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

VxWorks 5.5<br />

<strong>BSP</strong> Developer’s <strong>Guide</strong><br />

;<br />

;2) xxxInitStart<br />

; This entry point is used to start a new initiator thread or I/O process<br />

; (in SCSI parlance), selecting a target, sending the identify message and<br />

; thus establishing the ITL nexus, and then continuing to follow the SCSI<br />

; protocol as dictated by the SCSI target, which drives the bus; thus,<br />

; transferring the command, data, messages and status. This processing is<br />

; actually done, within the code of the xxxInitContinue entry point. i.e<br />

; if no stopping condition is encountered, execution continues on into the<br />

; next logical entry point.<br />

;<br />

;3) xxxInitContinue<br />

; This entry point resumes a suspended SCSI thread. SCSI threads are<br />

; when futher processing is required by the controller driver and an int<br />

; instruction is executed. However, when the higher level management has<br />

; been worked out, control comes back to a suspended thread and the process<br />

; of cycling through all the SCSI infromation tranfer phases continues. In<br />

; essence, this entry point is the "meat" of an I/O process. The following<br />

; phases are managed by this entry point.<br />

; DATA_OUT<br />

; DATA_IN<br />

; COMMAND<br />

; STATUS<br />

; MSG_OUT<br />

; MSG_IN<br />

; XXX_ILLEGAL_PHASE<br />

;<br />

;4) xxxTgtDisconnect<br />

; Disconnects a target from the SCSI bus. It is the last entry point in<br />

; an I/O process.<br />

;<br />

;<br />

;The description level of the code is close to assembly language and is<br />

;infact the language of the SCRIPTS processor. The assembly code is compiled<br />

;using an NCR compiler which generates opcodes in the form of a static C<br />

;language structure, which is then compiled and loaded into memory.<br />

;<br />

;The opcode is a pair of 32bit words, that allow operations and offsets for<br />

;the SCRIPTS processor. A deailed discussion can be found in the chip's<br />

;programmer's guide. Some of the important instructions and their formats<br />

;are listed below.<br />

;<br />

;block move instruction.<br />

; move from when PHASE_NAME<br />

; ........<br />

;I/O instructions<br />

; set target<br />

; wait DISCONNECT<br />

; wait RESELECT<br />

; select from ,@jump<br />

; .........<br />

;read/write register instructions<br />

; move REG_NAME to SFBR<br />

;SFBR acts like an accumulator allowing branch instructions based on its<br />

;value<br />

; .........<br />

352

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!