Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Altera_Forum
Honored Contributor I
798 Views

gtk wave not dispalying waveform

HI. 

I written traffic signal program .Ran on ghdl simulator gtk wave not displaying waveform/ 

commands used :ghdl -a tra.vhd 

ghdl -e tra 

ghdl -r tra --vcd=ha.vcd=$--stop-time=100ns 

gtkwave tra.vcd 

library ieee; 

use ieee.std_logic_1164.all; 

 

entity tra is 

port(rst,clk : in std_logic; 

q : out std_logic_vector(2 downto 0)); 

end; 

 

architecture fsm of tra is 

 

type state_type is(red,green,yellow); 

 

signal ps,ns1 : state_type; 

begin 

process(clk,rst) 

begin 

if(rst = '0')then 

ps <= red; 

elsif clk'event and clk='1'then 

ps <= ns1; 

end if; 

end process; 

 

process(ps,ns1) 

begin 

case ps is 

when red => 

q <="001"; 

ns1<= green; 

when green => 

q <= "010"; 

ns1 <= yellow; 

when yellow => 

 

q <= "100"; 

ns1 <= red; 

end case; 

end process; 

end fsm; 

 

Thanks in advanvce 

 

Regards 

Raghavendra
0 Kudos
0 Replies
Reply