ECE 448 – FPGA and ASIC Design with VHDL Lecture 12 PicoBlaze Overview.

Slides:



Advertisements
Similar presentations
Lecture 16 PicoBlaze Instruction Set & Assembler Directives
Advertisements

Parul Polytechnic Institute
Processor System Architecture
PicoBlaze CPLD Microcontroller
TK 2633 Microprocessor & Interfacing
TK 2633 Microprocessor & Interfacing Lecture 3: Introduction to 8085 Assembly Language Programming (2) 1 Prepared By: Associate Prof. Dr Masri Ayob.
Midterm Wednesday Chapter 1-3: Number /character representation and conversion Number arithmetic Combinational logic elements and design (DeMorgan’s Law)
Room: E-3-31 Phone: Dr Masri Ayob TK 2633 Microprocessor & Interfacing Lecture 1: Introduction to 8085 Assembly Language.
Number One Tom Bozic Ian Nuber Greg Ramsey Henry Romero Matt Unangst.
Overview The von Neumann Machine - the programmable digital computer Introducing the LC-3 Computer - A “toy” computer for us to learn from Computer machine.
State Machines Used to Design Sequential Circuits.
ECE 448 – FPGA and ASIC Design with VHDL Lecture 13 PicoBlaze I/O & Interrupt Interface.
created by :Gaurav Shrivastava
© 2003 Xilinx, Inc. All Rights Reserved Advanced Features.
Processor Design ELEC 418 Advanced Digital Systems Dr. Ron Hayne Images Courtesy of Thomson Engineering.
Microprocessor Dr. Rabie A. Ramadan Al-Azhar University Lecture 7.
ECE 448 – FPGA and ASIC Design with VHDL Lecture 12 PicoBlaze Overview.
The FPX KCPSM Module Exercise 1 Henry Fu The FPX KCPSM Module Exercise: Network Data Encryption / Decryption Using ROT13 Algorithm Henry Fu Washington.
Execution of an instruction
Lecture 14 Today’s topics MARIE Architecture Registers Buses
ECE 448 – FPGA and ASIC Design with VHDL George Mason University Lab 1 Introduction to Aldec Active HDL Implementing Combinational Logic in VHDL.
ECE 448 – FPGA and ASIC Design with VHDL Lecture 19 PicoBlaze Interrupt Interface & Assembly Code Development.
Digital Computer Concept and Practice Copyright ©2012 by Jaejin Lee Control Unit.
CDA 4253 FPGA System Design PicoBlaze Instruction Set Hao Zheng Comp Sci & Eng U of South Florida.
CDA 4253 FPGA System Design The PicoBlaze Microcontroller
ECE 448: Lab 6 Using PicoBlaze Fast Sorting. Part 1: Introduction to Lab 6 Part 2: Instruction Set of PicoBlaze-6 Part 3: Hands-on Session: OpenPICIDE.
Picoblaze Overview EENG Introduction 8-bit microcontroller for Xilinx devices Soft Core – Soft Processor 5% of the resources of spartan 3 (3S200.
Lecture 13 PicoBlaze I/O & Interrupt Interface Example of Assembly Language Routine ECE 448 – FPGA and ASIC Design with VHDL.
ECE 447 Fall 2009 Lecture 4: TI MSP430 Architecture and Instruction Set.
ECE 447: Lecture 11 Introduction to Programming in Assembly Language.
MICROPROCESSOR DETAILS 1 Updated April 2011 ©Paul R. Godin prgodin gmail.com.
1 Basic Processor Architecture. 2 Building Blocks of Processor Systems CPU.
Digital Computer Concept and Practice Copyright ©2012 by Jaejin Lee Control Unit.
CDA 4253 FPGA System Design PicoBlaze Interface Hao Zheng Comp Sci & Eng U of South Florida.
CDA 4253 FPGA System Design PicoBlaze Interface Hao Zheng Comp Sci & Eng U of South Florida.
Unit Microprocessor.
Implementing Combinational
Lecture 18 PicoBlaze Instruction Set & Assembler Directives
COURSE OUTCOMES OF Microprocessor and programming
ELEC 418 Advanced Digital Systems Dr. Ron Hayne
Control Unit Lecture 6.
Gunjeet Kaur Dronacharya Group of institutions
Assembly Language Programming of 8085
Microprocessor T. Y. B. Sc..
3.Instruction Set of 8085 Consists of 74 operation codes, e.g. MOV
Lecture 15 PicoBlaze Overview
Introduction of microprocessor
Advisor: Prof. Gandhi Puvvada
Lecture 14 PicoBlaze Overview
Number Representations and Basic Processor Architecture
CS/COE0447 Computer Organization & Assembly Language
Lecture 16 PicoBlaze I/O & Interrupt Interface
CSCE 212 Chapter 5 The Processor: Datapath and Control
Lecture 16 PicoBlaze Overview
Introduction to ModelSim Implementing Sequential
Advisor: Prof. Gandhi Puvvada
Lecture 18 PicoBlaze I/O Interface
CS/COE0447 Computer Organization & Assembly Language
ECE 448: Lab 6 Using PicoBlaze Fast Sorting Class Exercise 2.
Review of Aldec Active HDL Implementing Combinational
Chapter 1 Introduction.
Lecture 13 PicoBlaze I/O & Interrupt Interface
Unit 12 CPU Design & Programming
Lecture 15 PicoBlaze I/O & Interrupt Interface
Lecture 13 PicoBlaze I/O & Interrupt Interface
Lecture 17 PicoBlaze I/O & Interrupt Interface
Lecture 14 PicoBlaze Instruction Set
CS/COE0447 Computer Organization & Assembly Language
Computer Architecture Assembly Language
CS/COE0447 Computer Organization & Assembly Language
Presentation transcript:

ECE 448 – FPGA and ASIC Design with VHDL Lecture 12 PicoBlaze Overview

2 ECE 448 – FPGA and ASIC Design with VHDL Required reading P. Chu, FPGA Prototyping by VHDL Examples Chapter 14, PicoBlaze Overview Chapter 15, PicoBlaze Assembly Code Development Recommended reading PicoBlaze 8-bit Embedded Microcontroller User Guide for Spartan-3, Virtex-II, and Virtex-II Pro FPGAs (search for it using Google or Xilinx website documentation search)

3 Block diagram of a Single-Purpose Processor (FSMD – Finite State Machine with Datapath) ECE 448 – FPGA and ASIC Design with VHDL ctrl

4 Block diagram of a General-Purpose Processor (Microcontroller) ECE 448 – FPGA and ASIC Design with VHDL

5 PicoBlaze

PicoBlaze Overview

Register File of PicoBlaze Address Registers 8-bit 70 F s0 s1 s2 s3 s4 s5 s6 s sf

Definition of Flags Z = 1 if result = 0 0 otherwise Zero flag - Z zero condition Example* C = 1 if result > or result < 0 0 otherwise *Applies only to addition or subtraction related instructions, refer to following slides otherwise Carry flag - C overflow, underflow, or various conditions Flags are set or reset after ALU operations

9 Interface of PicoBlaze ECE 448 – FPGA and ASIC Design with VHDL KCPSM = constant (K) coded programmable state machine

10 Interface of PicoBlaze ECE 448 – FPGA and ASIC Design with VHDL NameDirectionSizeFunction clkinput1System clock signal. resetinput1Reset signal. addressoutput10Address of the instruction memory. Specifies address of the instruction to be retrieved. instructioninput18Fetched instruction. port_idoutput8Address of the input or output port. in_portinput8Input data from I/O peripherals. read_strobeoutput1Strobe associated with the input operation. out_portoutput8Output data to I/O peripherals. write_strobeoutput1Strobe associated with the output operation. interruptinput1Interrupt request from I/O peripherals. interrupt_ackoutput1Interrupt acknowledgment to I/O peripherals

11 ECE 448 – FPGA and ASIC Design with VHDL Development Flow of a System with PicoBlaze

12 PicoBlaze Programming Model ECE 448 – FPGA and ASIC Design with VHDL

Syntax and Terminology Syntax Example Definition sX KK PORT(KK) PORT((sX)) RAM(KK) s7 ab PORT(2) PORT((sa)) RAM(4) Value at register 7 Value ab (in hex) Input value from port 2 Input value from port specified by register a Value from RAM location 4

Addressing modes Direct mode INPUT s5, 2a ADD sa, sf PORT(2a)  s5 sa + sf  sa Indirect mode INPUT s9, (s2) STORE s3, (sa) PORT((s2))  s9 s3  RAM((sa)) s C  s2 s7 – 7  s7 Immediate mode ADDCY s2, 08 SUB s7, 7

PicoBlaze ALU Instruction Set Summary (1)

PicoBlaze ALU Instruction Set Summary (2)

PicoBlaze ALU Instruction Set Summary (3)

Logic instructions 1.AND AND sX, sY sX and sY => sX AND sX, KK sX and KK => sX 2. OR OR sX, sY sX or sY => sX OR sX, KK sX or KK => sX 3. XOR XOR sX, sY sX xor sY => sX XOR sX, KK sX xor KK => sX IMM, DIR C Z IMM, DIR 0 0 0

Arithmetic Instructions (1) Addition ADD sX, sY sX + sY => sX ADD sX, KK sX + KK => sX ADDCY sX, sY sX + sY + CARRY => sX ADDCY sX, KK sX + KK + CARRY => sX IMM, DIR C Z

Arithmetic Instructions (2) Subtraction SUB sX, sY sX – sY => sX SUB sX, KK sX – KK => sX SUBCY sX, sY sX – sY – CARRY => sX SUBCY sX, KK sX – KK – CARRY => sX IMM, DIR C Z

Test and Compare Instructions TEST TEST sX, sY sX and sY => none TEST sX, KK sX and KK => none COMPARE COMPARE sX, sY sX – sY => none COMPARE sX, KK sX – KK => none C Z IMM, DIR C = odd parity of the result

Data Movement Instructions (1) LOAD LOAD sX, sY sY => sX LOAD sX, KK KK => sX IMM, DIR C Z -

FETCH FETCH sX, KK RAM(KK) => sX FETCH sX, (sY) RAM((sY)) => sX Data Movement Instructions (2) DIR, IND C Z - STORE STORE sX, KK sX => RAM(KK) STORE sX, (sY) sX => RAM((sY)) DIR, IND -

Data Movement Instructions (3) INPUT INPUT sX, KK sX <= PORT(KK) INPUT sX, (sY) sX <= PORT((sY)) OUTPUT OUTPUT sX, KK PORT(KK) <= sX OUTPUT sX, (sY) PORT((sY)) <= sX DIR, IND C Z -

Edit instructions - Shifts *All shift instructions affect Zero and Carry flags

Edit instructions - Rotations *All rotate instructions affect Zero and Carry flags

Program Flow Control Instructions (1) JUMP AAA PC <= AAA JUMP C, AAA if C=1 then PC <= AAA else PC <= PC + 1 JUMP NC, AAA if C=0 then PC <= AAA else PC <= PC + 1 JUMP Z, AAA if Z=1 then PC <= AAA else PC <= PC + 1 JUMP NZ, AAA if Z=0 then PC <= AAA else PC <= PC + 1

Program Flow Control Instructions (2) CALL AAA TOS <= TOS+1; STACK[TOS] <= PC; PC <= AAA CALL C | Z, AAA if C | Z =1 then TOS <= TOS+1; STACK[TOS] <= PC; PC <= AAA else PC <= PC + 1 CALL NC | NZ, AAA if C | Z =0 then TOS <= TOS+1; STACK[TOS] <= PC; PC <= AAA else PC <= PC + 1

Program Flow Control Instructions (3) RETURN PC <= STACK[TOS] + 1; TOS <= TOS - 1 RETURN C | Z if C | Z =1 then PC <= STACK[TOS] + 1; TOS <= TOS - 1 else PC <= PC + 1 RETURN NC | NZ if C | Z =0 then PC <= STACK[TOS] + 1; TOS <= TOS - 1 else PC <= PC + 1

Subroutine Call Flow

Interrupt Related Instructions RETURNI ENABLE PC <= STACK[TOS] ; TOS <= TOS – 1; I <= 1; C<= PRESERVED C; Z<= PRESERVED Z RETURNI DISABLE PC <= STACK[TOS] ; TOS <= TOS – 1; I <= 0; C<= PRESERVED C; Z<= PRESERVED Z ENABLE INTERRUPT I <=1; DISABLE INTERRUPT I <=0;

Interrupt Flow ECE 448 – FPGA and ASIC Design with VHDL

33 PicoBlaze Development Environments ECE 448 – FPGA and ASIC Design with VHDL

34 KCPSM3 Assembler Files ECE 448 – FPGA and ASIC Design with VHDL

35 Directives of Assembly Language ECE 448 – FPGA and ASIC Design with VHDL Equating symbolic name for an I/O port ID. keyboard DSIN $0E switch DSIN $0F LED DSOUT $15 N/A

36 Differences between Mnemonics of Instructions ECE 448 – FPGA and ASIC Design with VHDL

37 Differences between Mnemonics of Instructions ECE 448 – FPGA and ASIC Design with VHDL

38 Differences between Programs ECE 448 – FPGA and ASIC Design with VHDL