OpenCores

Lightweight 8051 compatible CPU

Issue List
DJNZ on B register #2
Closed sunday86100 opened this issue over 11 years ago
sunday86100 commented over 11 years ago

Djnz_dir seems not working. I my case, i load register B with decimal 10 value and do a loop:

mov B,#10 loop: djnz b,loop

First djnz put B register to decimal 255 value and jump ? Same loop with R0 instead of B works fine.

Best Regards.

sunday86100 commented over 11 years ago

Type your text here

ja_rd was assigned over 11 years ago
ja_rd commented over 11 years ago

Bug found in state djnz_dir_0: signal 'direct_addressing' is not asserted.

As a consequence, the IRAM/SFR bus timing is enough for the IRAM access but not for the SFR access.

As of revision 14 the logic for decoding signal 'direct_addressing' has been fixed and the changes have been tested in the simulation test bench and on the DE-1 board with the dhrystone demo.

This bug slipped past the test bench: 'DJNZ dir' was only tested with an IRAM address. The test bench has been fixed too and now tries DJNZ with an SFR too (SFR B).

ja_rd closed this over 11 years ago

Assignee
ja_rd
Labels
Request