92use ieee.std_logic_1164.
all;
93use ieee.numeric_std.
all;
280 signal R_IDSTAT : decode_stat_type := decode_stat_init;
281 signal N_IDSTAT : decode_stat_type := decode_stat_init;
301 variable idout : slv16 := (others=>'0');
303 idout := (others=>'0');
315 end process proc_ibres;
317 proc_status:
process (
CLK)
319 if rising_edge(CLK) then
330 end process proc_status;
333 proc_cpuerr:
process (
CLK)
335 if rising_edge(CLK) then
342 end process proc_cpuerr;
346 if rising_edge(CLK) then
353 end process proc_state;
361 variable nstatus : cpustat_type := cpustat_init;
362 variable ncpuerr : cpuerr_type := cpuerr_init;
364 variable ndpcntl : dpath_cntl_type := dpath_cntl_init;
365 variable nvmcntl : vm_cntl_type := vm_cntl_init;
366 variable nidstat : decode_stat_type := decode_stat_init;
367 variable nmmumoni : mmu_moni_type := mmu_moni_init;
369 variable imemok : boolean;
370 variable bytop : slbit := '0';
371 variable macc : slbit := '0';
373 variable lvector : slv9_2 := (others=>'0');
375 variable brcode : slv4 := (others=>'0');
376 variable brcond : slbit := '0';
378 variable is_kmode : slbit := '0';
379 variable is_kstackdst1246 : slbit := '0';
381 variable int_pending : slbit := '0';
383 variable idm_idle : slbit := '0';
384 variable idm_cpbusy : slbit := '0';
385 variable idm_idec : slbit := '0';
386 variable idm_idone : slbit := '0';
387 variable idm_pcload : slbit := '0';
389 alias SRCMOD : slv2 is IREG(11 downto 10);
391 alias SRCREG : slv3 is IREG(8 downto 6);
392 alias DSTMODF : slv3 is IREG(5 downto 3);
393 alias DSTMOD : slv2 is IREG(5 downto 4);
395 alias DSTREG : slv3 is IREG(2 downto 0);
398 pndpcntl :
inout dpath_cntl_type;
399 pnvmcntl :
inout vm_cntl_type;
402 pndpcntl.vmaddr_sel := c_dpath_vmaddr_pc;
403 pnvmcntl.dspace := '0';
405 pndpcntl.gr_pcinc := '1';
407 end procedure do_memread_i;
410 pnvmcntl :
inout vm_cntl_type;
412 pbytop :
in slbit := '0';
413 pmacc :
in slbit := '0';
414 pispace :
in slbit := '0';
415 pkstack :
in slbit := '0')
is
417 pnvmcntl.dspace := not pispace;
418 pnvmcntl.bytop := pbytop;
419 pnvmcntl.macc := pmacc;
420 pnvmcntl.kstack := pkstack;
423 end procedure do_memread_d;
426 pndpcntl :
inout dpath_cntl_type;
427 pnvmcntl :
inout vm_cntl_type;
429 pnmmumoni :
inout mmu_moni_type;
430 pupdt_sp :
in slbit := '0')
is
432 pndpcntl.ounit_asel := c_ounit_asel_dsrc;
433 pndpcntl.ounit_const := "000000010";
434 pndpcntl.ounit_bsel := c_ounit_bsel_const;
435 pndpcntl.dres_sel := c_dpath_res_ounit;
436 pndpcntl.dsrc_sel := c_dpath_dsrc_res;
437 pndpcntl.dsrc_we := '1';
438 if pupdt_sp = '1' then
439 pnmmumoni.regmod := '1';
440 pnmmumoni.isdec := '0';
441 pndpcntl.gr_adst := c_gr_sp;
442 pndpcntl.gr_we := '1';
444 pndpcntl.vmaddr_sel := c_dpath_vmaddr_dsrc;
445 pnvmcntl.dspace := '1';
448 end procedure do_memread_srcinc;
451 pnvmcntl :
inout vm_cntl_type;
453 pmacc :
in slbit :='0';
454 pispace :
in slbit := '0')
is
456 pnvmcntl.dspace := not pispace;
457 pnvmcntl.bytop := R_IDSTAT.is_bytop;
458 pnvmcntl.wacc := '1';
459 pnvmcntl.macc := pmacc;
462 end procedure do_memwrite;
465 pnstatus :
inout cpustat_type;
466 pmok :
out boolean)
is
469 pnstatus := pnstatus;
474 pnstatus.treq_mmu := '1';
478 pnstatus.treq_ysv := '1';
484 end procedure do_memcheck;
489 pregnum :
in slv3)
is
491 pndpcntl := pndpcntl;
492 if pbytop='0' or pisdef='1' or
493 pregnum=c_gr_pc or pregnum=c_gr_sp then
494 pndpcntl.ounit_const := "000000010";
496 pndpcntl.ounit_const := "000000001";
498 end procedure do_const_opsize;
501 pidstat :
in decode_stat_type)
is
503 case pidstat.fork_dstr is
504 when c_fork_dstr_def => pnstate := s_dstr_def;
505 when c_fork_dstr_inc => pnstate := s_dstr_inc;
506 when c_fork_dstr_dec => pnstate := s_dstr_dec;
507 when c_fork_dstr_ind => pnstate := s_dstr_ind;
508 when others => pnstate := s_cpufail;
510 end procedure do_fork_dstr;
513 pidstat :
in decode_stat_type)
is
515 case pidstat.fork_opg is
516 when c_fork_opg_gen => pnstate := s_opg_gen;
517 when c_fork_opg_wdef => pnstate := s_dstw_def;
518 when c_fork_opg_winc => pnstate := s_dstw_inc;
519 when c_fork_opg_wdec => pnstate := s_dstw_dec;
520 when c_fork_opg_wind => pnstate := s_dstw_ind;
521 when c_fork_opg_mul => pnstate := s_opg_mul;
522 when c_fork_opg_div => pnstate := s_opg_div;
523 when c_fork_opg_ash => pnstate := s_opg_ash;
524 when c_fork_opg_ashc => pnstate := s_opg_ashc;
525 when others => pnstate := s_cpufail;
527 end procedure do_fork_opg;
530 pidstat :
in decode_stat_type)
is
532 case pidstat.fork_opa is
533 when c_fork_opa_jmp => pnstate := s_opa_jmp;
534 when c_fork_opa_jsr => pnstate := s_opa_jsr;
535 when c_fork_opa_mtp => pnstate := s_opa_mtp_mem;
536 when c_fork_opa_mfp_reg => pnstate := s_opa_mfp_reg;
537 when c_fork_opa_mfp_mem => pnstate := s_opa_mfp_mem;
538 when others => pnstate := s_cpufail;
540 end procedure do_fork_opa;
543 pnstatus :
inout cpustat_type;
544 pnmmumoni :
inout mmu_moni_type)
is
547 if pnstatus.treq_mmu='1' or
548 pnstatus.treq_ysv='1' then
549 pnstate := s_trap_disp;
550 elsif unsigned(INT_PRI) > unsigned(PSW.pri) then
552 elsif pnstatus.treq_tbit='1' then
553 pnstate := s_trap_disp;
561 end procedure do_fork_next;
564 pnstatus :
inout cpustat_type;
565 pndpcntl :
inout dpath_cntl_type;
566 pnvmcntl :
inout vm_cntl_type;
567 pnmmumoni :
inout mmu_moni_type)
is
569 pndpcntl := pndpcntl;
570 pnvmcntl := pnvmcntl;
572 if pnstatus.treq_mmu='1' or
573 pnstatus.treq_ysv='1' then
574 pnstate := s_trap_disp;
575 elsif unsigned(INT_PRI) > unsigned(PSW.pri) then
577 elsif pnstatus.treq_tbit='1' then
578 pnstate := s_trap_disp;
583 pndpcntl.gr_pcinc := '1' ;
584 pnmmumoni.istart := '1';
585 pnstate := s_ifetch_w;
589 end procedure do_fork_next_pref;
592 pndpcntl :
inout dpath_cntl_type;
595 pndpcntl.dtmp_sel := c_dpath_dtmp_psw;
596 pndpcntl.dtmp_we := not R_STATUS.in_vecflow;
597 pndpcntl.ounit_azero := '1';
598 pndpcntl.ounit_const := pvector & "00";
599 pndpcntl.ounit_bsel := c_ounit_bsel_const;
600 pndpcntl.dres_sel := c_dpath_res_ounit;
601 pndpcntl.dsrc_sel := c_dpath_dsrc_res;
602 pndpcntl.dsrc_we := '1';
603 pnstate := s_vec_getpc;
604 end procedure do_start_vec;
612 nstatus.cpuwait := '0';
619 nstatus.itimer := '1';
621 nstatus.itimer := '0';
624 nstatus.creset := '0';
625 nstatus.breset := '0';
626 nstatus.intack := '0';
631 ncpuerr := cpuerr_init;
638 nstatus.intpend := int_pending;
648 nmmumoni := mmu_moni_init;
649 nmmumoni.vflow := R_STATUS.in_vecflow;
653 brcode := IREG(15) & IREG(10 downto 8);
657 is_kstackdst1246 := '0';
659 if PSW.cmode = c_psw_kmode then
661 if DSTREG = c_gr_sp and
662 (DSTMODF="001" or DSTMODF="010" or
663 DSTMODF="100" or DSTMODF="110") then
664 is_kstackdst1246 := '1';
668 lvector := (others=>'0');
670 nvmcntl := vm_cntl_init;
671 nvmcntl.dspace := '1';
672 nvmcntl.mode := PSW.cmode;
673 nvmcntl.vecser := R_STATUS.in_vecser;
675 ndpcntl := dpath_cntl_init;
676 ndpcntl.gr_asrc := SRCREG;
677 ndpcntl.gr_adst := DSTREG;
678 ndpcntl.gr_mode := PSW.cmode;
679 ndpcntl.gr_rset := PSW.rset;
680 ndpcntl.gr_we := '0';
681 ndpcntl.gr_bytop := '0';
682 ndpcntl.gr_pcinc := '0';
684 ndpcntl.psr_ccwe := '0';
685 ndpcntl.psr_we := '0';
686 ndpcntl.psr_func := "000";
688 ndpcntl.dsrc_sel := c_dpath_dsrc_src;
689 ndpcntl.dsrc_we := '0';
690 ndpcntl.ddst_sel := c_dpath_ddst_dst;
691 ndpcntl.ddst_we := '0';
692 ndpcntl.dtmp_sel := c_dpath_dtmp_dsrc;
693 ndpcntl.dtmp_we := '0';
695 ndpcntl.ounit_asel := c_ounit_asel_ddst;
696 ndpcntl.ounit_azero := '0';
697 ndpcntl.ounit_const := (others=>'0');
698 ndpcntl.ounit_bsel := c_ounit_bsel_const;
699 ndpcntl.ounit_opsub := '0';
701 ndpcntl.aunit_srcmod := R_IDSTAT.aunit_srcmod;
702 ndpcntl.aunit_dstmod := R_IDSTAT.aunit_dstmod;
703 ndpcntl.aunit_cimod := R_IDSTAT.aunit_cimod;
704 ndpcntl.aunit_cc1op := R_IDSTAT.aunit_cc1op;
705 ndpcntl.aunit_ccmode := R_IDSTAT.aunit_ccmode;
706 ndpcntl.aunit_bytop := R_IDSTAT.is_bytop;
708 ndpcntl.lunit_func := R_IDSTAT.lunit_func;
709 ndpcntl.lunit_bytop := R_IDSTAT.is_bytop;
711 ndpcntl.munit_func := R_IDSTAT.munit_func;
713 ndpcntl.ireg_we := '0';
715 ndpcntl.cres_sel := R_IDSTAT.res_sel;
716 ndpcntl.dres_sel := c_dpath_res_ounit;
717 ndpcntl.vmaddr_sel := c_dpath_vmaddr_dsrc;
720 nstatus.cmdbusy := '1';
721 nstatus.cpfunc := CP_CNTL.func;
722 nstatus.cprnum := CP_CNTL.rnum;
726 nstatus.cmdack := '0';
727 nstatus.cmderr := '0';
728 nstatus.cmdmerr := '0';
740 ndpcntl.vmaddr_sel := c_dpath_vmaddr_ddst;
741 nstatus.cpustep := '0';
748 when c_cpfunc_noop =>
749 nstatus.cmdack := '1';
752 when c_cpfunc_start =>
753 nstatus.cmdack := '1';
755 nstatus.cmderr := '1';
757 nstatus.cpugo := '1';
758 nstatus.cpurust := c_cpurust_runs;
759 nstatus.waitsusp := '0';
763 when c_cpfunc_stop =>
764 nstatus.cmdack := '1';
765 nstatus.cpugo := '0';
766 nstatus.cpurust := c_cpurust_stop;
767 nstatus.waitsusp := '0';
770 when c_cpfunc_step =>
771 nstatus.cmdack := '1';
772 nstatus.cpustep := '1';
773 nstatus.cpurust := c_cpurust_step;
774 nstatus.waitsusp := '0';
775 if int_pending = '1' then
776 nstatus.intack := '1';
783 when c_cpfunc_creset =>
784 nstatus.cmdack := '1';
786 nstatus.cmderr := '1';
788 nstatus.creset := '1';
789 nstatus.breset := '1';
790 nstatus.suspint := '0';
791 nstatus.treq_mmu := '0';
792 nstatus.treq_ysv := '0';
793 nstatus.treq_tbit := '0';
794 nstatus.in_vecflow := '0';
795 nstatus.in_vecser := '0';
796 nstatus.in_vecysv := '0';
797 nstatus.cpurust := c_cpurust_init;
801 when c_cpfunc_breset =>
802 nstatus.cmdack := '1';
804 nstatus.cmderr := '1';
806 nstatus.breset := '1';
810 when c_cpfunc_suspend =>
811 nstatus.cmdack := '1';
812 nstatus.suspint := '1';
813 nstatus.cpurust := c_cpurust_susp;
816 when c_cpfunc_resume =>
817 nstatus.cmdack := '1';
818 nstatus.suspint := '0';
820 nstatus.cpurust := c_cpurust_runs;
822 nstatus.cpurust := c_cpurust_stop;
826 when c_cpfunc_rreg =>
828 ndpcntl.ddst_sel := c_dpath_ddst_dst;
829 ndpcntl.ddst_we := '1';
830 nstate := s_cp_regread;
832 when c_cpfunc_wreg =>
833 ndpcntl.dres_sel := c_dpath_res_cpdin;
835 ndpcntl.gr_we := '1';
836 nstatus.cmdack := '1';
839 when c_cpfunc_rpsw =>
840 ndpcntl.dtmp_sel := c_dpath_dtmp_psw;
841 ndpcntl.dtmp_we := '1';
844 when c_cpfunc_wpsw =>
845 ndpcntl.dres_sel := c_dpath_res_cpdin;
846 ndpcntl.psr_func := c_psr_func_wall;
847 ndpcntl.psr_we := '1';
848 nstatus.cmdack := '1';
851 when c_cpfunc_rmem =>
854 nstate := s_cp_memr_w;
856 when c_cpfunc_wmem =>
857 ndpcntl.dres_sel := c_dpath_res_cpdin;
861 nstate := s_cp_memw_w;
864 nstatus.cmdack := '1';
865 nstatus.cmderr := '1';
878 nstate := s_trap_disp;
880 nstatus.intack := '1';
884 nstate := s_trap_disp;
892 ndpcntl.ounit_asel := c_ounit_asel_ddst;
893 ndpcntl.ounit_bsel := c_ounit_bsel_const;
894 ndpcntl.dres_sel := c_dpath_res_ounit;
895 nstatus.cmdack := '1';
900 ndpcntl.ounit_asel := c_ounit_asel_dtmp;
901 ndpcntl.ounit_bsel := c_ounit_bsel_const;
902 ndpcntl.dres_sel := c_dpath_res_ounit;
903 nstatus.cmdack := '1';
908 nstate := s_cp_memr_w;
909 ndpcntl.dres_sel := c_dpath_res_vmdout;
911 nstatus.cmdack := '1';
918 nstate := s_cp_memw_w;
920 nstatus.cmdack := '1';
928 nmmumoni.istart := '1';
929 do_memread_i(nstate, ndpcntl, nvmcntl, s_ifetch_w);
932 nstate := s_ifetch_w;
933 do_memcheck(nstate, nstatus, imemok);
935 ndpcntl.ireg_we := '1';
941 nstatus.itimer := '1';
943 if ID_STAT.force_srcsp = '1' then
944 ndpcntl.gr_asrc := c_gr_sp;
946 ndpcntl.dsrc_sel := c_dpath_dsrc_src;
947 ndpcntl.dsrc_we := '1';
948 ndpcntl.ddst_sel := c_dpath_ddst_dst;
949 ndpcntl.ddst_we := '1';
951 nvmcntl.dspace := '0';
952 ndpcntl.vmaddr_sel := c_dpath_vmaddr_pc;
954 nstatus.resetcnt := "111";
956 nstatus.treq_tbit := PSW.tflag;
957 if PSW.tflag = '0' then
972 ndpcntl.gr_pcinc := '1';
973 nmmumoni.istart := '1';
974 nstatus.prefdone := '1';
978 if ID_STAT.do_fork_op = '1' then
980 when c_fork_op_halt => nstate := s_op_halt;
981 when c_fork_op_wait => nstate := s_op_wait;
982 when c_fork_op_rtti => nstate := s_rti_getpc;
983 when c_fork_op_trap => nstate := s_op_trap;
984 when c_fork_op_reset=> nstate := s_op_reset;
985 when c_fork_op_rts => nstate := s_op_rts;
986 when c_fork_op_spl => nstate := s_op_spl;
987 when c_fork_op_mcc => nstate := s_op_mcc;
988 when c_fork_op_br => nstate := s_op_br;
989 when c_fork_op_mark => nstate := s_op_mark;
990 when c_fork_op_sob => nstate := s_op_sob;
991 when c_fork_op_mtp => nstate := s_opa_mtp;
992 when others => nstate := s_cpufail;
994 elsif ID_STAT.do_fork_srcr = '1' then
996 when c_fork_srcr_def => nstate := s_srcr_def;
997 when c_fork_srcr_inc => nstate := s_srcr_inc;
998 when c_fork_srcr_dec => nstate := s_srcr_dec;
999 when c_fork_srcr_ind => nstate := s_srcr_ind;
1000 when others => nstate := s_cpufail;
1002 elsif ID_STAT.do_fork_dstr = '1' then
1003 do_fork_dstr(nstate, ID_STAT);
1004 elsif ID_STAT.do_fork_dsta = '1' then
1006 when c_fork_dsta_def => do_fork_opa(nstate, ID_STAT);
1007 when c_fork_dsta_inc => nstate := s_dsta_inc;
1008 when c_fork_dsta_dec => nstate := s_dsta_dec;
1009 when c_fork_dsta_ind => nstate := s_dsta_ind;
1010 when others => nstate := s_cpufail;
1012 elsif ID_STAT.do_fork_opg = '1' then
1014 elsif ID_STAT.is_res = '1' then
1015 nstate := s_abort_10;
1017 nstate := s_cpufail;
1063 ndpcntl.vmaddr_sel := c_dpath_vmaddr_dsrc;
1064 do_memread_d(nstate, nvmcntl, s_srcr_def_w,
1068 when s_srcr_def_w =>
1069 nstate := s_srcr_def_w;
1070 do_memcheck(nstate, nstatus, imemok);
1071 ndpcntl.dres_sel := c_dpath_res_vmdout;
1072 ndpcntl.dsrc_sel := c_dpath_dsrc_res;
1074 ndpcntl.dsrc_we := '1';
1075 if R_IDSTAT.do_fork_dstr = '1' then
1083 ndpcntl.ounit_asel := c_ounit_asel_dsrc;
1084 do_const_opsize(ndpcntl, R_IDSTAT.is_bytop, SRCDEF, SRCREG);
1085 ndpcntl.ounit_bsel := c_ounit_bsel_const;
1086 ndpcntl.dres_sel := c_dpath_res_ounit;
1087 ndpcntl.gr_adst := SRCREG;
1088 ndpcntl.gr_we := '1';
1089 nmmumoni.regmod := '1';
1090 nmmumoni.isdec := '0';
1091 ndpcntl.ddst_sel := c_dpath_ddst_res;
1092 if DSTREG = SRCREG then
1093 ndpcntl.ddst_we := '1';
1095 ndpcntl.vmaddr_sel := c_dpath_vmaddr_dsrc;
1096 bytop := R_IDSTAT.is_bytop and not SRCDEF;
1097 do_memread_d(nstate, nvmcntl, s_srcr_inc_w,
1098 pbytop=>bytop, pispace=>R_IDSTAT.is_srcpc);
1100 when s_srcr_inc_w =>
1101 nstate := s_srcr_inc_w;
1102 ndpcntl.dres_sel := c_dpath_res_vmdout;
1103 ndpcntl.dsrc_sel := c_dpath_dsrc_res;
1104 do_memcheck(nstate, nstatus, imemok);
1106 ndpcntl.dsrc_we := '1';
1107 if SRCDEF = '1' then
1108 nstate := s_srcr_def;
1110 if R_IDSTAT.do_fork_dstr = '1' then
1119 ndpcntl.ounit_asel := c_ounit_asel_dsrc;
1120 do_const_opsize(ndpcntl, R_IDSTAT.is_bytop, SRCDEF, SRCREG);
1121 ndpcntl.ounit_bsel := c_ounit_bsel_const;
1122 ndpcntl.ounit_opsub := '1';
1123 ndpcntl.dres_sel := c_dpath_res_ounit;
1124 ndpcntl.dsrc_sel := c_dpath_dsrc_res;
1125 ndpcntl.dsrc_we := '1';
1126 ndpcntl.gr_adst := SRCREG;
1127 ndpcntl.gr_we := '1';
1128 nmmumoni.regmod := '1';
1129 nmmumoni.isdec := '1';
1130 ndpcntl.ddst_sel := c_dpath_ddst_res;
1131 if DSTREG = SRCREG then
1132 ndpcntl.ddst_we := '1';
1134 nstate := s_srcr_dec1;
1137 ndpcntl.vmaddr_sel := c_dpath_vmaddr_dsrc;
1138 bytop := R_IDSTAT.is_bytop and not SRCDEF;
1139 do_memread_d(nstate, nvmcntl, s_srcr_inc_w, pbytop=>bytop);
1142 do_memread_i(nstate, ndpcntl, nvmcntl, s_srcr_ind1_w);
1144 when s_srcr_ind1_w =>
1145 nstate := s_srcr_ind1_w;
1147 ndpcntl.ounit_asel := c_ounit_asel_dsrc;
1149 ndpcntl.ounit_asel := c_ounit_asel_pc;
1151 ndpcntl.ounit_bsel := c_ounit_bsel_vmdout;
1152 ndpcntl.dres_sel := c_dpath_res_ounit;
1153 ndpcntl.dsrc_sel := c_dpath_dsrc_res;
1154 ndpcntl.ddst_sel := c_dpath_ddst_dst;
1155 do_memcheck(nstate, nstatus, imemok);
1157 ndpcntl.dsrc_we := '1';
1158 ndpcntl.ddst_we := '1';
1159 nstate := s_srcr_ind2;
1163 ndpcntl.vmaddr_sel := c_dpath_vmaddr_dsrc;
1164 bytop := R_IDSTAT.is_bytop and not SRCDEF;
1165 do_memread_d(nstate, nvmcntl, s_srcr_ind2_w, pbytop=>bytop);
1167 when s_srcr_ind2_w =>
1168 nstate := s_srcr_ind2_w;
1169 ndpcntl.dres_sel := c_dpath_res_vmdout;
1170 ndpcntl.dsrc_sel := c_dpath_dsrc_res;
1171 do_memcheck(nstate, nstatus, imemok);
1173 ndpcntl.dsrc_we := '1';
1174 if SRCDEF = '1' then
1175 nstate := s_srcr_def;
1177 if R_IDSTAT.do_fork_dstr = '1' then
1228 ndpcntl.vmaddr_sel := c_dpath_vmaddr_ddst;
1229 do_memread_d(nstate, nvmcntl, s_dstr_def_w,
1232 pkstack=>is_kstackdst1246 and R_IDSTAT.is_rmwop);
1234 when s_dstr_def_w =>
1235 nstate := s_dstr_def_w;
1236 do_memcheck(nstate, nstatus, imemok);
1237 ndpcntl.dres_sel := c_dpath_res_vmdout;
1238 ndpcntl.ddst_sel := c_dpath_ddst_res;
1240 ndpcntl.ddst_we := '1';
1245 ndpcntl.ounit_asel := c_ounit_asel_ddst;
1246 do_const_opsize(ndpcntl, R_IDSTAT.is_bytop, DSTDEF, DSTREG);
1247 ndpcntl.ounit_bsel := c_ounit_bsel_const;
1248 ndpcntl.dres_sel := c_dpath_res_ounit;
1249 ndpcntl.gr_adst := DSTREG;
1250 ndpcntl.gr_we := '1';
1251 nmmumoni.regmod := '1';
1252 nmmumoni.isdec := '0';
1253 ndpcntl.vmaddr_sel := c_dpath_vmaddr_ddst;
1254 macc := R_IDSTAT.is_rmwop and not DSTDEF;
1255 bytop := R_IDSTAT.is_bytop and not DSTDEF;
1256 do_memread_d(nstate, nvmcntl, s_dstr_inc_w,
1257 pbytop=>bytop, pmacc=>macc, pispace=>R_IDSTAT.is_dstpc,
1258 pkstack=>is_kstackdst1246 and R_IDSTAT.is_rmwop);
1260 when s_dstr_inc_w =>
1261 nstate := s_dstr_inc_w;
1262 ndpcntl.dres_sel := c_dpath_res_vmdout;
1263 ndpcntl.ddst_sel := c_dpath_ddst_res;
1264 do_memcheck(nstate, nstatus, imemok);
1266 ndpcntl.ddst_we := '1';
1267 if DSTDEF = '1' then
1268 nstate := s_dstr_def;
1275 ndpcntl.ounit_asel := c_ounit_asel_ddst;
1276 do_const_opsize(ndpcntl, R_IDSTAT.is_bytop, DSTDEF, DSTREG);
1277 ndpcntl.ounit_bsel := c_ounit_bsel_const;
1278 ndpcntl.ounit_opsub := '1';
1279 ndpcntl.dres_sel := c_dpath_res_ounit;
1280 ndpcntl.ddst_sel := c_dpath_ddst_res;
1281 ndpcntl.ddst_we := '1';
1282 ndpcntl.gr_adst := DSTREG;
1283 ndpcntl.gr_we := '1';
1284 nmmumoni.regmod := '1';
1285 nmmumoni.isdec := '1';
1286 nstate := s_dstr_dec1;
1289 ndpcntl.vmaddr_sel := c_dpath_vmaddr_ddst;
1290 macc := R_IDSTAT.is_rmwop and not DSTDEF;
1291 bytop := R_IDSTAT.is_bytop and not DSTDEF;
1292 do_memread_d(nstate, nvmcntl, s_dstr_inc_w,
1293 pbytop=>bytop, pmacc=>macc,
1294 pkstack=>is_kstackdst1246 and R_IDSTAT.is_rmwop);
1297 do_memread_i(nstate, ndpcntl, nvmcntl, s_dstr_ind1_w);
1299 when s_dstr_ind1_w =>
1300 nstate := s_dstr_ind1_w;
1302 ndpcntl.ounit_asel := c_ounit_asel_ddst;
1304 ndpcntl.ounit_asel := c_ounit_asel_pc;
1306 ndpcntl.ounit_bsel := c_ounit_bsel_vmdout;
1307 ndpcntl.dres_sel := c_dpath_res_ounit;
1308 ndpcntl.ddst_sel := c_dpath_ddst_res;
1309 do_memcheck(nstate, nstatus, imemok);
1311 ndpcntl.ddst_we := '1';
1312 nstate := s_dstr_ind2;
1316 ndpcntl.vmaddr_sel := c_dpath_vmaddr_ddst;
1317 macc := R_IDSTAT.is_rmwop and not DSTDEF;
1318 bytop := R_IDSTAT.is_bytop and not DSTDEF;
1319 do_memread_d(nstate, nvmcntl, s_dstr_ind2_w,
1320 pbytop=>bytop, pmacc=>macc,
1321 pkstack=>is_kstackdst1246 and R_IDSTAT.is_rmwop);
1323 when s_dstr_ind2_w =>
1324 nstate := s_dstr_ind2_w;
1325 ndpcntl.dres_sel := c_dpath_res_vmdout;
1326 ndpcntl.ddst_sel := c_dpath_ddst_res;
1327 do_memcheck(nstate, nstatus, imemok);
1329 ndpcntl.ddst_we := '1';
1330 if DSTDEF = '1' then
1331 nstate := s_dstr_def;
1380 ndpcntl.dres_sel := R_IDSTAT.res_sel;
1381 ndpcntl.vmaddr_sel := c_dpath_vmaddr_ddst;
1382 nvmcntl.kstack := is_kstackdst1246;
1383 do_memwrite(nstate, nvmcntl, s_dstw_def_w, pispace=>R_IDSTAT.is_dstpc);
1385 when s_dstw_def_w =>
1386 nstate := s_dstw_def_w;
1387 do_memcheck(nstate, nstatus, imemok);
1389 ndpcntl.psr_ccwe := '1';
1391 do_fork_next(nstate, nstatus, nmmumoni);
1395 ndpcntl.vmaddr_sel := c_dpath_vmaddr_ddst;
1396 ndpcntl.ounit_asel := c_ounit_asel_ddst;
1397 do_const_opsize(ndpcntl, R_IDSTAT.is_bytop, DSTDEF, DSTREG);
1398 ndpcntl.ounit_bsel := c_ounit_bsel_const;
1399 if DSTDEF = '0' then
1400 ndpcntl.dres_sel := R_IDSTAT.res_sel;
1401 nvmcntl.kstack := is_kstackdst1246;
1402 do_memwrite(nstate, nvmcntl, s_dstw_inc_w, pispace=>R_IDSTAT.is_dstpc);
1403 nstatus.do_grwe := '1';
1405 ndpcntl.dres_sel := c_dpath_res_ounit;
1406 ndpcntl.gr_adst := DSTREG;
1407 ndpcntl.gr_we := '1';
1408 nmmumoni.regmod := '1';
1409 nmmumoni.isdec := '0';
1410 do_memread_d(nstate, nvmcntl, s_dstw_incdef_w,
1414 when s_dstw_inc_w =>
1415 nstate := s_dstw_inc_w;
1416 ndpcntl.ounit_asel := c_ounit_asel_ddst;
1417 do_const_opsize(ndpcntl, R_IDSTAT.is_bytop, DSTDEF, DSTREG);
1418 ndpcntl.ounit_bsel := c_ounit_bsel_const;
1419 ndpcntl.dres_sel := c_dpath_res_ounit;
1420 ndpcntl.gr_adst := DSTREG;
1422 nmmumoni.regmod := '1';
1423 nmmumoni.isdec := '0';
1424 nmmumoni.trace_prev := '1';
1425 ndpcntl.gr_we := '1';
1427 nstatus.do_grwe := '0';
1428 do_memcheck(nstate, nstatus, imemok);
1430 ndpcntl.psr_ccwe := '1';
1432 do_fork_next(nstate, nstatus, nmmumoni);
1435 when s_dstw_incdef_w =>
1436 nstate := s_dstw_incdef_w;
1437 ndpcntl.dres_sel := c_dpath_res_vmdout;
1438 ndpcntl.ddst_sel := c_dpath_ddst_res;
1439 do_memcheck(nstate, nstatus, imemok);
1441 ndpcntl.ddst_we := '1';
1442 nstate := s_dstw_def246;
1446 ndpcntl.ounit_asel := c_ounit_asel_ddst;
1447 do_const_opsize(ndpcntl, R_IDSTAT.is_bytop, DSTDEF, DSTREG);
1448 ndpcntl.ounit_bsel := c_ounit_bsel_const;
1449 ndpcntl.ounit_opsub := '1';
1450 ndpcntl.dres_sel := c_dpath_res_ounit;
1451 ndpcntl.ddst_sel := c_dpath_ddst_res;
1452 ndpcntl.ddst_we := '1';
1453 ndpcntl.gr_adst := DSTREG;
1454 ndpcntl.gr_we := '1';
1455 nmmumoni.regmod := '1';
1456 nmmumoni.isdec := '1';
1457 nstate := s_dstw_dec1;
1460 ndpcntl.vmaddr_sel := c_dpath_vmaddr_ddst;
1461 ndpcntl.dres_sel := R_IDSTAT.res_sel;
1462 if DSTDEF = '0' then
1463 nvmcntl.kstack := is_kstackdst1246;
1464 do_memwrite(nstate, nvmcntl, s_dstw_def_w);
1466 do_memread_d(nstate, nvmcntl, s_dstw_incdef_w);
1470 do_memread_i(nstate, ndpcntl, nvmcntl, s_dstw_ind_w);
1472 when s_dstw_ind_w =>
1473 nstate := s_dstw_ind_w;
1475 ndpcntl.ounit_asel := c_ounit_asel_ddst;
1477 ndpcntl.ounit_asel := c_ounit_asel_pc;
1479 ndpcntl.ounit_bsel := c_ounit_bsel_vmdout;
1480 ndpcntl.dres_sel := c_dpath_res_ounit;
1481 ndpcntl.ddst_sel := c_dpath_ddst_res;
1482 do_memcheck(nstate, nstatus, imemok);
1484 ndpcntl.ddst_we := '1';
1485 nstate := s_dstw_dec1;
1488 when s_dstw_def246 =>
1489 ndpcntl.dres_sel := R_IDSTAT.res_sel;
1490 ndpcntl.vmaddr_sel := c_dpath_vmaddr_ddst;
1491 do_memwrite(nstate, nvmcntl, s_dstw_def_w);
1525 ndpcntl.ounit_asel := c_ounit_asel_ddst;
1526 ndpcntl.ounit_const := "000000010";
1527 ndpcntl.ounit_bsel := c_ounit_bsel_const;
1528 ndpcntl.dres_sel := c_dpath_res_ounit;
1529 ndpcntl.gr_adst := DSTREG;
1530 ndpcntl.gr_we := '1';
1531 nmmumoni.regmod := '1';
1532 nmmumoni.isdec := '0';
1533 ndpcntl.dsrc_sel := c_dpath_dsrc_res;
1534 if R_IDSTAT.updt_dstadsrc = '1' then
1535 ndpcntl.dsrc_we := '1';
1537 ndpcntl.vmaddr_sel := c_dpath_vmaddr_ddst;
1538 if DSTDEF = '0' then
1541 do_memread_d(nstate, nvmcntl, s_dsta_incdef_w,
1545 when s_dsta_incdef_w =>
1546 nstate := s_dsta_incdef_w;
1547 ndpcntl.dres_sel := c_dpath_res_vmdout;
1548 ndpcntl.ddst_sel := c_dpath_ddst_res;
1549 do_memcheck(nstate, nstatus, imemok);
1551 ndpcntl.ddst_we := '1';
1556 ndpcntl.ounit_asel := c_ounit_asel_ddst;
1557 ndpcntl.ounit_const := "000000010";
1558 ndpcntl.ounit_bsel := c_ounit_bsel_const;
1559 ndpcntl.ounit_opsub := '1';
1560 ndpcntl.dres_sel := c_dpath_res_ounit;
1561 ndpcntl.ddst_sel := c_dpath_ddst_res;
1562 ndpcntl.ddst_we := '1';
1563 ndpcntl.gr_adst := DSTREG;
1564 ndpcntl.gr_we := '1';
1565 nmmumoni.regmod := '1';
1566 nmmumoni.isdec := '1';
1567 ndpcntl.dsrc_sel := c_dpath_dsrc_res;
1568 if R_IDSTAT.updt_dstadsrc = '1' then
1569 ndpcntl.dsrc_we := '1';
1571 nstate := s_dsta_dec1;
1574 ndpcntl.vmaddr_sel := c_dpath_vmaddr_ddst;
1575 if DSTDEF = '0' then
1578 do_memread_d(nstate, nvmcntl, s_dsta_incdef_w);
1582 do_memread_i(nstate, ndpcntl, nvmcntl, s_dsta_ind_w);
1584 when s_dsta_ind_w =>
1585 nstate := s_dsta_ind_w;
1587 ndpcntl.ounit_asel := c_ounit_asel_ddst;
1589 ndpcntl.ounit_asel := c_ounit_asel_pc;
1591 ndpcntl.ounit_bsel := c_ounit_bsel_vmdout;
1592 ndpcntl.dres_sel := c_dpath_res_ounit;
1593 ndpcntl.ddst_sel := c_dpath_ddst_res;
1594 do_memcheck(nstate, nstatus, imemok);
1596 ndpcntl.ddst_we := '1';
1597 nstate := s_dsta_dec1;
1604 if is_kmode = '1' then
1605 nstatus.cpugo := '0';
1606 nstatus.cpurust := c_cpurust_halt;
1609 ncpuerr.illhlt := '1';
1610 nstate := s_abort_4;
1621 ndpcntl.gr_asrc := "000";
1622 ndpcntl.dsrc_sel := c_dpath_dsrc_src;
1623 ndpcntl.dsrc_we := '1';
1624 nstatus.waitsusp := '0';
1630 nstate := s_op_wait;
1631 if is_kmode = '0' then
1633 elsif int_pending = '1' or
1637 nstatus.waitsusp := '1';
1640 nstatus.cpuwait := '1';
1641 nstatus.itimer := '1';
1646 lvector := "0000" & R_IDSTAT.trap_vec;
1647 do_start_vec(nstate, ndpcntl, lvector);
1650 nstate := s_op_reset;
1651 nstatus.resetcnt := slv(unsigned(R_STATUS.resetcnt) - 1);
1652 if is_kmode = '1' then
1654 nstatus.breset := '1';
1664 ndpcntl.ounit_asel := c_ounit_asel_ddst;
1665 ndpcntl.ounit_bsel := c_ounit_bsel_const;
1666 ndpcntl.dres_sel := c_dpath_res_ounit;
1667 ndpcntl.gr_adst := c_gr_pc;
1668 ndpcntl.gr_we := '1';
1670 nstate := s_op_rts_pop;
1672 when s_op_rts_pop =>
1673 do_memread_srcinc(nstate, ndpcntl, nvmcntl, s_op_rts_pop_w,
1674 nmmumoni, pupdt_sp=>'1');
1676 when s_op_rts_pop_w =>
1677 nstate := s_op_rts_pop_w;
1678 ndpcntl.dres_sel := c_dpath_res_vmdout;
1679 ndpcntl.gr_adst := DSTREG;
1680 do_memcheck(nstate, nstatus, imemok);
1682 ndpcntl.gr_we := '1';
1684 do_fork_next(nstate, nstatus, nmmumoni);
1688 ndpcntl.dres_sel := c_dpath_res_ireg;
1689 ndpcntl.psr_func := c_psr_func_wspl;
1691 if is_kmode = '1' then
1692 ndpcntl.psr_we := '1';
1697 do_fork_next(nstate, nstatus, nmmumoni);
1701 ndpcntl.dres_sel := c_dpath_res_ireg;
1702 ndpcntl.psr_func := c_psr_func_wcc;
1703 ndpcntl.psr_we := '1';
1705 do_fork_next(nstate, nstatus, nmmumoni);
1708 nvmcntl.dspace := '0';
1709 ndpcntl.vmaddr_sel := c_dpath_vmaddr_pc;
1710 ndpcntl.ounit_asel := c_ounit_asel_pc;
1711 ndpcntl.ounit_bsel := c_ounit_bsel_ireg8;
1712 ndpcntl.dres_sel := c_dpath_res_ounit;
1714 case brcode(3 downto 1) is
1718 brcond := PSW.cc(2);
1720 brcond := PSW.cc(3) xor PSW.cc(1);
1722 brcond := PSW.cc(2) or (PSW.cc(3) xor PSW.cc(1));
1724 brcond := PSW.cc(3);
1726 brcond := PSW.cc(2) or PSW.cc(0);
1728 brcond := PSW.cc(1);
1730 brcond := PSW.cc(0);
1731 when others => null;
1734 ndpcntl.gr_adst := c_gr_pc;
1736 if brcond = brcode(0) then
1737 ndpcntl.gr_we := '1';
1739 do_fork_next(nstate, nstatus, nmmumoni);
1741 do_fork_next_pref(nstate, nstatus, ndpcntl, nvmcntl, nmmumoni);
1745 ndpcntl.ounit_asel := c_ounit_asel_pc;
1746 ndpcntl.ounit_bsel := c_ounit_bsel_ireg6;
1747 ndpcntl.dres_sel := c_dpath_res_ounit;
1748 ndpcntl.dsrc_sel := c_dpath_dsrc_res;
1749 ndpcntl.dsrc_we := '1';
1750 ndpcntl.gr_adst := c_gr_r5;
1751 ndpcntl.ddst_sel := c_dpath_ddst_dst;
1752 ndpcntl.ddst_we := '1';
1753 nstate := s_op_mark1;
1756 ndpcntl.ounit_asel := c_ounit_asel_ddst;
1757 ndpcntl.ounit_bsel := c_ounit_bsel_const;
1758 ndpcntl.dres_sel := c_dpath_res_ounit;
1759 ndpcntl.gr_adst := c_gr_pc;
1760 ndpcntl.gr_we := '1';
1762 nstate := s_op_mark_pop;
1764 when s_op_mark_pop =>
1765 do_memread_srcinc(nstate, ndpcntl, nvmcntl, s_op_mark_pop_w,
1766 nmmumoni, pupdt_sp=>'1');
1768 when s_op_mark_pop_w =>
1769 nstate := s_op_mark_pop_w;
1770 ndpcntl.dres_sel := c_dpath_res_vmdout;
1771 ndpcntl.gr_adst := c_gr_r5;
1772 do_memcheck(nstate, nstatus, imemok);
1774 ndpcntl.gr_we := '1';
1776 do_fork_next(nstate, nstatus, nmmumoni);
1783 ndpcntl.dres_sel := R_IDSTAT.res_sel;
1784 ndpcntl.gr_adst := SRCREG;
1785 ndpcntl.gr_we := '1';
1788 nstate := s_op_sob1;
1792 do_fork_next(nstate, nstatus, nmmumoni);
1796 ndpcntl.ounit_asel := c_ounit_asel_pc;
1797 ndpcntl.ounit_bsel := c_ounit_bsel_ireg6;
1798 ndpcntl.ounit_opsub := '1';
1799 ndpcntl.dres_sel := c_dpath_res_ounit;
1800 ndpcntl.gr_adst := c_gr_pc;
1801 ndpcntl.gr_we := '1';
1804 do_fork_next(nstate, nstatus, nmmumoni);
1807 nvmcntl.dspace := '0';
1808 ndpcntl.vmaddr_sel := c_dpath_vmaddr_pc;
1809 ndpcntl.gr_bytop := R_IDSTAT.is_bytop;
1810 ndpcntl.dres_sel := R_IDSTAT.res_sel;
1813 ndpcntl.gr_bytop := '0';
1816 ndpcntl.psr_ccwe := '1';
1822 ndpcntl.gr_we := '1';
1826 do_memwrite(nstate, nvmcntl, s_opg_gen_rmw_w, pmacc=>'1');
1830 nstatus.prefdone :='0';
1831 nstate := s_ifetch_w;
1832 do_memcheck(nstate, nstatus, imemok);
1834 ndpcntl.ireg_we := '1';
1835 nstate := s_idecode;
1841 do_fork_next_pref(nstate, nstatus, ndpcntl, nvmcntl, nmmumoni);
1846 when s_opg_gen_rmw_w =>
1847 nstate := s_opg_gen_rmw_w;
1848 do_memcheck(nstate, nstatus, imemok);
1851 do_fork_next(nstate, nstatus, nmmumoni);
1855 ndpcntl.dres_sel := R_IDSTAT.res_sel;
1856 ndpcntl.gr_adst := SRCREG;
1857 ndpcntl.gr_we := '1';
1858 ndpcntl.dsrc_sel := c_dpath_dsrc_res;
1859 ndpcntl.dsrc_we := '1';
1860 ndpcntl.dtmp_sel := c_dpath_dtmp_drese;
1861 ndpcntl.dtmp_we := '1';
1862 nstate := s_opg_mul1;
1865 ndpcntl.ounit_asel := c_ounit_asel_dtmp;
1866 ndpcntl.ounit_bsel := c_ounit_bsel_const;
1867 ndpcntl.dres_sel := c_dpath_res_ounit;
1868 ndpcntl.gr_adst := SRCREG(2 downto 1) & "1";
1869 ndpcntl.gr_we := '1';
1870 ndpcntl.psr_ccwe := '1';
1872 do_fork_next(nstate, nstatus, nmmumoni);
1875 ndpcntl.munit_s_div := '1';
1876 ndpcntl.gr_asrc := SRCREG(2 downto 1) & "1";
1877 ndpcntl.dtmp_sel := c_dpath_dtmp_dsrc;
1878 ndpcntl.dtmp_we := '1';
1879 nstate := s_opg_div_cn;
1881 when s_opg_div_cn =>
1882 ndpcntl.munit_s_div_cn := '1';
1883 ndpcntl.dres_sel := R_IDSTAT.res_sel;
1884 ndpcntl.dsrc_sel := c_dpath_dsrc_res;
1885 ndpcntl.dtmp_sel := c_dpath_dtmp_drese;
1886 nstate := s_opg_div_cn;
1887 if DP_STAT.div_quit = '1' then
1888 nstate := s_opg_div_quit;
1890 ndpcntl.dsrc_we := '1';
1891 ndpcntl.dtmp_we := '1';
1894 nstate := s_opg_div_cr;
1897 when s_opg_div_cr =>
1898 ndpcntl.munit_s_div_cr := '1';
1899 ndpcntl.dres_sel := R_IDSTAT.res_sel;
1900 ndpcntl.dsrc_sel := c_dpath_dsrc_res;
1901 ndpcntl.dsrc_we := DP_STAT.div_cr;
1902 nstate := s_opg_div_sq;
1904 when s_opg_div_sq =>
1905 ndpcntl.ounit_asel := c_ounit_asel_dtmp;
1906 ndpcntl.ounit_const := "00000000"&DP_STAT.div_cq;
1907 ndpcntl.ounit_bsel := c_ounit_bsel_const;
1908 ndpcntl.dres_sel := c_dpath_res_ounit;
1909 ndpcntl.gr_adst := SRCREG;
1910 ndpcntl.gr_we := '1';
1911 ndpcntl.dtmp_sel := c_dpath_dtmp_dres;
1912 ndpcntl.dtmp_we := '1';
1913 nstate := s_opg_div_sr;
1915 when s_opg_div_sr =>
1916 ndpcntl.munit_s_div_sr := '1';
1917 ndpcntl.ounit_asel := c_ounit_asel_dsrc;
1918 ndpcntl.ounit_bsel := c_ounit_bsel_const;
1919 ndpcntl.dres_sel := c_dpath_res_ounit;
1920 ndpcntl.gr_adst := SRCREG(2 downto 1) & "1";
1921 ndpcntl.gr_we := '1';
1922 ndpcntl.psr_ccwe := '1';
1923 if DP_STAT.div_quit = '1' then
1924 nstate := s_opg_div_quit;
1927 do_fork_next(nstate, nstatus, nmmumoni);
1930 when s_opg_div_quit =>
1931 ndpcntl.psr_ccwe := '1';
1933 do_fork_next(nstate, nstatus, nmmumoni);
1936 ndpcntl.munit_s_ash := '1';
1937 nstate := s_opg_ash_cn;
1939 when s_opg_ash_cn =>
1940 nvmcntl.dspace := '0';
1941 ndpcntl.dsrc_sel := c_dpath_dsrc_res;
1942 ndpcntl.ounit_asel := c_ounit_asel_dsrc;
1943 ndpcntl.ounit_bsel := c_ounit_bsel_const;
1944 ndpcntl.gr_adst := SRCREG;
1945 ndpcntl.munit_s_ash_cn := '1';
1946 ndpcntl.vmaddr_sel := c_dpath_vmaddr_pc;
1947 nstate := s_opg_ash_cn;
1949 ndpcntl.dres_sel := R_IDSTAT.res_sel;
1950 ndpcntl.dsrc_we := '1';
1952 ndpcntl.dres_sel := c_dpath_res_ounit;
1953 ndpcntl.gr_we := '1';
1954 ndpcntl.psr_ccwe := '1';
1956 do_fork_next_pref(nstate, nstatus, ndpcntl, nvmcntl, nmmumoni);
1960 ndpcntl.gr_asrc := SRCREG(2 downto 1) & "1";
1961 ndpcntl.dtmp_sel := c_dpath_dtmp_dsrc;
1962 ndpcntl.dtmp_we := '1';
1963 ndpcntl.munit_s_ashc := '1';
1964 nstate := s_opg_ashc_cn;
1966 when s_opg_ashc_cn =>
1967 ndpcntl.dsrc_sel := c_dpath_dsrc_res;
1968 ndpcntl.dtmp_sel := c_dpath_dtmp_drese;
1969 ndpcntl.ounit_asel := c_ounit_asel_dsrc;
1970 ndpcntl.ounit_bsel := c_ounit_bsel_const;
1971 ndpcntl.gr_adst := SRCREG;
1972 ndpcntl.munit_s_ashc_cn := '1';
1973 nstate := s_opg_ashc_cn;
1975 ndpcntl.dres_sel := R_IDSTAT.res_sel;
1976 ndpcntl.dsrc_we := '1';
1977 ndpcntl.dtmp_we := '1';
1979 ndpcntl.dres_sel := c_dpath_res_ounit;
1980 ndpcntl.gr_we := '1';
1981 ndpcntl.psr_ccwe := '1';
1982 nstate := s_opg_ashc_wl;
1985 when s_opg_ashc_wl =>
1986 ndpcntl.ounit_asel := c_ounit_asel_dtmp;
1987 ndpcntl.ounit_bsel := c_ounit_bsel_const;
1988 ndpcntl.dres_sel := c_dpath_res_ounit;
1989 ndpcntl.gr_adst := SRCREG(2 downto 1) & "1";
1990 ndpcntl.gr_we := '1';
1992 do_fork_next(nstate, nstatus, nmmumoni);
1997 ndpcntl.gr_asrc := c_gr_sp;
1998 ndpcntl.dsrc_sel := c_dpath_dsrc_src;
2000 nstate := s_abort_10;
2002 ndpcntl.dsrc_we := '1';
2003 nstate := s_opa_jsr1;
2007 ndpcntl.gr_asrc := SRCREG;
2008 ndpcntl.dtmp_sel := c_dpath_dtmp_dsrc;
2009 ndpcntl.dtmp_we := '1';
2011 ndpcntl.ounit_asel := c_ounit_asel_dsrc;
2012 ndpcntl.ounit_const := "000000010";
2013 ndpcntl.ounit_bsel := c_ounit_bsel_const;
2014 ndpcntl.ounit_opsub := '1';
2015 ndpcntl.dres_sel := c_dpath_res_ounit;
2016 ndpcntl.dsrc_sel := c_dpath_dsrc_res;
2017 ndpcntl.dsrc_we := '1';
2018 ndpcntl.gr_adst := c_gr_sp;
2019 ndpcntl.gr_we := '1';
2020 nmmumoni.regmod := '1';
2021 nmmumoni.isdec := '1';
2022 nstate := s_opa_jsr_push;
2024 when s_opa_jsr_push =>
2025 ndpcntl.ounit_asel := c_ounit_asel_dtmp;
2026 ndpcntl.ounit_bsel := c_ounit_bsel_const;
2027 ndpcntl.dres_sel := c_dpath_res_ounit;
2028 ndpcntl.vmaddr_sel := c_dpath_vmaddr_dsrc;
2029 nvmcntl.dspace := '1';
2030 nvmcntl.kstack := is_kmode;
2031 nvmcntl.wacc := '1';
2033 nstate := s_opa_jsr_push_w;
2035 when s_opa_jsr_push_w =>
2036 nstate := s_opa_jsr_push_w;
2037 ndpcntl.ounit_asel := c_ounit_asel_pc;
2038 ndpcntl.ounit_bsel := c_ounit_bsel_const;
2039 ndpcntl.dres_sel := c_dpath_res_ounit;
2040 ndpcntl.gr_adst := SRCREG;
2041 do_memcheck(nstate, nstatus, imemok);
2043 ndpcntl.gr_we := '1';
2044 nstate := s_opa_jsr2;
2048 ndpcntl.ounit_asel := c_ounit_asel_ddst;
2049 ndpcntl.ounit_bsel := c_ounit_bsel_const;
2050 ndpcntl.dres_sel := c_dpath_res_ounit;
2051 ndpcntl.gr_adst := c_gr_pc;
2052 ndpcntl.gr_we := '1';
2055 do_fork_next(nstate, nstatus, nmmumoni);
2058 ndpcntl.ounit_asel := c_ounit_asel_ddst;
2059 ndpcntl.ounit_bsel := c_ounit_bsel_const;
2060 ndpcntl.dres_sel := c_dpath_res_ounit;
2061 ndpcntl.gr_adst := c_gr_pc;
2063 nstate := s_abort_10;
2065 ndpcntl.gr_we := '1';
2068 do_fork_next(nstate, nstatus, nmmumoni);
2072 do_memread_srcinc(nstate, ndpcntl, nvmcntl, s_opa_mtp_pop_w,
2073 nmmumoni, pupdt_sp=>'1');
2075 when s_opa_mtp_pop_w =>
2076 nstate := s_opa_mtp_pop_w;
2077 ndpcntl.ddst_sel := c_dpath_ddst_dst;
2078 ndpcntl.ddst_we := '1';
2079 ndpcntl.dres_sel := c_dpath_res_vmdout;
2080 ndpcntl.dtmp_sel := c_dpath_dtmp_dres;
2081 do_memcheck(nstate, nstatus, imemok);
2083 ndpcntl.dtmp_we := '1';
2085 nstate := s_opa_mtp_reg;
2088 when c_fork_dsta_def => nstate := s_opa_mtp_mem;
2089 when c_fork_dsta_inc => nstate := s_dsta_inc;
2090 when c_fork_dsta_dec => nstate := s_dsta_dec;
2091 when c_fork_dsta_ind => nstate := s_dsta_ind;
2092 when others => nstate := s_cpufail;
2097 when s_opa_mtp_reg =>
2098 ndpcntl.ounit_asel := c_ounit_asel_dtmp;
2099 ndpcntl.ounit_bsel := c_ounit_bsel_const;
2100 ndpcntl.dres_sel := c_dpath_res_ounit;
2101 ndpcntl.psr_ccwe := '1';
2102 ndpcntl.gr_mode := PSW.pmode;
2103 ndpcntl.gr_we := '1';
2105 do_fork_next(nstate, nstatus, nmmumoni);
2107 when s_opa_mtp_mem =>
2108 ndpcntl.ounit_asel := c_ounit_asel_dtmp;
2109 ndpcntl.ounit_bsel := c_ounit_bsel_const;
2110 ndpcntl.dres_sel := c_dpath_res_ounit;
2111 ndpcntl.vmaddr_sel := c_dpath_vmaddr_ddst;
2112 nvmcntl.dspace := IREG(15);
2113 nvmcntl.mode := PSW.pmode;
2114 nvmcntl.wacc := '1';
2116 nstate := s_opa_mtp_mem_w;
2118 when s_opa_mtp_mem_w =>
2119 nstate := s_opa_mtp_mem_w;
2120 ndpcntl.ounit_asel := c_ounit_asel_dtmp;
2121 ndpcntl.ounit_bsel := c_ounit_bsel_const;
2122 do_memcheck(nstate, nstatus, imemok);
2124 ndpcntl.psr_ccwe := '1';
2126 do_fork_next(nstate, nstatus, nmmumoni);
2129 when s_opa_mfp_reg =>
2130 ndpcntl.gr_mode := PSW.pmode;
2131 ndpcntl.ddst_sel := c_dpath_ddst_dst;
2132 ndpcntl.ddst_we := '1';
2133 nstate := s_opa_mfp_dec;
2135 when s_opa_mfp_mem =>
2136 ndpcntl.vmaddr_sel := c_dpath_vmaddr_ddst;
2137 if PSW.cmode=c_psw_umode and
2138 PSW.cmode=c_psw_umode then
2139 nvmcntl.dspace := '1';
2141 nvmcntl.dspace := IREG(15);
2143 nvmcntl.mode := PSW.pmode;
2145 nstate := s_opa_mfp_mem_w;
2147 when s_opa_mfp_mem_w =>
2148 nstate := s_opa_mfp_mem_w;
2149 do_memcheck(nstate, nstatus, imemok);
2150 ndpcntl.dres_sel := c_dpath_res_vmdout;
2151 ndpcntl.ddst_sel := c_dpath_ddst_res;
2153 ndpcntl.ddst_we := '1';
2154 nstate := s_opa_mfp_dec;
2157 when s_opa_mfp_dec =>
2158 ndpcntl.ounit_asel := c_ounit_asel_dsrc;
2159 ndpcntl.ounit_const := "000000010";
2160 ndpcntl.ounit_bsel := c_ounit_bsel_const;
2161 ndpcntl.ounit_opsub := '1';
2162 ndpcntl.dres_sel := c_dpath_res_ounit;
2163 ndpcntl.dsrc_sel := c_dpath_dsrc_res;
2164 ndpcntl.dsrc_we := '1';
2165 ndpcntl.gr_adst := c_gr_sp;
2166 ndpcntl.gr_we := '1';
2167 nmmumoni.regmod := '1';
2168 nmmumoni.isdec := '1';
2169 nstate := s_opa_mfp_push;
2171 when s_opa_mfp_push =>
2172 ndpcntl.ounit_asel := c_ounit_asel_ddst;
2173 ndpcntl.ounit_bsel := c_ounit_bsel_const;
2174 ndpcntl.dres_sel := c_dpath_res_ounit;
2175 ndpcntl.vmaddr_sel := c_dpath_vmaddr_dsrc;
2176 nvmcntl.dspace := '1';
2177 nvmcntl.kstack := is_kmode;
2178 nvmcntl.wacc := '1';
2180 nstate := s_opa_mfp_push_w;
2182 when s_opa_mfp_push_w =>
2183 nstate := s_opa_mfp_push_w;
2184 ndpcntl.ounit_asel := c_ounit_asel_ddst;
2185 ndpcntl.ounit_bsel := c_ounit_bsel_const;
2186 do_memcheck(nstate, nstatus, imemok);
2188 ndpcntl.psr_ccwe := '1';
2190 do_fork_next(nstate, nstatus, nmmumoni);
2196 lvector := "0000001";
2197 do_start_vec(nstate, ndpcntl, lvector);
2201 lvector := "0000010";
2202 do_start_vec(nstate, ndpcntl, lvector);
2206 lvector := "0101010";
2208 lvector := "0000001";
2210 nstatus.in_vecysv := '1';
2212 lvector := "0000011";
2214 nstatus.treq_mmu := '0';
2215 nstatus.treq_ysv := '0';
2216 nstatus.treq_tbit := '0';
2217 do_start_vec(nstate, ndpcntl, lvector);
2221 do_start_vec(nstate, ndpcntl, lvector);
2226 nmmumoni.vstart := '1';
2227 nstatus.in_vecflow := '1';
2228 nvmcntl.mode := c_psw_kmode;
2229 do_memread_srcinc(nstate, ndpcntl, nvmcntl, s_vec_getpc_w, nmmumoni);
2231 when s_vec_getpc_w =>
2232 nstate := s_vec_getpc_w;
2233 ndpcntl.dres_sel := c_dpath_res_vmdout;
2234 ndpcntl.ddst_sel := c_dpath_ddst_res;
2235 do_memcheck(nstate, nstatus, imemok);
2237 nstatus.cpugo := '0';
2238 nstatus.cpurust := c_cpurust_vecfet;
2242 ndpcntl.ddst_we := '1';
2243 nstate := s_vec_getps;
2247 nvmcntl.mode := c_psw_kmode;
2248 do_memread_srcinc(nstate, ndpcntl, nvmcntl, s_vec_getps_w, nmmumoni);
2250 when s_vec_getps_w =>
2251 nstate := s_vec_getps_w;
2252 ndpcntl.dres_sel := c_dpath_res_vmdout;
2253 ndpcntl.psr_func := c_psr_func_wint;
2254 do_memcheck(nstate, nstatus, imemok);
2256 nstatus.cpugo := '0';
2257 nstatus.cpurust := c_cpurust_vecfet;
2261 ndpcntl.psr_we := '1';
2262 nstate := s_vec_getsp;
2266 ndpcntl.gr_asrc := c_gr_sp;
2267 ndpcntl.dsrc_we := '1';
2268 nstate := s_vec_decsp;
2271 ndpcntl.ounit_asel := c_ounit_asel_dsrc;
2272 ndpcntl.ounit_const := "000000010";
2273 ndpcntl.ounit_bsel := c_ounit_bsel_const;
2274 ndpcntl.ounit_opsub := '1';
2275 ndpcntl.dres_sel := c_dpath_res_ounit;
2276 ndpcntl.dsrc_sel := c_dpath_dsrc_res;
2277 ndpcntl.dsrc_we := '1';
2278 ndpcntl.gr_adst := c_gr_sp;
2279 ndpcntl.gr_we := '1';
2280 nmmumoni.regmod := '1';
2281 nmmumoni.isdec := '1';
2282 nstate := s_vec_pushps;
2284 when s_vec_pushps =>
2285 ndpcntl.ounit_asel := c_ounit_asel_dtmp;
2286 ndpcntl.ounit_bsel := c_ounit_bsel_const;
2287 ndpcntl.dres_sel := c_dpath_res_ounit;
2288 ndpcntl.vmaddr_sel := c_dpath_vmaddr_dsrc;
2289 nvmcntl.wacc := '1';
2290 nvmcntl.dspace := '1';
2291 nvmcntl.kstack := is_kmode;
2293 nstate := s_vec_pushps_w;
2295 when s_vec_pushps_w =>
2296 ndpcntl.ounit_asel := c_ounit_asel_dsrc;
2297 ndpcntl.ounit_const := "000000010";
2298 ndpcntl.ounit_bsel := c_ounit_bsel_const;
2299 ndpcntl.ounit_opsub := '1';
2300 ndpcntl.dres_sel := c_dpath_res_ounit;
2301 ndpcntl.dsrc_sel := c_dpath_dsrc_res;
2302 ndpcntl.gr_adst := c_gr_sp;
2304 nstate := s_vec_pushps_w;
2305 do_memcheck(nstate, nstatus, imemok);
2307 ndpcntl.dsrc_we := '1';
2308 ndpcntl.gr_we := '1';
2309 nmmumoni.regmod := '1';
2310 nmmumoni.isdec := '1';
2311 nstate := s_vec_pushpc;
2314 when s_vec_pushpc =>
2315 ndpcntl.ounit_asel := c_ounit_asel_pc;
2316 ndpcntl.ounit_bsel := c_ounit_bsel_const;
2317 ndpcntl.dres_sel := c_dpath_res_ounit;
2318 ndpcntl.vmaddr_sel := c_dpath_vmaddr_dsrc;
2319 nvmcntl.wacc := '1';
2320 nvmcntl.dspace := '1';
2321 nvmcntl.kstack := is_kmode;
2323 nstate := s_vec_pushpc_w;
2325 when s_vec_pushpc_w =>
2326 ndpcntl.ounit_asel := c_ounit_asel_ddst;
2327 ndpcntl.ounit_bsel := c_ounit_bsel_const;
2328 ndpcntl.dres_sel := c_dpath_res_ounit;
2329 ndpcntl.gr_adst := c_gr_pc;
2331 nstate := s_vec_pushpc_w;
2332 do_memcheck(nstate, nstatus, imemok);
2334 nstatus.treq_tbit := PSW.tflag;
2335 nstatus.in_vecflow := '0';
2336 nstatus.in_vecser := '0';
2337 nstatus.in_vecysv := '0';
2338 ndpcntl.gr_we := '1';
2340 do_fork_next(nstate, nstatus, nmmumoni);
2346 do_memread_srcinc(nstate, ndpcntl, nvmcntl, s_rti_getpc_w,
2347 nmmumoni, pupdt_sp=>'1');
2349 when s_rti_getpc_w =>
2350 nstate := s_rti_getpc_w;
2351 ndpcntl.dres_sel := c_dpath_res_vmdout;
2352 ndpcntl.ddst_sel := c_dpath_ddst_res;
2353 do_memcheck(nstate, nstatus, imemok);
2355 ndpcntl.ddst_we := '1';
2356 nstate := s_rti_getps;
2360 do_memread_srcinc(nstate, ndpcntl, nvmcntl, s_rti_getps_w,
2361 nmmumoni, pupdt_sp=>'1');
2363 when s_rti_getps_w =>
2364 nstate := s_rti_getps_w;
2365 do_memcheck(nstate, nstatus, imemok);
2366 ndpcntl.dres_sel := c_dpath_res_vmdout;
2367 if is_kmode = '1' then
2368 ndpcntl.psr_func := c_psr_func_wall;
2370 ndpcntl.psr_func := c_psr_func_wrti;
2373 ndpcntl.psr_we := '1';
2374 nstate := s_rti_newpc;
2379 nstatus.treq_tbit := PSW.tflag;
2381 nstatus.treq_tbit := '0';
2383 ndpcntl.ounit_asel := c_ounit_asel_ddst;
2384 ndpcntl.ounit_bsel := c_ounit_bsel_const;
2385 ndpcntl.dres_sel := c_dpath_res_ounit;
2386 ndpcntl.gr_adst := c_gr_pc;
2387 ndpcntl.gr_we := '1';
2390 do_fork_next(nstate, nstatus, nmmumoni);
2395 nstate := s_cpufail;
2398 ndpcntl.ounit_azero := '1';
2399 ndpcntl.ounit_const := "000000100";
2400 ndpcntl.ounit_bsel := c_ounit_bsel_const;
2401 ndpcntl.dres_sel := c_dpath_res_ounit;
2402 ndpcntl.gr_mode := c_psw_kmode;
2403 ndpcntl.gr_adst := c_gr_sp;
2405 nstatus.treq_mmu := '0';
2406 nstatus.treq_ysv := '0';
2407 nstatus.treq_tbit := '0';
2410 nstatus.cpugo := '0';
2411 nstatus.cpurust := c_cpurust_vfail;
2414 elsif R_STATUS.in_vecser = '1' then
2415 nstatus.cpugo := '0';
2416 nstatus.cpurust := c_cpurust_recser;
2421 nstatus.in_vecser := '1';
2422 nstatus.in_vecysv := '0';
2423 ndpcntl.gr_we := '1';
2426 ncpuerr.oddadr := '1';
2429 elsif R_VMSTAT.err_iobto = '1' then
2430 ncpuerr.iobto := '1';
2434 nstate := s_abort_4;
2437 ncpuerr.oddadr := '1';
2438 nstate := s_abort_4;
2441 nstate := s_abort_4;
2442 elsif R_VMSTAT.err_iobto = '1' then
2443 ncpuerr.iobto := '1';
2444 nstate := s_abort_4;
2447 lvector := "0101010";
2448 do_start_vec(nstate, ndpcntl, lvector);
2453 nstatus.cpugo := '0';
2454 nstatus.cpurust := c_cpurust_sfail;
2458 nstate := s_cpufail;
2463 nstatus.cpurust := c_cpurust_hbpt;
2464 nstatus.suspint :='1';
2469 if nstatus.suspint='1' or nstatus.suspext='1' then
2470 nstatus.cpususp := '1';
2472 nstatus.cpususp := '0';
2475 if nstatus.cmdack = '1' then
2477 nstatus.cmdbusy := '0';
2478 ndpcntl.cpdout_we := '1';
2495 nmmumoni.regnum := ndpcntl.gr_adst;
2496 nmmumoni.delta := ndpcntl.ounit_const(3 downto 0);
2508 end process proc_next;
2524 end process proc_cpstat;
2528 SNUM1 : if sys_conf_dmscnt generate
2531 variable isnum : slv8 := (others=>'0');
2533 isnum := (others=>'0');
2536 when s_idle => isnum := x"00";
2537 when s_cp_regread => isnum := x"01";
2538 when s_cp_rps => isnum := x"02";
2539 when s_cp_memr_w => isnum := x"03";
2540 when s_cp_memw_w => isnum := x"04";
2541 when s_ifetch => isnum := x"05";
2542 when s_ifetch_w => isnum := x"06";
2543 when s_idecode => isnum := x"07";
2545 when s_srcr_def => isnum := x"08";
2546 when s_srcr_def_w => isnum := x"09";
2547 when s_srcr_inc => isnum := x"0a";
2548 when s_srcr_inc_w => isnum := x"0b";
2549 when s_srcr_dec => isnum := x"0c";
2550 when s_srcr_dec1 => isnum := x"0d";
2551 when s_srcr_ind => isnum := x"0e";
2552 when s_srcr_ind1_w => isnum := x"0f";
2553 when s_srcr_ind2 => isnum := x"10";
2554 when s_srcr_ind2_w => isnum := x"11";
2556 when s_dstr_def => isnum := x"12";
2557 when s_dstr_def_w => isnum := x"13";
2558 when s_dstr_inc => isnum := x"14";
2559 when s_dstr_inc_w => isnum := x"15";
2560 when s_dstr_dec => isnum := x"16";
2561 when s_dstr_dec1 => isnum := x"17";
2562 when s_dstr_ind => isnum := x"18";
2563 when s_dstr_ind1_w => isnum := x"19";
2564 when s_dstr_ind2 => isnum := x"1a";
2565 when s_dstr_ind2_w => isnum := x"1b";
2567 when s_dstw_def => isnum := x"1c";
2568 when s_dstw_def_w => isnum := x"1d";
2569 when s_dstw_inc => isnum := x"1e";
2570 when s_dstw_inc_w => isnum := x"1f";
2571 when s_dstw_incdef_w => isnum := x"20";
2572 when s_dstw_dec => isnum := x"21";
2573 when s_dstw_dec1 => isnum := x"22";
2574 when s_dstw_ind => isnum := x"23";
2575 when s_dstw_ind_w => isnum := x"24";
2576 when s_dstw_def246 => isnum := x"25";
2578 when s_dsta_inc => isnum := x"26";
2579 when s_dsta_incdef_w => isnum := x"27";
2580 when s_dsta_dec => isnum := x"28";
2581 when s_dsta_dec1 => isnum := x"29";
2582 when s_dsta_ind => isnum := x"2a";
2583 when s_dsta_ind_w => isnum := x"2b";
2585 when s_op_halt => isnum := x"2c";
2586 when s_op_wait => isnum := x"2d";
2587 when s_op_trap => isnum := x"2e";
2588 when s_op_reset => isnum := x"2f";
2589 when s_op_rts => isnum := x"30";
2590 when s_op_rts_pop => isnum := x"31";
2591 when s_op_rts_pop_w => isnum := x"32";
2592 when s_op_spl => isnum := x"33";
2593 when s_op_mcc => isnum := x"34";
2594 when s_op_br => isnum := x"35";
2595 when s_op_mark => isnum := x"36";
2596 when s_op_mark1 => isnum := x"37";
2597 when s_op_mark_pop => isnum := x"38";
2598 when s_op_mark_pop_w => isnum := x"39";
2599 when s_op_sob => isnum := x"3a";
2600 when s_op_sob1 => isnum := x"3b";
2602 when s_opg_gen => isnum := x"3c";
2603 when s_opg_gen_rmw_w => isnum := x"3d";
2604 when s_opg_mul => isnum := x"3e";
2605 when s_opg_mul1 => isnum := x"3f";
2606 when s_opg_div => isnum := x"40";
2607 when s_opg_div_cn => isnum := x"41";
2608 when s_opg_div_cr => isnum := x"42";
2609 when s_opg_div_sq => isnum := x"43";
2610 when s_opg_div_sr => isnum := x"44";
2611 when s_opg_div_quit => isnum := x"45";
2612 when s_opg_ash => isnum := x"46";
2613 when s_opg_ash_cn => isnum := x"47";
2614 when s_opg_ashc => isnum := x"48";
2615 when s_opg_ashc_cn => isnum := x"49";
2616 when s_opg_ashc_wl => isnum := x"4a";
2618 when s_opa_jsr => isnum := x"4b";
2619 when s_opa_jsr1 => isnum := x"4c";
2620 when s_opa_jsr_push => isnum := x"4d";
2621 when s_opa_jsr_push_w => isnum := x"4e";
2622 when s_opa_jsr2 => isnum := x"4f";
2623 when s_opa_jmp => isnum := x"50";
2624 when s_opa_mtp => isnum := x"51";
2625 when s_opa_mtp_pop_w => isnum := x"52";
2626 when s_opa_mtp_reg => isnum := x"53";
2627 when s_opa_mtp_mem => isnum := x"54";
2628 when s_opa_mtp_mem_w => isnum := x"55";
2629 when s_opa_mfp_reg => isnum := x"56";
2630 when s_opa_mfp_mem => isnum := x"57";
2631 when s_opa_mfp_mem_w => isnum := x"58";
2632 when s_opa_mfp_dec => isnum := x"59";
2633 when s_opa_mfp_push => isnum := x"5a";
2634 when s_opa_mfp_push_w => isnum := x"5b";
2636 when s_abort_4 => isnum := x"5c";
2637 when s_abort_10 => isnum := x"5d";
2638 when s_trap_disp => isnum := x"5e";
2640 when s_int_ext => isnum := x"5f";
2642 when s_vec_getpc => isnum := x"60";
2643 when s_vec_getpc_w => isnum := x"61";
2644 when s_vec_getps => isnum := x"62";
2645 when s_vec_getps_w => isnum := x"63";
2646 when s_vec_getsp => isnum := x"64";
2647 when s_vec_decsp => isnum := x"65";
2648 when s_vec_pushps => isnum := x"66";
2649 when s_vec_pushps_w => isnum := x"67";
2650 when s_vec_pushpc => isnum := x"68";
2651 when s_vec_pushpc_w => isnum := x"69";
2653 when s_rti_getpc => isnum := x"6a";
2654 when s_rti_getpc_w => isnum := x"6b";
2655 when s_rti_getps => isnum := x"6c";
2656 when s_rti_getps_w => isnum := x"6d";
2657 when s_rti_newpc => isnum := x"6e";
2659 when s_vmerr => isnum := x"6f";
2660 when s_cpufail => isnum := x"70";
2663 when others => isnum := x"ff";
2666 end process proc_snum;
2671 SNUM0 : if not sys_conf_dmscnt generate
2677 if rising_edge(CLK) then
2688 end process proc_vmwait;
2691 variable isnum_con : slbit := '0';
2692 variable isnum_ins : slbit := '0';
2693 variable isnum_vec : slbit := '0';
2694 variable isnum_err : slbit := '0';
2701 when s_idle => null;
2702 when s_cp_regread => isnum_con := '1';
2703 when s_cp_rps => isnum_con := '1';
2704 when s_cp_memr_w => isnum_con := '1';
2705 when s_cp_memw_w => isnum_con := '1';
2706 when s_ifetch => isnum_ins := '1';
2707 when s_ifetch_w => isnum_ins := '1';
2708 when s_idecode => isnum_ins := '1';
2710 when s_srcr_def => isnum_ins := '1';
2711 when s_srcr_def_w => isnum_ins := '1';
2712 when s_srcr_inc => isnum_ins := '1';
2713 when s_srcr_inc_w => isnum_ins := '1';
2714 when s_srcr_dec => isnum_ins := '1';
2715 when s_srcr_dec1 => isnum_ins := '1';
2716 when s_srcr_ind => isnum_ins := '1';
2717 when s_srcr_ind1_w => isnum_ins := '1';
2718 when s_srcr_ind2 => isnum_ins := '1';
2719 when s_srcr_ind2_w => isnum_ins := '1';
2721 when s_dstr_def => isnum_ins := '1';
2722 when s_dstr_def_w => isnum_ins := '1';
2723 when s_dstr_inc => isnum_ins := '1';
2724 when s_dstr_inc_w => isnum_ins := '1';
2725 when s_dstr_dec => isnum_ins := '1';
2726 when s_dstr_dec1 => isnum_ins := '1';
2727 when s_dstr_ind => isnum_ins := '1';
2728 when s_dstr_ind1_w => isnum_ins := '1';
2729 when s_dstr_ind2 => isnum_ins := '1';
2730 when s_dstr_ind2_w => isnum_ins := '1';
2732 when s_dstw_def => isnum_ins := '1';
2733 when s_dstw_def_w => isnum_ins := '1';
2734 when s_dstw_inc => isnum_ins := '1';
2735 when s_dstw_inc_w => isnum_ins := '1';
2736 when s_dstw_incdef_w => isnum_ins := '1';
2737 when s_dstw_dec => isnum_ins := '1';
2738 when s_dstw_dec1 => isnum_ins := '1';
2739 when s_dstw_ind => isnum_ins := '1';
2740 when s_dstw_ind_w => isnum_ins := '1';
2741 when s_dstw_def246 => isnum_ins := '1';
2743 when s_dsta_inc => isnum_ins := '1';
2744 when s_dsta_incdef_w => isnum_ins := '1';
2745 when s_dsta_dec => isnum_ins := '1';
2746 when s_dsta_dec1 => isnum_ins := '1';
2747 when s_dsta_ind => isnum_ins := '1';
2748 when s_dsta_ind_w => isnum_ins := '1';
2750 when s_op_halt => isnum_ins := '1';
2751 when s_op_wait => isnum_ins := '1';
2752 when s_op_trap => isnum_ins := '1';
2753 when s_op_reset => isnum_ins := '1';
2754 when s_op_rts => isnum_ins := '1';
2755 when s_op_rts_pop => isnum_ins := '1';
2756 when s_op_rts_pop_w => isnum_ins := '1';
2757 when s_op_spl => isnum_ins := '1';
2758 when s_op_mcc => isnum_ins := '1';
2759 when s_op_br => isnum_ins := '1';
2760 when s_op_mark => isnum_ins := '1';
2761 when s_op_mark1 => isnum_ins := '1';
2762 when s_op_mark_pop => isnum_ins := '1';
2763 when s_op_mark_pop_w => isnum_ins := '1';
2764 when s_op_sob => isnum_ins := '1';
2765 when s_op_sob1 => isnum_ins := '1';
2767 when s_opg_gen => isnum_ins := '1';
2768 when s_opg_gen_rmw_w => isnum_ins := '1';
2769 when s_opg_mul => isnum_ins := '1';
2770 when s_opg_mul1 => isnum_ins := '1';
2771 when s_opg_div => isnum_ins := '1';
2772 when s_opg_div_cn => isnum_ins := '1';
2773 when s_opg_div_cr => isnum_ins := '1';
2774 when s_opg_div_sq => isnum_ins := '1';
2775 when s_opg_div_sr => isnum_ins := '1';
2776 when s_opg_div_quit => isnum_ins := '1';
2777 when s_opg_ash => isnum_ins := '1';
2778 when s_opg_ash_cn => isnum_ins := '1';
2779 when s_opg_ashc => isnum_ins := '1';
2780 when s_opg_ashc_cn => isnum_ins := '1';
2781 when s_opg_ashc_wl => isnum_ins := '1';
2783 when s_opa_jsr => isnum_ins := '1';
2784 when s_opa_jsr1 => isnum_ins := '1';
2785 when s_opa_jsr_push => isnum_ins := '1';
2786 when s_opa_jsr_push_w => isnum_ins := '1';
2787 when s_opa_jsr2 => isnum_ins := '1';
2788 when s_opa_jmp => isnum_ins := '1';
2789 when s_opa_mtp => isnum_ins := '1';
2790 when s_opa_mtp_pop_w => isnum_ins := '1';
2791 when s_opa_mtp_reg => isnum_ins := '1';
2792 when s_opa_mtp_mem => isnum_ins := '1';
2793 when s_opa_mtp_mem_w => isnum_ins := '1';
2794 when s_opa_mfp_reg => isnum_ins := '1';
2795 when s_opa_mfp_mem => isnum_ins := '1';
2796 when s_opa_mfp_mem_w => isnum_ins := '1';
2797 when s_opa_mfp_dec => isnum_ins := '1';
2798 when s_opa_mfp_push => isnum_ins := '1';
2799 when s_opa_mfp_push_w => isnum_ins := '1';
2801 when s_abort_4 => isnum_ins := '1';
2802 when s_abort_10 => isnum_ins := '1';
2803 when s_trap_disp => isnum_ins := '1';
2805 when s_int_ext => isnum_vec := '1';
2807 when s_vec_getpc => isnum_vec := '1';
2808 when s_vec_getpc_w => isnum_vec := '1';
2809 when s_vec_getps => isnum_vec := '1';
2810 when s_vec_getps_w => isnum_vec := '1';
2811 when s_vec_getsp => isnum_vec := '1';
2812 when s_vec_decsp => isnum_vec := '1';
2813 when s_vec_pushps => isnum_vec := '1';
2814 when s_vec_pushps_w => isnum_vec := '1';
2815 when s_vec_pushpc => isnum_vec := '1';
2816 when s_vec_pushpc_w => isnum_vec := '1';
2818 when s_rti_getpc => isnum_vec := '1';
2819 when s_rti_getpc_w => isnum_vec := '1';
2820 when s_rti_getps => isnum_vec := '1';
2821 when s_rti_getps_w => isnum_vec := '1';
2822 when s_rti_newpc => isnum_vec := '1';
2824 when s_vmerr => isnum_err := '1';
2825 when s_cpufail => isnum_err := '1';
2827 when others => null;
2837 end process proc_snum;
slv16 := slv( to_unsigned( 8#177766#, 16) ) ibaddr_cpuerr
cpustat_type := cpustat_init N_STATUS
cpuerr_type := cpuerr_init R_CPUERR
decode_stat_type := decode_stat_init R_IDSTAT
do_memread_srcincpnstate,pndpcntl,pnvmcntl,pwstate,pnmmumoni,pupdt_sp,
do_memwritepnstate,pnvmcntl,pwstate,pmacc,pispace,
do_fork_dstrpnstate,pidstat,
integer := 6 cpuerr_ibf_oddadr
do_fork_opgpnstate,pidstat,
vm_stat_type := vm_stat_init R_VMSTAT
do_fork_opapnstate,pidstat,
integer := 3 cpuerr_ibf_ysv
do_start_vecpnstate,pndpcntl,pvector,
integer := 4 cpuerr_ibf_iobto
integer := 5 cpuerr_ibf_nxm
do_fork_next_prefpnstate,pnstatus,pndpcntl,pnvmcntl,pnmmumoni,
state_type := s_idle R_STATE
do_memcheckpnstate,pnstatus,pmok,
do_memread_ipnstate,pndpcntl,pnvmcntl,pwstate,
do_memread_dpnstate,pnvmcntl,pwstate,pbytop,pmacc,pispace,pkstack,
(s_idle,s_cp_regread,s_cp_rps,s_cp_memr_w,s_cp_memw_w,s_ifetch,s_ifetch_w,s_idecode,s_srcr_def,s_srcr_def_w,s_srcr_inc,s_srcr_inc_w,s_srcr_dec,s_srcr_dec1,s_srcr_ind,s_srcr_ind1_w,s_srcr_ind2,s_srcr_ind2_w,s_dstr_def,s_dstr_def_w,s_dstr_inc,s_dstr_inc_w,s_dstr_dec,s_dstr_dec1,s_dstr_ind,s_dstr_ind1_w,s_dstr_ind2,s_dstr_ind2_w,s_dstw_def,s_dstw_def_w,s_dstw_inc,s_dstw_inc_w,s_dstw_incdef_w,s_dstw_dec,s_dstw_dec1,s_dstw_ind,s_dstw_ind_w,s_dstw_def246,s_dsta_inc,s_dsta_incdef_w,s_dsta_dec,s_dsta_dec1,s_dsta_ind,s_dsta_ind_w,s_op_halt,s_op_wait,s_op_trap,s_op_reset,s_op_rts,s_op_rts_pop,s_op_rts_pop_w,s_op_spl,s_op_mcc,s_op_br,s_op_mark,s_op_mark1,s_op_mark_pop,s_op_mark_pop_w,s_op_sob,s_op_sob1,s_opg_gen,s_opg_gen_rmw_w,s_opg_mul,s_opg_mul1,s_opg_div,s_opg_div_cn,s_opg_div_cr,s_opg_div_sq,s_opg_div_sr,s_opg_div_quit,s_opg_ash,s_opg_ash_cn,s_opg_ashc,s_opg_ashc_cn,s_opg_ashc_wl,s_opa_jsr,s_opa_jsr1,s_opa_jsr_push,s_opa_jsr_push_w,s_opa_jsr2,s_opa_jmp,s_opa_mtp,s_opa_mtp_pop_w,s_opa_mtp_reg,s_opa_mtp_mem,s_opa_mtp_mem_w,s_opa_mfp_reg,s_opa_mfp_mem,s_opa_mfp_mem_w,s_opa_mfp_dec,s_opa_mfp_push,s_opa_mfp_push_w,s_abort_4,s_abort_10,s_trap_disp,s_int_ext,s_vec_getpc,s_vec_getpc_w,s_vec_getps,s_vec_getps_w,s_vec_getsp,s_vec_decsp,s_vec_pushps,s_vec_pushps_w,s_vec_pushpc,s_vec_pushpc_w,s_rti_getpc,s_rti_getpc_w,s_rti_getps,s_rti_getps_w,s_rti_newpc,s_vmerr,s_cpufail) state_type
cpuerr_type := cpuerr_init N_CPUERR
integer := 7 cpuerr_ibf_illhlt
cpustat_type := cpustat_init R_STATUS
decode_stat_type := decode_stat_init N_IDSTAT
vm_cntl_type := vm_cntl_init VM_CNTL_L
integer := 2 cpuerr_ibf_rsv
slbit := '0' IBSEL_CPUERR
do_const_opsizepndpcntl,pbytop,pisdef,pregnum,
do_fork_nextpnstate,pnstatus,pnmmumoni,
in ID_STAT decode_stat_type
out DP_CNTL dpath_cntl_type
out MMU_MONI mmu_moni_type
out DM_STAT_SE dm_stat_se_type
in DP_STAT dpath_stat_type
std_logic_vector( 3 downto 0) slv4
std_logic_vector( 2 downto 0) slv3
std_logic_vector( 8 downto 2) slv9_2
std_logic_vector( 15 downto 0) slv16
std_logic_vector( 7 downto 0) slv8
std_logic_vector( 1 downto 0) slv2