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

Remove signal initalizations #464

Merged
merged 3 commits into from
Dec 22, 2022
Merged

Conversation

tmeissner
Copy link
Collaborator

@tmeissner tmeissner commented Dec 22, 2022

Initialization of registers via bitstream isn't compatible with at least two FPGA architectures:

  • Gatemate FPGA -> leads to an error during systhesis with Yosys
  • Microchip SmartFusion & Polarfire FPGAs / SoCs -> init value ignored during synthesis

Both aren't nice, the 2nd one can lead to nasty misbehavior if you rely on the initialization value.

There are two signals with init values in the neorv32 design:

neorv32_top.vhd:  signal rstn_ext_sreg : std_ulogic_vector(3 downto 0) := (others => '0'); -- initialize (reset) via bitstream
neorv32_top.vhd:  signal rstn_int_sreg : std_ulogic_vector(3 downto 0)  := (others => '0'); -- initialize (reset) via bitstream

I propose to remove the initialization resulting in this:

neorv32_top.vhd:  signal rstn_ext_sreg : std_ulogic_vector(3 downto 0);
neorv32_top.vhd:  signal rstn_int_sreg : std_ulogic_vector(3 downto 0);

* Register init via bitstream  isn't compatible with GateMate FPGAs
  (error during synthesis) and Microchip FPGAs (ignored during synthesis)
@stnolting stnolting self-requested a review December 22, 2022 17:25
@stnolting stnolting added HW hardware-related optimization Make things faster, smaller and more efficient labels Dec 22, 2022
@stnolting stnolting merged commit 1490f23 into stnolting:main Dec 22, 2022
@tmeissner tmeissner deleted the signal_init branch January 5, 2023 18:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
HW hardware-related optimization Make things faster, smaller and more efficient
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants