Altera_Forum
Honored Contributor
18 years agostronge behavior of case statement
Hi All...I have a very strange behavior of a case statement. In timing simulation, this segment of code:
fifo_ctrl_data: processbegin
wait until clk'event and clk='0';
case sc is
when s1 =>
txmit_dcfifo_wrreq <= '0';
txmit_dcfifo_data <= (others => '0');
when s2 =>
txmit_dcfifo_wrreq <= '0';
txmit_dcfifo_data <= (others => '0');
when s3 =>
txmit_dcfifo_wrreq <= '0';
txmit_dcfifo_data <= (others => '0');
when s4 =>
txmit_dcfifo_wrreq <= '0';
txmit_dcfifo_data <= (others => '0');
when s9 =>
txmit_dcfifo_wrreq <= '1';
txmit_dcfifo_data <= ec_frame(0);
when s10 =>
txmit_dcfifo_wrreq <= '1';
txmit_dcfifo_data <= ec_frame(1);
when s11 =>
txmit_dcfifo_wrreq <= '1';
txmit_dcfifo_data <= ec_frame(2);
when others =>
txmit_dcfifo_wrreq <= '0';
txmit_dcfifo_data <= (others => '0');
end case;
end process; does not give the same results as this segment of code: fifo_ctrl_data: process
begin
wait until clk'event and clk='0';
case sc is
when s9 =>
txmit_dcfifo_wrreq <= '1';
txmit_dcfifo_data <= ec_frame(0);
when s10 =>
txmit_dcfifo_wrreq <= '1';
txmit_dcfifo_data <= ec_frame(1);
when s11 =>
txmit_dcfifo_wrreq <= '1';
txmit_dcfifo_data <= ec_frame(2);
when others =>
txmit_dcfifo_wrreq <= '0';
txmit_dcfifo_data <= (others => '0');
end case;
end process; I tried functional simulation. Both are the same...so anyone can explaine why?