Re: modelsim bad signals
your not worng but I did checked my code and I don't see any double assignments to those signals.
I only assign a value to the signal at the pwm component (pwm signal) after enable
---------- Post added at 08:19 ---------- Previous post was at 08:16 ----------
this is the code where I am assigning the value where pulse_length and enable are signals giving from the fsm code
PwmReg: process (Clk,Rst)
begin
if (Rst='0') then
Counter <= (others=>'0');
Pwm <='0';
elsif rising_edge(Clk) then
if (Enable='1') then
if (Counter = duty_cycle) then
Counter <= (others => '0');
else
Counter <= Counter + 1;
end if;
if (pulse_length > Counter) then
Pwm <= '1';
else
Pwm <= '0';
end if;
else
Pwm <= '0';
end if;
end if;
end process PwmReg;
---------- Post added at 08:36 ---------- Previous post was at 08:19 ----------
as what i understand, the red signals means that the signals of pwm, m_p_pwm & s_p_pwm being assign from many source. correct me if i am wrong.
do check your code especially pwm, m_p_pwm & s_p_pwm assignment.
I have putted an sync reg consisted from 3 FF and it's solved the problem
I thought that a component is a part of the system there for If the system is synchronized I don't need a sync reg between like I need in the case of getting data from the real world like a sensor... am I right?
if I am wrong please tell me
I will keep you posted about the debuging I still need to fix the avg reg and the s_datain signals of the encoder