-- ------------------------------------------ -- description du status du DLX-m en VHDL - -- version m0.3 -- 4 decembre 1992 -- ------------------------------------------ -- -- le chemin de test n'est pas implemente, seuls figurent les connecteurs -- associes scout, fonc . -- Dans la simulation fonc doit etre a 1, scout doivent etre -- mis a zero . entity dlxm_sts is port( ck : in bit ; -- horloge externe gel : in bit ; -- gel externe st_datain : in bit_vector(31 downto 0) ; -- data du d_p pour modif status w_sr : in bit ; -- m_ins(16)=st_datain enable reset : in bit ; -- connecteur externe reset ovr : in bit ; -- flag calcule dans data_path ipc : in bit ; -- flag calcule dans dpt byte : in bit ; -- ................. controle ico : in bit ; -- ................. controle data : in bit ; -- flag acces memoire ........ mem : in bit ; -- .......................... it : in bit_vector(3 downto 0) ; -- connecteur externe adr01 : in bit_vector(1 downto 0) ; -- bits poids faible adr du d_path adr31 : in bit ; -- bit ... fort .......... rqst : out bit ; -- signal int. masquable excp : out bit ; -- ..... exception non masquable --rst : out bit ; -- signal requete reset non masqu. st_datout : out bit_vector(31 downto 0) ; -- registre status mis a jour fonc : in bit ; scout : out bit ; vdd : in bit ; vss : in bit ) ; end dlxm_sts ; architecture FONCTIONAL of dlxm_sts is -- -------------------------- -- - Definition des signaux - -- -------------------------- signal d_status : reg_vector(31 downto 0) register ; signal sh_reset : bit ; signal sh_iav : bit ; signal sh_ico : bit ; signal sh_dav : bit ; signal sh_ovr : bit ; signal sh_it : bit_vector(3 downto 0) ; -- ---------------------------------- -- - ecriture des shifter du status - -- ---------------------------------- begin sh_reset <= st_datain(3) when (w_sr='1') else '1' when (reset='1') else '0' ; sh_iav <= st_datain(8) when (w_sr='1') else '1' when (ipc='1') else -- ((data='1') and (mem='0') and (adr01/=B"00")) '0' ; --(data='1') and (mem='0') and (adr31='1') and (d_status(0)='1')) sh_ico <= st_datain(9) when (w_sr='1') else '1' when ( ico ='1') else '0'; sh_dav <= st_datain(10) when (w_sr='1') else '1' when (( adr01/= B"00") and (byte='0') and (data='0') and (mem='0')) else '1' when (( adr31='1') and (data='0') and (mem='0') and (d_status(0)='1')) else '0' ; sh_ovr <= st_datain(11) when (w_sr='1') else '1' when ( ovr='1' ) else '0' ; sh_it <= st_datain(15 downto 12) when (w_sr='1') else it(3 downto 0) ; -- ------------------------------------ -- - ecriture dans les bascules du sr - -- ------------------------------------ -- reset et exceptions sont dans "pieges a 1" -------------------------- -- ainsi que les interruptions ------------------------------------------------------------------------ binactif_sr : block (((not ck) and (not gel))='1' and not ck'STABLE) begin with w_sr select d_status(2 downto 0) <= guarded st_datain(2 downto 0) when '1', d_status(2 downto 0) when others ; with w_sr select d_status(7 downto 4) <= guarded st_datain(7 downto 4) when '1', d_status(7 downto 4) when others ; with w_sr select d_status(31 downto 16) <= guarded st_datain(31 downto 16) when '1', d_status(31 downto 16) when others; with (w_sr & reset) select d_status(3) <= guarded d_status(3) when B"00", sh_reset when others; with (w_sr & sh_iav) select d_status(8) <= guarded d_status(8) when B"00", sh_iav when others; with (w_sr & sh_ico) select d_status(9) <= guarded d_status(9) when B"00", sh_ico when others; with (w_sr & sh_dav) select d_status(10) <= guarded d_status(10) when B"00", sh_dav when others; with (w_sr & sh_ovr) select d_status(11) <= guarded d_status(11) when B"00", sh_ovr when others; with (w_sr & sh_it(3)) select d_status(15) <= guarded d_status(15) when B"00", sh_it(3) when others ; with (w_sr & sh_it(2)) select d_status(14) <= guarded d_status(14) when B"00", sh_it(2) when others ; with (w_sr & sh_it(1)) select d_status(13) <= guarded d_status(13) when B"00", sh_it(1) when others ; with (w_sr & sh_it(0)) select d_status(12) <= guarded d_status(12) when B"00", sh_it(0) when others ; end block; -- -------------------------- -- - definition des sorties - -- -------------------------- -- -- le chemin de test n est pas implemente ------ -- scout <= '0' ; -- st_datout (31 downto 0) <= d_status(31 downto 0) ; rqst <= '1' when ((d_status(15 downto 12)/=B"0000") and (d_status(1)='1')) else '0' ; excp <= '1' when (d_status(11 downto 10)/=B"00") or (d_status(8)/='0') else '0' ; --rst <= d_status(3) ; end FONCTIONAL;