Fix reversed pseudocode for ctz/clz

This commit is contained in:
Luke Wren 2022-08-02 21:21:44 +01:00
parent adf81abfdc
commit 054c4a6a9c
2 changed files with 13 additions and 13 deletions

View File

@ -5,7 +5,7 @@
/Creator (Asciidoctor PDF 2.0.7, based on Prawn 2.4.0)
/Producer (Asciidoctor PDF 2.0.7, based on Prawn 2.4.0)
/ModDate (D:20220728011309+01'00')
/CreationDate (D:20220731174438+01'00')
/CreationDate (D:20220802212055+01'00')
>>
endobj
2 0 obj
@ -33262,7 +33262,7 @@ endobj
[175 0 R /XYZ 0 242.99 null]
endobj
181 0 obj
<< /Length 6899
<< /Length 6909
>>
stream
q
@ -33587,7 +33587,7 @@ ET
BT
59.24 255.825 Td
/F3.0 11 Tf
<ca202020696620287273315b695d2026262021666f756e642920626567696e> Tj
<ca202020696620287273315b3331202d20695d2026262021666f756e642920626567696e> Tj
ET
0.0 0.0 0.0 SCN
@ -33725,7 +33725,7 @@ endobj
[182 0 R /XYZ 0 170.95 null]
endobj
187 0 obj
<< /Length 7873
<< /Length 7863
>>
stream
q
@ -33990,7 +33990,7 @@ ET
BT
59.24 404.005 Td
/F3.0 11 Tf
<ca202020696620287273315b3331202d20695d2026262021666f756e642920626567696e> Tj
<ca202020696620287273315b695d2026262021666f756e642920626567696e> Tj
ET
0.0 0.0 0.0 SCN
@ -74050,12 +74050,12 @@ xref
0000496192 00000 n
0000496238 00000 n
0000496284 00000 n
0000503237 00000 n
0000503594 00000 n
0000503640 00000 n
0000503686 00000 n
0000503732 00000 n
0000503778 00000 n
0000503247 00000 n
0000503604 00000 n
0000503650 00000 n
0000503696 00000 n
0000503742 00000 n
0000503788 00000 n
0000511705 00000 n
0000512062 00000 n
0000512108 00000 n

View File

@ -719,7 +719,7 @@ rd = 32; // Default = 32 if no set bits
reg found = 1'b0; // Local variable
for (i = 0; i < 32; i = i + 1) begin
if (rs1[i] && !found) begin
if (rs1[31 - i] && !found) begin
found = 1'b1;
rd = i;
end
@ -755,7 +755,7 @@ rd = 32; // Default = 32 if no set bits
reg found = 1'b0; // Local variable
for (i = 0; i < 32; i = i + 1) begin
if (rs1[31 - i] && !found) begin
if (rs1[i] && !found) begin
found = 1'b1;
rd = i;
end