Lecture 7a PicoBlazeIntro

Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 31

Introduccion to Picoblaze

Why Embedded Microprocessor


and not just an FSM?
Micropocessor (a “Programmable “Regular” FSM
FSM”)  Parallel execution
 Sequential execution
 Faster
 Slower
 Better for simple flow
 Better for complex flow diagram

 Better for Large FSM


diagram (but can be used
 Easier to make changes in
for everything)
 More difficult to make
algorithm
changes in algorithm
Introduction
 It is a 8-bit fully embedded
microcontroller
 It has 16 8-bit registers, ALU, 256 I/O
ports, 31-location CALL/RETURN stack
 It also has facility for reset and
interrupt
 Instruction size is 18-bits
KCPSM = Constant(k) Coded
Programmable State Machine
 Constant values are specified for use in the following
aspects of a program:
 Constant data value for use in an ALU operation
 Constant port address to access a specific piece of
information or control logic external to the PicoBlaze module
 Constant address values for controlling the execution
sequence of the program
 Constant Cycles
 All instructions under all conditions execute over two clock
cycles.
 Constant Program Length
 The program length is 1024 instructions
Individual Modules
 Operand Select
 Arithmetic Group
 Logic Group
 Shift and Rotate Group
 ALU Multiplexer
 ALU Control
 Program Counter
 Stack Counter
Structure

3 parts:
• ALU
• Reg file
• Control unit
PicoBlaze System
Port ID
Architecture
In port

Device Out port


Read Strobe
Write Strobe
Address
Interrupt
Instruction Instruction
Reset Memory

Clock
Data
Movement
Instruction
Interrupt PicoBlaze
Port Input
An
Implemented
Example
Port Read Waveform
Port Output

Clock of output Device is the same as CPU clock


Example
Port Write Waveform
Editing PSM file
Compiling
Verifying Compilation
Verifying Compilation
Identifying an error
Verifying Everything is OK
Copy generated verilog file
Copy kcpsm3.v to project
directory
Integration
 We need to integrate the Verilog code
generated by the assembler into the
project
 We’ll see how to do this together in the
in-class activity (it’s not hard!)
Conclusion
 The assembler gives the verilog file for a
program written in the instruction set
 A module of the Program ROM is used together
with the processor’s main module
 Together they define the complete
microcontroller
 Just like the PicoCtrl (Except that with the
PicoCtrl we did the assembly process
manually!)

You might also like