Z
zlotawy
Guest
Hi,
I have simple code in VHDL:
"
LIBRARY ieee;
Library unisim;
USE ieee.std_logic_1164.ALL;
use UNISIM.Vcomponents.all;
use ieee.std_logic_arith.ALL;
ENTITY prosty IS
PORT(
P_I_CLK : IN std_logic;
Rst : IN std_logic;
Porty : out std_logic;
wynik : OUT std_logic_vector(3 downto 0);
STAN : OUT std_logic_vector(3 downto 0)
);
end prosty;
Architecture test OF prosty IS
type state is (Idle, Pierwszy, Drugi,Trzeci);
signal S_THIS: state :=Idle;
begin
check_clock: process(Rst,P_I_CLK)
begin
if (Rst='1') then S_THIS <= Idle ;
elsif (P_I_CLK'event and P_I_CLK='1') then
case S_THIS is
when Idle =>
S_THIS<= Pierwszy;
when Pierwszy=>
S_THIS<= Drugi;
when Drugi=>
S_THIS<= Trzeci;
when Trzeci=>
S_THIS<= Idle;
end case;
end if;
end process check_clock;
states: process (S_THIS)
variable zmienna : integer:=0;
begin
Porty <= '0';
STAN <= "0000";
if (zmienna=2) then wynik<="1111";
else
wynik<="0010";
end if;
case S_THIS is
when Idle =>
zmienna := zmienna+1;
--wynik <= zmienna;
when Pierwszy =>
Porty <= '1';
STAN <= "0001";
when Drugi =>
Porty <= '1';
STAN <= "0010";
when Trzeci =>
Porty <= '1';
STAN <= "0011";
end case;
end process states;
end;
"
In post-route simulation it looks like horrible. Port Wynik is very
unsatisfied.
I use Xilinx ISE and Virtex2P XC2VP30.
Clock 40 MHz
I understand post-route simulation seems real hardware..
What should I do?
Regards,
zlotawy
I have simple code in VHDL:
"
LIBRARY ieee;
Library unisim;
USE ieee.std_logic_1164.ALL;
use UNISIM.Vcomponents.all;
use ieee.std_logic_arith.ALL;
ENTITY prosty IS
PORT(
P_I_CLK : IN std_logic;
Rst : IN std_logic;
Porty : out std_logic;
wynik : OUT std_logic_vector(3 downto 0);
STAN : OUT std_logic_vector(3 downto 0)
);
end prosty;
Architecture test OF prosty IS
type state is (Idle, Pierwszy, Drugi,Trzeci);
signal S_THIS: state :=Idle;
begin
check_clock: process(Rst,P_I_CLK)
begin
if (Rst='1') then S_THIS <= Idle ;
elsif (P_I_CLK'event and P_I_CLK='1') then
case S_THIS is
when Idle =>
S_THIS<= Pierwszy;
when Pierwszy=>
S_THIS<= Drugi;
when Drugi=>
S_THIS<= Trzeci;
when Trzeci=>
S_THIS<= Idle;
end case;
end if;
end process check_clock;
states: process (S_THIS)
variable zmienna : integer:=0;
begin
Porty <= '0';
STAN <= "0000";
if (zmienna=2) then wynik<="1111";
else
wynik<="0010";
end if;
case S_THIS is
when Idle =>
zmienna := zmienna+1;
--wynik <= zmienna;
when Pierwszy =>
Porty <= '1';
STAN <= "0001";
when Drugi =>
Porty <= '1';
STAN <= "0010";
when Trzeci =>
Porty <= '1';
STAN <= "0011";
end case;
end process states;
end;
"
In post-route simulation it looks like horrible. Port Wynik is very
unsatisfied.
I use Xilinx ISE and Virtex2P XC2VP30.
Clock 40 MHz
I understand post-route simulation seems real hardware..
What should I do?
Regards,
zlotawy