- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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 RaghavendraLink Copied
0 Replies
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page