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

Subversion Repositories zpu

[/] [zpu/] [trunk/] [zpu/] [example/] [hello world/] [helloworld.vhd_footer] - Rev 95

Compare with Previous | Blame | View Log

        others => x"00000000"
);

begin

process (clk)
begin
        if (clk'event and clk = '1') then
                if (memAWriteEnable = '1') and (memBWriteEnable = '1') and (memAAddr=memBAddr) and (memAWrite/=memBWrite) then
                        report "write collision" severity failure;
                end if;
        
                if (memAWriteEnable = '1') then
                        ram(to_integer(unsigned(memAAddr))) := memAWrite;
                        memARead <= memAWrite;
                else
                        memARead <= ram(to_integer(unsigned(memAAddr)));
                end if;
        end if;
end process;

process (clk)
begin
        if (clk'event and clk = '1') then
                if (memBWriteEnable = '1') then
                        ram(to_integer(unsigned(memBAddr))) := memBWrite;
                        memBRead <= memBWrite;
                else
                        memBRead <= ram(to_integer(unsigned(memBAddr)));
                end if;
        end if;
end process;




end dualport_ram_arch;

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

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