Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
14 years ago

changes in the constant parameter affecting the logic

Making some unwanted changes which is not a logical change affecting the complete logic...

For eg.. VHDL syntax

constant x : std_logic_vector(15 downto 0):=x"af11";

this value is used in my logic while transmitting a ethernet packet. if i am changing the constant parameter to any other value my logic is not working.

what could be the issue?

2 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    A constant is meant to be there as constant for some purpose.

    You tell us why do you want to change it and what does it do?

    A constant is not variable(I believe) and is used instead of embedding numbers directly in code in various parts that makes it difficult to change for any future update or purpose.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Changing value of x changes the logic means obviously x is being used in the logic to affect the result. So obviously you cannot randomly change value of x without first understand what it does. You need to see where x to used and how it's used and then things will become clear.

    --- Quote Start ---

    Making some unwanted changes which is not a logical change affecting the complete logic...

    For eg.. VHDL syntax

    constant x : std_logic_vector(15 downto 0):=x"af11";

    this value is used in my logic while transmitting a ethernet packet. if i am changing the constant parameter to any other value my logic is not working.

    what could be the issue?

    --- Quote End ---