Download presentation
Presentation is loading. Please wait.
Published byPaula Lester Modified over 8 years ago
1
CDA 4253 FPGA System Design PicoBlaze Interface Hao Zheng Comp Sci & Eng U of South Florida
2
2 Required Reading P. Chu, FPGA Prototyping by VHDL Examples Chapter 16, PicoBlaze I/O Interface Chapter 17, PicoBlaze Interrupt Interface Xilinx PicoBlaze User Guide (UG 129) Chapter 4 & 6
3
Output Instructions OUTPUT sX, KKPORT_ID <= KKdirect OUT_PORT <= sX OUTPUT sX, (sY)PORT_ID <= sYindirect OUTPUT <= sX 3 write_strobe is asserted in the 2 nd cycle of an output instruction.
4
Output Instructions: Timing Diagram 4
5
5 Output Decoding of Four Output Registers
6
6 Decoder Logic The decoder logic can be saved by using one-hot codes for port_id if the output ports are smaller than 8.
7
7 Timing Diagram of an Output Instruction output s0, 02
8
8 Simple Address Decoding for Designs with <8 Output Components
9
Input Instructions INPUT sX, KKPORT_ID <= KKdirect sX <= IN_PORT INPUT sX, (sY)PORT_ID <= sYindirect sX <= IN_PORT 9
10
10 Input Instructions: Timing Diagram
11
11 Four Continuous-Access Ports
12
12
13
13 Interrupt Flow 1.An interrupt occurs 2.Implicitly jump to 3FF 3.Execute jump isr 4.Execute interrupt service routine (ISR) at isr 5.execute returni enable at the end of ISR. 6.Resume the normal operation
14
14 Timing Diagram of an Interrupt Event
15
15
16
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; 16
17
17 Interrupt Interface with a Single Event interrupt should hold high until interrupt_ack is asserted.
18
18 Interrupt Interface with Two Requests ISR reads in_port[1:0], decides which request should be served, and generate correct signal to clear the corresponding interrupt request FF.
19
19 Time-Multiplexed Seven Segment Display
20
20 Time-Multiplexing Circuit
21
21 Multiplexing Circuit Based on PicoBlaze mod-500 generates an interrupt every 5us. ISR loads sseg[6:0] from memory and generates corresponding port ID for an[3:0].
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.