- process(state_int, do_it, p_rdone, p_wdone, p_read, aktop_int, strich_int,
- punkt_int, calc_done, wtmp_int, opp_int, goto_calcn1, goto_op1,
- goto_space3, goto_sign, z_sign_int, err_int, errc_int, calc_error,
- op2_int)
- begin
- state_next <= state_int;
-
- case state_int is
- when SIDLE =>
- if do_it = '1' then
- state_next <= SREAD_NEWNUMBER;
- end if;
- when SREAD_NEWNUMBER =>
- state_next <= SREAD_SPACE1_2;
- when SREAD_SPACE1_2 =>
- if p_rdone = '1' then
- state_next <= SREAD_SPACE2;
- end if;
- when SREAD_SPACE1_3 =>
- if p_rdone = '1' then
- state_next <= SREAD_SPACE3;
- end if;
- when SREAD_SPACE2 | SREAD_SPACE3 =>
- if goto_calcn1 = '1' then
- case state_int is
- when SREAD_SPACE2 => state_next <= SREAD_NEXTBYTE;
- when SREAD_SPACE3 => state_next <= SREAD_OP1;
- when others => assert(false) report "wtf @ state2";
- end case;
- end if;
- if goto_sign = '1' then
- case state_int is
- when SREAD_SPACE2 => state_next <= SREAD_SIGN1;
- when others => assert(false) report "wtf @ state3";
- end case;
- end if;
- if p_rdone = '0' then
- if goto_calcn1 = '0' then
- case state_int is
- when SREAD_SPACE2 => state_next <= SREAD_SPACE1_2;
- when SREAD_SPACE3 => state_next <= SREAD_SPACE1_3;
- when others => assert(false) report "wtf @ state1";
- end case;
- end if;
- end if;
- when SREAD_SIGN1 =>
- if p_rdone = '0' then
- state_next <= SREAD_NEXTBYTE;
- end if;
- when SREAD_NEXTBYTE =>
- if p_rdone = '1' then
- state_next <= SREAD_CALCNUMBER1;
- end if;
- when SREAD_CALCNUMBER1 =>
- if goto_op1 = '1' then
- state_next <= SREAD_OP1;
- elsif goto_space3 = '1' then
- state_next <= SREAD_SPACE3;
- elsif calc_done = '1' then
- state_next <= SREAD_CALCNUMBER2;
- end if;
- when SREAD_OP1 =>
- state_next <= SREAD_OP2;
- when SREAD_OP2 =>
- if p_rdone = '0' then
- if aktop_int /= ALU_NOP then
- state_next <= SCALC_1;
- end if;
- end if;
- when SREAD_CALCNUMBER2 =>
- if p_rdone = '0' and calc_done = '0' then
- state_next <= SREAD_NEXTBYTE;
- end if;
- when SCALC_1 =>
- if calc_done = '1' then
- case opp_int is
- -- spezialfall: eine zwischenberechnung wird fuer diese
- -- kombination benoetigt
- when ALU_MUL | ALU_DIV =>
- case aktop_int is
- when ALU_ADD | ALU_SUB | ALU_DONE => state_next <= SCALC_14;
- when others => state_next <= SCALC_2;
- end case;
- when others => state_next <= SCALC_2;
- end case;
- end if;
- when SCALC_14 =>
- if calc_done = '0' then
- state_next <= SCALC_15;
- end if;
- when SCALC_15 =>
- if calc_done = '1' then
- state_next <= SCALC_2;
- end if;
- when SCALC_2 =>
- if calc_done = '0' then
- if aktop_int = ALU_DONE then
- state_next <= SWRITE_CHAR2;
- else
- state_next <= SREAD_NEWNUMBER;
- end if;
- end if;
- when SWRITE_CHAR0 =>
- if calc_done = '1' then
- state_next <= SWRITE_CHAR1;
- end if;
- when SWRITE_CHAR1 =>
- if p_wdone = '1' then
- if strich_int < 10 then
- if z_sign_int = '1' then
- state_next <= SWRITE_SIGN1;
- else
- state_next <= SDONE;
- end if;
- else
- state_next <= SWRITE_CHAR2;
- end if;
- end if;
- when SERROR1 =>
- if p_wdone = '1' then
- if errc_int <= 2 then
- state_next <= SDONE;
- else
- state_next <= SERROR2;
- end if;
- end if;
- when SERROR2 =>
- if p_wdone = '0' then
- state_next <= SERROR1;
- end if;
- when SWRITE_CHAR2 =>
- if p_wdone = '0' and calc_done = '0' then
- state_next <= SWRITE_CHAR0;
- end if;
- when SWRITE_SIGN1 =>
- if p_wdone = '0' then
- state_next <= SWRITE_SIGN2;
- end if;
- when SWRITE_SIGN2 =>
- if p_wdone = '1' then
- state_next <= SDONE;
- end if;
-
- when SDONE =>
- if p_wdone = '0' and do_it = '0' then
- state_next <= SIDLE;
- end if;
- end case;
-
- -- fehlerbehandlung
- case state_int is
- when SERROR1 | SERROR2 | SDONE => null;
- when others =>
- if err_int > 0 then
- state_next <= SERROR1;
- end if;
- end case;
- end process;
-
- -- out
- process(state_int, p_read, p_write_int, z_int, rbyte_int, p_rget_int,
- strich_int, aktop_int, opp_int, opcode_int, op1_int, op2_int, op3, opM,
- do_calc_int, wtmp_int, punkt_int, z_sign_int, err_int, errc_int,
- errc_tmp_int, firstz_int, calc_done, calc_error)
+ process(do_it, p_rdone, p_wdone, p_read, aktop_int, strich_int, punkt_int,
+ calc_done, wtmp_int, opp_int, z_sign_int, err_int, errc_int,
+ calc_error, op2_int, state_int, p_write_int, z_int, rbyte_int,
+ p_rget_int, opcode_int, op1_int, op3, opM, do_calc_int,
+ errc_tmp_int, firstz_int)