Forum Discussion

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

register's initial value during reset state

Hi,

Is it customary and synthesizable to enter the initial value that different from 'zero' during reset state?

for instance:

"

if reset = '1' then

reg <= "01";

reg_1 <= x"11";

elsif(-----) then

~

end if;

"

reg - internal signal inside the code

reg_1 - out put signal(FPGA envelop)

Tnx

14 Replies

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

    Okay. So I changed my code slightly and added an extra register between my logic and the output pin, set to reset high. That packs properly. So, I have these conditions:

    1. Reset high, some slightly complex code for setting the state. Won't place in an IOE.

    2. Same as (1) but only change is to reset low. Places in an IOE fine.

    3. Same as (1) but with an additional register between the output of the state machine and the pin, set to reset high. Places in an IOE fine.

    So it looks like the complexity of my logic is somehow tripping it up. NOT Gate Push-back doesn't seem to change the above behaviour.

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

    Just a thought. It could be that if a register is associated with too complex logic (bidirectional) e.g you drive it and read it back then the tool wouldn't pack it as io register.

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

    --- Quote Start ---

    Just a thought. It could be that if a register is associated with too complex logic (bidirectional) e.g you drive it and read it back then the tool wouldn't pack it as io register.

    --- Quote End ---

    Nope, it's a one way street and I never read it. If i look at the compiled floorplan of the version that doesn't pack it I can see no reason for it not packing. The output of the register goes straight to an output pin and nowhere else.

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

    Even if you read it back, Quartus is usually smart enough to duplicate the register: an LE instance to be read back and a IOE instance to drive the output.

    Maybe you've hit some kind of corner case where Quartus fails to do the correct thing.