Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] uart issue after #883 upd #890

Closed
Polaris-III opened this issue May 2, 2024 · 5 comments · Fixed by #891
Closed

[bug] uart issue after #883 upd #890

Polaris-III opened this issue May 2, 2024 · 5 comments · Fixed by #891
Labels
bug Something isn't working as expected HW Hardware-related

Comments

@Polaris-III
Copy link

Describe the bug
After #883 i discover that neorv32 determines any printed character as "?".
Looks like #883 uart_rx upd broke something

To Reproduce
Check "sreg" bus of "rx_engine_t" record in "neorv32_uart.vhd" file.
before #883 - sreg[9:0]
after #883 - sreg[8:0] <- where this issue happened

Expected behavior
Correct character determination

Screenshots
I push "e" button to abort autoboot sequence
Screen 1 - incorrect symbol.
Screenshot from 2024-05-02 15-16-15

Screen 2 - correct after bus fix
Screenshot from 2024-05-02 15-22-33

Environment:

  • OS Ubuntu
  • Xilinx xc7k325 fpga
  • ft232rl as uart2usb bridge
  • stock bootloader image

Hardware:

  • Hardware version (1.9.8.9)

Additional context
I changed sreg back to "9 downto 0" and reimplement design - works fine

@Polaris-III Polaris-III changed the title UART0 issue after #883 upd [bug] uart issue after #883 upd May 2, 2024
@Unike267
Copy link
Contributor

Unike267 commented May 2, 2024

Hi everyone!

I've reproduced this bug in Arty A7 35t.

As shown in the following result via CuteCom:

issue_890

I hope it will be solved soon,

Cheers!


Edit:

Maybe the bug comes from here:

char c = PRINT_GETC();

Since it expects to get a char variable (8 bits) and gets other value. 🤔 That is, the problem is probably coming from the receiver.

@Unike267
Copy link
Contributor

Unike267 commented May 2, 2024

Hi,

I've fixed the issue in local changing this line:

rx_fifo.wdata <= rx_engine.sreg(8 downto 1);

From rx_engine.sreg(8 downto 1); to rx_engine.sreg(7 downto 0);

Cheers! 😃


Edit:

@Polaris-III Could you test my change?

@Polaris-III
Copy link
Author

Hi @Unike267, I'll check your solution tomorrow, thank you

@stnolting
Copy link
Owner

Seems like I have messed up the UART receiver 🙈

@Polaris-III thanks for finding this bug!

@Unike267 your fix looks great! Would you open a PR? 😉

@stnolting stnolting added bug Something isn't working as expected HW Hardware-related labels May 2, 2024
Unike267 added a commit to Unike267/neorv32 that referenced this issue May 2, 2024
According to stnolting#890
[bug] uart issue after stnolting#883 upd

The change is in neorv32_uart.vhd file
In 289 line:
From rx_engine.sreg(8 downto 1) to rx_engine.sreg(7 downto 0)
@stnolting stnolting linked a pull request May 2, 2024 that will close this issue
@Unike267
Copy link
Contributor

Unike267 commented May 2, 2024

Done! 😃

When you merge it be careful with my commit description I should have written "on line 289" or "in line 289" instead of "in 289 line" sorry for that. 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working as expected HW Hardware-related
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants