instruction format
In the Hydra book on page 188 and 189 it shows all the instructions in binary form for the most part. One thing I noticed is that in the execution·condition field of the instruction for all instructions except NOP is 1111 which means always. So other than NOP there are no other instructions that do not use the default value for this field. Are there more instructions that do use this field but are not listed in the table in the hydra book? A second thought I had was that maybe it was up to the programmer to set these bits for whatever reason, but that really wouldn't make any sense since unless there is an optional parameter to the instructions there is no way to modify them. So the only conclusion that I can come up with is that future versions of the propellor chip will have expanded instruction set taking advantage of this field?
Comments
Think about it. If you wanted a computer with conditional execution, you would want to apply it to all instructions. You wouldn't want useful instructions to not respond to the condition. You wouldn't be able to use them in some instruction sequences.
I guess I need to get further along in my study of the assembly code to understand the conditional field for the instructions.
The concept of a conditional field is actually quite simple. In most computers, different branches of execution are usually done with jump instructions. Sometimes jump instructions are implicitly conditional on something (like the TJZ/TJNZ or DJNZ instructions in the Propeller). Sometimes there's an explicit condition that applies only to a jump instruction (like in the Intel 8x86 instruction set). In the Propeller, the condition field exists (and is applied) in all instructions. The main reason is for timing control. In many processors, it's important for things to be as fast as possible, so the number of instructions in each execution branch should be as small as possible and it's not important if the times vary. In the kind of applications that the Propeller is intended for (bit level control of simple hardware), the exact time spent in a loop may be very important regardless of the decisions made in the loop. By using conditional execution, both branches in a two-way decision can be combined with one being executed and the other treated as NOPs. The total time is always the same regardless of the decision made. This can be done in other ways (like adding NOP instructions to the shorter branch), but is easier with conditional instruction execution.