OpenCores
URL https://opencores.org/ocsvn/potato/potato/trunk

Subversion Repositories potato

[/] [potato/] [trunk/] [src/] [pp_memory.vhd] - Diff between revs 45 and 58

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 45 Rev 58
Line 82... Line 82...
 
 
                                if exception_in = '1' then
                                if exception_in = '1' then
                                        mem_op <= MEMOP_TYPE_NONE;
                                        mem_op <= MEMOP_TYPE_NONE;
                                        rd_write_out <= '0';
                                        rd_write_out <= '0';
                                        csr_write_out <= CSR_WRITE_REPLACE;
                                        csr_write_out <= CSR_WRITE_REPLACE;
                                        csr_addr_out <= CSR_EPC;
                                        csr_addr_out <= CSR_MEPC;
                                        csr_data_out <= pc;
                                        csr_data_out <= pc;
                                        count_instr_out <= '0';
                                        count_instr_out <= '0';
                                else
                                else
                                        mem_op <= mem_op_in;
                                        mem_op <= mem_op_in;
                                        rd_write_out <= rd_write_in;
                                        rd_write_out <= rd_write_in;
Line 106... Line 106...
                                exception_out <= '0';
                                exception_out <= '0';
                        else
                        else
                                exception_out <= exception_in or to_std_logic(branch = BRANCH_SRET);
                                exception_out <= exception_in or to_std_logic(branch = BRANCH_SRET);
 
 
                                if exception_in = '1' then
                                if exception_in = '1' then
                                        exception_context_out.status <= (
                                        exception_context_out.ie <= '0';
                                                        pim => exception_context_in.status.im,
                                        exception_context_out.ie1 <= exception_context_in.ie;
                                                        im => (others => '0'),
 
                                                        pei => exception_context_in.status.ei,
 
                                                        ei => '0'
 
                                                );
 
                                        exception_context_out.cause <= exception_context_in.cause;
                                        exception_context_out.cause <= exception_context_in.cause;
                                        exception_context_out.badvaddr <= exception_context_in.badvaddr;
                                        exception_context_out.badaddr <= exception_context_in.badaddr;
                                elsif branch = BRANCH_SRET then
                                elsif branch = BRANCH_SRET then
                                        exception_context_out.status <= (
                                        exception_context_out.ie <= exception_context_in.ie1;
                                                        pim => exception_context_in.status.pim,
                                        exception_context_out.ie1 <= exception_context_in.ie;
                                                        im => exception_context_in.status.pim,
 
                                                        pei => exception_context_in.status.pei,
 
                                                        ei => exception_context_in.status.pei
 
                                                );
 
                                        exception_context_out.cause <= CSR_CAUSE_NONE;
                                        exception_context_out.cause <= CSR_CAUSE_NONE;
                                        exception_context_out.badvaddr <= (others => '0');
                                        exception_context_out.badaddr <= (others => '0');
                                else
                                else
                                        exception_context_out.status <= exception_context_in.status;
                                        exception_context_out.ie <= exception_context_in.ie;
 
                                        exception_context_out.ie1 <= exception_context_in.ie1;
                                        exception_context_out.cause <= CSR_CAUSE_NONE;
                                        exception_context_out.cause <= CSR_CAUSE_NONE;
                                        exception_context_out.badvaddr <= (others => '0');
                                        exception_context_out.badaddr <= (others => '0');
                                end if;
                                end if;
                        end if;
                        end if;
                end if;
                end if;
        end process update_exception_context;
        end process update_exception_context;
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.