Guest
Hi all,
The following piece of code works in functional simulation
--*************************************************************************
--This process is used to detect the start condition(I2C).
-- SDA is used as the clock for this purpose
--*************************************************************************
process(sda,sys_reset,current_i2c_state,scl)
begin
if(sys_reset='0' or current_i2c_state= I2C_HEADER)then
detect_start <= '0';
elsif(sda='0' and sda'event)then
if(scl/= '0')then
detect_start <= '1';
else
detect_start <= '0';
end if;
end if;
end process;
--**********************************************************--
In functional sim it works fine but when i do the timing simulation
even when the condition is satisfied the detct_start dosen't go high.
Note: This is the start detction logic for I2C .Since SCL and SDA are
externally pulled up '1' is converted to a 'Z'(not shown here).
the sda will aways be either '0' or 'Z' never a '1'.
But same is the case for funstional simulation.
I am using modelsim simuator to perform timing simulation .
and industry standard delay file(SDO format) generated by altera.
Any suggestions appreciated.
Thanks in advance,
Praveen
The following piece of code works in functional simulation
--*************************************************************************
--This process is used to detect the start condition(I2C).
-- SDA is used as the clock for this purpose
--*************************************************************************
process(sda,sys_reset,current_i2c_state,scl)
begin
if(sys_reset='0' or current_i2c_state= I2C_HEADER)then
detect_start <= '0';
elsif(sda='0' and sda'event)then
if(scl/= '0')then
detect_start <= '1';
else
detect_start <= '0';
end if;
end if;
end process;
--**********************************************************--
In functional sim it works fine but when i do the timing simulation
even when the condition is satisfied the detct_start dosen't go high.
Note: This is the start detction logic for I2C .Since SCL and SDA are
externally pulled up '1' is converted to a 'Z'(not shown here).
the sda will aways be either '0' or 'Z' never a '1'.
But same is the case for funstional simulation.
I am using modelsim simuator to perform timing simulation .
and industry standard delay file(SDO format) generated by altera.
Any suggestions appreciated.
Thanks in advance,
Praveen