J
jiten
Guest
if (rst='1') then
mplr := (others=>'0');
st <= idle;
i <= "000";
elsif (clk'event and clk='1') then
case st is
when idle => tmc := "00000000" & mc;
st <= add;
when add => if (mp(conv_integer(i))='1') then
mplr := mplr + tmc ;
end if;
st <= shift;
when shift => tmc := tmc(14 downto 0) & '0';
i <= i + 1;
st <= add;
if (i = "111")then
-- from here i want that i shoud come out of
states, bcoz i've got the output. i m coming out by taking one more
state. is there any other way of coming out from the state machines
without taking one more state. of course 'exit' doesn't work here.
mplr := (others=>'0');
st <= idle;
i <= "000";
elsif (clk'event and clk='1') then
case st is
when idle => tmc := "00000000" & mc;
st <= add;
when add => if (mp(conv_integer(i))='1') then
mplr := mplr + tmc ;
end if;
st <= shift;
when shift => tmc := tmc(14 downto 0) & '0';
i <= i + 1;
st <= add;
if (i = "111")then
-- from here i want that i shoud come out of
states, bcoz i've got the output. i m coming out by taking one more
state. is there any other way of coming out from the state machines
without taking one more state. of course 'exit' doesn't work here.