Download
slide1 n.
Skip this Video
Loading SlideShow in 5 Seconds..
Experiment 2 PIC Program Execution & Built-In Self-Test PowerPoint Presentation
Download Presentation
Experiment 2 PIC Program Execution & Built-In Self-Test

Experiment 2 PIC Program Execution & Built-In Self-Test

123 Views Download Presentation
Download Presentation

Experiment 2 PIC Program Execution & Built-In Self-Test

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

  1. Experiment 2 PIC Program Execution & Built-In Self-Test

  2. Basic Experiment

  3. Additional Functionality Use the current instruction set from Lab 1 with additional functionality to execute a cycle accurate PIC program out of Instruction Memory. Need to add the idea of sequential logic to the design with a clock. PIC instructions are executed on a single clock cycle, this includes: 1) Performing the operation 2) Storing the result Lab 1 only performed the operation – need to store result from R output of ALU into the appropriate register (either W or in the register file RF) before the next program instruction clock cycle. Must decode destination address to determine appropriate storage location

  4. Additional Functionality Cont. Three additional functions – related to moving and storing registers: 1) MOVLW – Move Literal to Working Register (W) 12 bit Opcode: “1100 kkkk kkkk”, where “kkkkkkkk” is the value to write to the W Register. 2) MOVWF – Move W to one of the Memory Registers (MR) in the Register File 12 bit Opcode: “0000 001f ffff”, where “fffff” is the address of the register to write to. 3) MOVF – Move from MR to W 12 bit Opcode: “0010 00df ffff”, where “fffff” is the address of the register whose contents are to be written to W, IF d is ‘0’. The d = ‘1’ case will not be used.

  5. Dout Current instruction ROM Addr In Clock 8 Program Sequencer ALU W W Load_W_en 8 ? Dest Decode dest addr R Load_R_en[31:0] R0 R1 R2 . . . R31 RF Clock 8 Register File Lab 2 Block Diagram

  6. Extra Credit Assignment

  7. Bonus: BILBO Implementation(Built In Logic Block Observer) Implement registers as BILBOs with added abilities: BILBO Block Diagram Offers four separate functionalities, depending on the values of (B1,B2): 1) Serial Scan Mode (0,0) 2) Pattern Generator (0,1) 3) Normal Mode (1,0) 4) MISR – Multiple Input Signature Register (1,1)

  8. Example BILBO Usage • SI – Scan In • SO – Scan Out • Characteristic polynomial: 1 + x + … + xn • CUTs A and C: BILBO1 is MISR, BILBO2 is LFSR • CUT B: BILBO1 is LFSR, BILBO2 is MISR

  9. BILBO Serial Scan Mode • B1 B2 = “00” • Dark lines show enabled data paths

  10. BILBO LFSR Pattern Generator Mode • B1 B2 = “01”

  11. BILBO in D FF (Normal) Mode • B1 B2 = “10”

  12. BILBO in MISR Mode • B1 B2 = “11”