R

Appendix : PicoBlaze Instruction Set and Event Reference

OUTPUT sX, Operand — Write Register sX Value to OUT_PORT, Set PORT_ID to Operand

The OUTPUT instruction sets the PORT_ID port address to the value specified by either the register sY or the immediate constant kk. The instruction writes the contents of register sX to the OUT_PORT output port. FPGA logic captures the output value by decoding the PORT_ID value and WRITE_STROBE output, as shown in Figure C-7.

FPGA Logic

PicoBlaze Microcontroller

Register sX

8

OUT_PORT[7:0]

m

 

D

Q

WRITE_STROBE

EN

Register sY or Literal kk

8

PORT_ID[7:0]

n

UG129_c6_05_052004

Figure C-7:OUTPUT Operation and FPGA Interface Logic

Examples

OUTPUT sX, sY ; Write register sX to OUT_PORT, set PORT_ID to the ; contents of sY

OUTPUT sX, kk ; Write register sX to OUT_PORT, set PORT_ID to the ; immediate constant kk

Pseudocode

PORT_ID Å Operand

OUT_PORT Å sX

PC Å PC + 1

Registers/Flags Altered

Registers: PC

Flags: None

Notes

pBlazIDE Equivalent: OUT

The WRITE_STROBE output is asserted during the second CLK cycle of the two-cycle OUTPUT operation.

104

www.xilinx.com

PicoBlaze 8-bit Embedded Microcontroller

 

 

UG129 (v1.1.2) June 24, 2008

Page 104
Image 104
Xilinx UG129 manual Figure C-7OUTPUT Operation and Fpga Interface Logic