Hi.
I have the following vhdl code on a Xilinx Spartan-3AN starter kit (apologies for the .'s but whitespace indentation seems be filtered out of my post):
process(clk)
....begin
....if rising_edge(clk) then
........test_led <= '1';
........if reset = '1' then --reset is controlled with sliding switch
............led_1 <= '1';
............led_2 <= '0';
............-- do stuff
........else
............led_1 <= '0';
............led_2 <= '1';
............-- do other stuff
........end if;
....else
....end if;
end process;
When I download it to the FPGA the test_led lights up (which I assume means that I have a periodic clock with a rising edge) but led_1 and led_2 never light up. Since reset is connected to a sliding switch that is either in the '0' or '1' state one of led_1 or led_2 should light up, correct? I've double checked my constraints file to ensure all my led's are specified and that the sliding switch that controls the 'reset' is also specified (all using appropriately modified example code from Xilinx documentation) and in another project I can successfully control a led with a sliding switch so I can't figure out why this behaves the way it does. Can anyone point out a flaw/behaviour I've missed?