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

Formatting silently fails on specific constant declaration #73

Open
diarmuidcwc opened this issue Oct 23, 2024 · 0 comments
Open

Formatting silently fails on specific constant declaration #73

diarmuidcwc opened this issue Oct 23, 2024 · 0 comments

Comments

@diarmuidcwc
Copy link

Report a bug

I have some code that in isolation, passes the formatter, But when part of a bigger block of code, fails to format

Input

So if I pass this code into the (online) formatter it does nothing.

LIBRARY IEEE;
USE IEEE.std_logic_1164.ALL;
USE IEEE.std_logic_unsigned.ALL;
USE IEEE.std_logic_arith.conv_std_logic_vector;
USE IEEE.numeric_std.ALL;


ENTITY ch10_pkt_wrap IS

  PORT (
  );
END;

ARCHITECTURE rtl OF ch10_pkt_wrap IS


  CONSTANT WRAP_SIZE_WRDS : INTEGER := 6;

  TYPE t_gre_wrapper IS ARRAY (0 TO WRAP_SIZE_WRDS - 1) OF t_internal_datapath_format;
  
  CONSTANT C_GRE_WRAP : t_gre_wrapper := (
    ('1', "1111", '1', '0', x"0005E555"),
    ('1', "1111", '0', '0', x"555555D5"),
    ('1', "1111", '0', '0', x"01005E00"),
    ('1', "1111", '0', '0', x"00000000"),
    ('1', "1111", '0', '0', x"00012345"),
    ('1', "1111", '0', '0', x"88b588b5")
  );


BEGIN


  gmii_out <= gmii_out_sr(C_OUT_PIPE_DEPTH - 1) WHEN cfg_bypass_ch10_wrap = '0' ELSE gmii_in;

END ARCHITECTURE rtl;

However if I remove the following lines it works.

  CONSTANT C_GRE_WRAP : t_gre_wrapper := (
    ('1', "1111", '1', '0', x"0005E555"),
    ('1', "1111", '0', '0', x"555555D5"),
    ('1', "1111", '0', '0', x"01005E00"),
    ('1', "1111", '0', '0', x"00000000"),
    ('1', "1111", '0', '0', x"00012345"),
    ('1', "1111", '0', '0', x"88b588b5")
  );

Also if I take the removed lines in isolation, they format correctly!

Expected Behavior

The code should be formatted correctly

Actual Behavior

The formatter silently fails

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant