Download Laboratory Manual - Brown University
Transcript
The Letter Series Lab D separate data and program memories and the program memory is filled through a JTAG serial port, more or less the way this lab uses a parallel bus to load the SRAM. The SRAM here acts as both program and data memory. Many larger microcontrollers and microprocessors use external SRAM or SDRAM for program and data but time share a single port for input output and program operation. In use that gives similar latency considerations as the dual port system. Table D‐V: Full Instruction Opcodes and ALU function bus values Mnemonic ‐ assembly language ADD[c] Rn, Ra, Rb SUB[c] Rn, Ra, Rb CMP[c] Ra, Rb CLR[c] Rn INC[c] Rn, Rb DEC[c] Rn, Rb AND[c] Rn, Ra, Rb ORR[c] Rn, Ra, Rb XOR[c] Rn, Ra, Rb XNOR[c] Rn, Ra, Rb ASR[c] Rn, Rb LSR[c] Rn, Rb IR[15} 0 0 0 0 0 0 0 0 0 0 0 0 Opcode 0000 0001 1101 0011 1100 0010 1000 1001 1010 1011 0100 0101 ALU funct(5:0) 010000 010100 010100 001100 110000 100000 010010 010110 011010 011110 000011 000111 LSL[c] Rn, Rb ROTR[c] Rn, Rb MOV[c] Rn, Rb LDR[c] Rn, (Rb) STR[c] Ra, (Rb) 0 0 0 1 1 0110 0111 1111 0100 0111 001011 001111 001000 001000 011100 LDIMMH Rn, <8‐bit imm> 1 0101 001000 LDIMML Rn, <8‐bit imm> JMP[c] (Rb) 1 1 0110 1010 001000 001000 JSR[c] Rn, (Rb) 1 1110 001000 BRI[c] <6‐bit imm. Signed> HALT NOP 1 1 1 0010 1111 0000 001000 001000 001000 Action Add Subtract Compare (Subtract but do not store result) Clear register Increment Decrement Bitwise AND Bitwise OR Bitwise XOR Bitwised XNOR Arithmetic shift right Logical shift right, fill with 0 Logical shift left, fill with 0, carry original msb out Rotate right Move (copy) Load register from memory Store register into memory Load high byte with 8‐bit immediate Load low byte with 8‐bit immediate Jump to address Jump to address but store current PC in Rn Branch immediately by adding 6‐bit signed number to next PC address Stop Do nothing for a cycle Table D-V shows the full instruction set as I designed it. My intention eventually is to let students get more credit if their lab implements more of the instructions. My other dream is to give credit ENGN1630 Lab Manual Fall 2015 112