- status register is always writable
Committed on the Free edition of March Hare Software CVSNT Server. Upgrade to CVS Suite for more features and support: http://march-hare.com/cvsnt/ git-svn-id: http://moon:8086/svn/vhdl/trunk@457 cc03376c-175c-47c8-b038-4cd826a8556b
This commit is contained in:
@@ -68,6 +68,7 @@ architecture Behavioral of cop is
|
||||
signal code_reg_we : STD_LOGIC;
|
||||
signal ip_reg_we : STD_LOGIC;
|
||||
signal bd : STD_LOGIC;
|
||||
signal sw_int : unsigned(1 downto 0);
|
||||
signal ip : unsigned(7 downto 0);
|
||||
signal im : unsigned(7 downto 0);
|
||||
signal status_save : STD_LOGIC;
|
||||
@@ -330,13 +331,13 @@ cop_ip_reg_write:
|
||||
begin
|
||||
if rising_edge(clk) then
|
||||
if rst = '1' then
|
||||
ip(1 downto 0) <= (others => '0');
|
||||
sw_int <= (others => '0');
|
||||
elsif ctrl_in.sdu.WB_nop = '0' then
|
||||
if ip_reg_we = '1' then
|
||||
ip(1 downto 0) <= din(9 downto 8) and im(1 downto 0);
|
||||
sw_int <= din(9 downto 8);
|
||||
end if;
|
||||
end if;
|
||||
ip(7 downto 2) <= int and im(7 downto 2);
|
||||
ip <= (int & sw_int) and im;
|
||||
end if;
|
||||
end process;
|
||||
|
||||
@@ -420,9 +421,9 @@ cop_we_gen:
|
||||
case cop_pipe_EX.reg_ptr is
|
||||
|
||||
when "01100" =>
|
||||
stat_reg_we <= not status(1) or status(28);
|
||||
stat_reg_we <= '1'; -- not status(1) or status(28);
|
||||
when "01101" =>
|
||||
ip_reg_we <= not status(1) or status(28);
|
||||
ip_reg_we <= '1'; -- not status(1) or status(28);
|
||||
when "11111" =>
|
||||
test_reg_we <= '1'; -- not status(1) or status(28);
|
||||
when others => null;
|
||||
@@ -464,7 +465,7 @@ cop_status_reg_write:
|
||||
status(3 downto 2) <= status(5 downto 4);
|
||||
elsif ctrl_in.sdu.WB_nop = '0' then
|
||||
if stat_reg_we = '1' then
|
||||
status <= din;
|
||||
status <= din;
|
||||
end if;
|
||||
end if;
|
||||
end if;
|
||||
|
||||
Reference in New Issue
Block a user