shaiko
Advanced Member level 5
Code:
process ( clock ) is
begin
if rising_edge ( clock ) then
counter <= counter + 1 -- counter is defined as an 8 bit unsinged vector
if counter = "11111111" then
test <= not test -- test is defined as a buffer std_logic
end if ;
end if ;
end process ;
The above code has been used to test the functionallity of an FPGA (Actel ProAsic3) on a newly manufactured board.
The PCB has been designed without an external POR (power on reset) source.
A scope probe a the "test" pin showed a constant '1' (3.3 volts).
Afterwards, the PCB has been reworked and a simple RC circuit has been connected to one of the input pins to generate a reset signal and drive it to one of the input pins of the Actel FPGA. The code has been rewritten and reflashed:
Code:
process ( clock ) is
begin
if n_reset = '0' then
test <= '0' ;
counter <= ( others => '0' ) ;
elsif rising_edge ( clock ) then
counter <= counter + 1 -- counter is defined as an 8 bit unsinged vector
if counter = "11111111" then
test <= not test -- test is defined as a buffer std_logic
end if ;
end if ;
end process ;
Reapplying the scope probe to the "test" pin showed a perfect square wave with the desired frequency.
My questions is:
Can the lack of an external reset cause such a problem ?