Hi,
First I think that you might have some latches from your combinatory process (the state machine).
They are some signals missing in the sensitivity list of your second process.
Second I don't really understand how you do the division. Do you got some kind of errors
or something?
As DRO points out you have missing signals in your sensitivity list. You are missing signal assignment for all of the outputs in each branch of the FSM combinational process, that will produce latches as outputs not defined in a branch will need to hold their current state when the FSM takes that branch.
This is the reason why so many people use the single (clocked) process FSM style, it avoids these two process FSM style pitfalls.
Given the commenting out of the enable, I also suspect you were getting X's in your simulation so removed the enable to start the divide operation. The X out of the following code:
Code:
if (e_in ='1') then
s_next <= divid;
end if;
was a result of not having an assignment for when e_in = '0' i.e.:
Code:
if (e_in = '1') then
s_next <=divid;
else -- specifies what to do when e_in = '0'
s_next <= init;
end if;
As you didn't clarify exactly what was wrong, those are the first tier of problems in the code, that you need to correct.