Yaro
Newbie level 6

I'm trying to create a power sequencer in VHDL, this is my code:
I've an input clock of 250Mhz(just for example, I've also tryed lower as 50Mhz).
Simulating PowerSeq VHDL code works like expected, but when i Synthesize it and simulate Synthesized code in simulation tool I have correct EN input and Clock input but I have all X on outputs. Programming device my outputs are blocked with this values:
What is wrong with this code?
Code:
library IEEE;
use IEEE.std_logic_1164.all;
entity PowerSeq is
port (
RESET : out std_logic;
POWER : out std_logic;
EN : out std_logic;
CLOCK : out std_logic;
SERIAL : out std_logic;
ModuleEN : in std_logic;
ModuleCLK : in std_logic
);
end PowerSeq;
architecture ArchiPowerSeq of PowerSeq is
signal counter :integer :=0;
signal StopCount :std_logic := '0';
begin
process(ModuleCLK)
begin
if (rising_edge(ModuleCLK) and StopCount = '0') then
if ModuleEN = '0' then
RESET <= '0';
POWER <= '1';
EN <= '0';
CLOCK <= '0';
SERIAL <= '0';
end if;
counter <= counter + 1;
-- 1ms = 250000
case counter is
when 2500000 =>
EN <= '1';
when 5000000 =>
POWER <= '0';
when 7500000 =>
CLOCK <= '1';
when 10000000 =>
RESET <= '1';
when 12500000=>
SERIAL <= '1';
StopCount <= '1';
when others =>
end case;
end if;
end process;
end ArchiPowerSeq;
I've an input clock of 250Mhz(just for example, I've also tryed lower as 50Mhz).
Simulating PowerSeq VHDL code works like expected, but when i Synthesize it and simulate Synthesized code in simulation tool I have correct EN input and Clock input but I have all X on outputs. Programming device my outputs are blocked with this values:
Code:
RESET <= '0';
POWER <= '1';
EN <= '0';
CLOCK <= '0';
SERIAL <= '0';