Skip to content
New issue

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

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

Already on GitHub? # to your account

FEEDBACK wires need a default assignment in code #192

Open
JulianKemmerer opened this issue Mar 17, 2024 · 1 comment
Open

FEEDBACK wires need a default assignment in code #192

JulianKemmerer opened this issue Mar 17, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@JulianKemmerer
Copy link
Owner

without then tool mistakenly reads from feedback signal like a register and is just wire connected to self connected to nothing...

uint8_t reg_wr_data;
#pragma FEEDBACK reg_wr_data

if(thing)
  reg_wr_data = 1;
else
  reg_wr_data = 0;

Will get synthesis warning about net with no driver

feedback_vars.reg_wr_data <= feedback_vars.reg_wr_data; will appear in VHDL

Change to

reg_wr_data = 0;
if(thing)
  reg_wr_data = 1;

to have explicit default driver of feedback variable

@JulianKemmerer JulianKemmerer added the bug Something isn't working label Mar 17, 2024
@JulianKemmerer
Copy link
Owner Author

Perhaps can make it so

uint8_t reg_wr_data;
#pragma FEEDBACK reg_wr_data

there is a null init added after pragma / as part of pragma

uint8_t reg_wr_data;
#pragma FEEDBACK reg_wr_data
uint8_t u8_NULL = {0};
reg_wr_data = u8_NULL;

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant