Xilinx MicroBlaze Reference Manual page 206

32-bit soft processor
Hide thumbs Also See for MicroBlaze:
Table of Contents

Advertisement

clz
Count Leading Zeros
clz
rD, rA
1 0 0 1 0 0
0
6
Description
This instruction counts the number of leading zeros in register rA starting from the most significant
bit. The result is a number between 0 and 32, stored in register rD.
The result in rD is 32 when rA is 0, and it is 0 if rA is 0xFFFFFFFF.
Pseudocode
n
0
while (rA)[n] = 0
n
n + 1
(rD)
n
Registers Altered
rD
Latency
1 cycle
Notes
This instruction is only available when the parameter C_USE_PCMP_INSTR is set to 1.
MicroBlaze Processor Reference Guide
UG984 (v2016.2) June 8, 2016
UG984 (v2016.1) April 6, 2016
Count leading zeros in rA
rD
rA
1
1
www.xilinx.com
Chapter 5: MicroBlaze Instruction Set Architecture
0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0
1
2
6
1
3
1
206
Send Feedback

Advertisement

Table of Contents
loading

Table of Contents