Lecture 15 PicoBlaze I/O & Interrupt Interface ECE 448 – FPGA and ASIC Design with VHDL.
Download ReportTranscript Lecture 15 PicoBlaze I/O & Interrupt Interface ECE 448 – FPGA and ASIC Design with VHDL.
Lecture 15 PicoBlaze I/O & Interrupt Interface ECE 448 – FPGA and ASIC Design with VHDL Required reading • P. Chu, FPGA Prototyping by VHDL Examples Chapter 16, PicoBlaze I/O Interface Chapter 17, PicoBlaze Interrupt Interface ECE 448 – FPGA and ASIC Design with VHDL 2 Syntax and Terminology Syntax Example Definition sX s7 Value at register 7 KK ab Value ab (in hex) PORT(KK) PORT(2) PORT((sX)) PORT((s1)) RAM(KK) RAM(4) Input value from port 2 Input value from the port specified by register s1 Value from the RAM location 4 Addressing modes Immediate mode SUB s7, 07 ADDCY s2, 08 s7 – 07 s7 s2 + 08 + C s2 Direct mode ADD sa, sf INPUT s5, 2a sa + sf sa PORT(2a) s5 Indirect mode STORE s3, (sa) s3 RAM((sa)) INPUT s9, (s2) PORT((s2)) s9 Output Decoding of Four Output Registers ECE 448 – FPGA and ASIC Design with VHDL 5 Output Instructions C Z OUTPUT sX, KK DIR −− IND −− PORT(KK) <= sX OUTPUT sX, (sY) PORT((sY)) <= sX Timing Diagram of an Output Instruction ECE 448 – FPGA and ASIC Design with VHDL 7 Truth Table of a Decoding Circuit ECE 448 – FPGA and ASIC Design with VHDL 8 Input Instructions C Z INPUT sX, KK DIR −− IND −− sX <= PORT(KK) INPUT sX, (sY) sX <= PORT((sY)) Block Diagram of Four Continuous-Access Ports ECE 448 – FPGA and ASIC Design with VHDL 10 Timing Diagram of an Input Instruction ECE 448 – FPGA and ASIC Design with VHDL 11 Block Diagram of Four Single-Access Ports ECE 448 – FPGA and ASIC Design with VHDL 12 FIFO Interface clk rst clk rst FIFO din dout 8 8 full write empty read ECE 448 – FPGA and ASIC Design with VHDL 13 Operation of the “Standard” FIFO −−−−− A ECE 448 – FPGA and ASIC Design with VHDL B C D 14 Operation of the First-Word Fall-Through FIFO ECE 448 – FPGA and ASIC Design with VHDL 15 ECE 448 – FPGA and ASIC Design with VHDL 16 Timing Diagram of an Input Instruction ECE 448 – FPGA and ASIC Design with VHDL 17 Interrupt Flow ECE 448 – FPGA and ASIC Design with VHDL 18 Timing Diagram of an Interrupt Event ECE 448 – FPGA and ASIC Design with VHDL 19 ECE 448 – FPGA and ASIC Design with VHDL 20 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 Interface with a Single Event ECE 448 – FPGA and ASIC Design with VHDL 22 Interrupt Interface with Two Requests ECE 448 – FPGA and ASIC Design with VHDL 23