Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Richard Neill
committed
Jan 19, 2011
1 parent
22096bb
commit 2e5a31f
Showing
2 changed files
with
51 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,43 @@ | ||
The raw format of the pulseblaster executable is a sequence of 10-byte "VLIW" instructions. | ||
These are generated by pb_asm, and documented in pb_utils/doc/raw.txt. | ||
(These are normally generated by the separate tool pb_asm, part of pb_utils). | ||
|
||
Consider the following VLIW instruction: | ||
|
||
#OUTPUT OPCODE ARG LENGTH | ||
0xffeedd CALL 0x88776 0xccbbaa99 | ||
|
||
The assembler, pb_asm does the following: | ||
|
||
- Opcodes are converted from strings to numbers (as defined in pulseblaster.h) | ||
[In this case, CALL = 0x4 ] | ||
|
||
- Lengths are corrected, eg subtraction of PB_INTERNAL_LATENCY. | ||
[In this example, length becomes 0xccbbaa96 ] | ||
|
||
- The VLIW is is split up into 10 bytes: | ||
|
||
|
||
The bytes are these: | ||
|
||
3 bytes of output | ||
2 1/2 bytes for arg | ||
1/2 byte for opcode | ||
4 bytes for the delay. | ||
|
||
|
||
Thus, we actually get the following series of writes, in this order | ||
|
||
0xff MSB } | ||
0xee } 3 byte output | ||
0xdd LSB } | ||
|
||
0x88 MSB } 2 1/2 bytes of arg | ||
0x77 } | ||
0x64 LSN,OP } most significant nibble = LSN of ARG, least significant nibble = opcode | ||
|
||
0xcc MSB } | ||
0xbb } 4 byte delay length. | ||
0xaa } | ||
0x96 LSB } | ||
|
||
|