with SEL select
DOUT <= DI_SCAN when '1',
DIN when others;
Or a case statement
case SEL is
begin
when '1' => DOUT <= DI_SCAN;
when '0' => DOUT <= DIN;
when others => DOUT <= '0';
end case;
What could be the probelm with if/else;
mux_scan: process(DI_SCAN, DIN, SEL)
begin
if (SEL = '1') begin
DOUT <= DI_SCAN;
else
DOUT <= DIN;
end if;
end process;
- Bharat Singh | rathorebharat
1 comment:
The problem comes with if else statements that they can be infered as combinational and not or logic. It works fine for data path but if the same thing happens in clock path it is not good.
Real cause is not very clear!!
Post a Comment