NathanY3G / rp2040-pio-emulator

RP2040 emulator for the testing and debugging of PIO programs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

In instruction not supported

romain145 opened this issue · comments

commented

Using the "in" instruction doesn't seem to be supported by the emulator.
The decoder does not have a ""_decode_in" method in its decoding_functions.

The following program does not generate anything:

program = """
loop:
    in pins, 8
    mov osr, isr
    out pins, 8
    set pins, 1
    set pins, 0
    jmp loop
"""

Can you provide a complete program that demonstrates this issue? Also, when you say "does not generate anything", what does that mean? This project doesn't have the ability to handle PIO assembly in its textual form, you have to use another program or library to convert it to opcodes first. If you mean that that program doesn't generate valid opcodes, that is outside the scope of this project.

Hi @romain145. Thanks for taking the time to report a problem. This issue might be due to the version of the library being used. The _decode_in() function was only added about 2 months ago by this commit. Please could you specify which version of the library you are using? One way to check this is by entering the following into your Python REPL:

import pioemu
pioemu.__version__

If you are on the latest version but still have a problem then providing a more complete example as suggested by @aaronjamt would really help. Thanks 🙂

commented

I was using version 0.80 installed with pip: https://pypi.org/project/rp2040-pio-emulator/0.80.0/
Using HEAD 4c5560e now the code runs as expected :)
Thanks!

Great! Thanks for letting us know @romain145. If you have any more problems, questions or ideas then please feel free to post to discussion #2. Alternatively, just create another Issue.