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

Subversion Repositories zpu

[/] [zpu/] [trunk/] [zpu/] [example/] [hello world/] [helloworld.vhd_footer] - Blame information for rev 95

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 95 oharboe
        others => x"00000000"
2
);
3
 
4
begin
5
 
6
process (clk)
7
begin
8
        if (clk'event and clk = '1') then
9
                if (memAWriteEnable = '1') and (memBWriteEnable = '1') and (memAAddr=memBAddr) and (memAWrite/=memBWrite) then
10
                        report "write collision" severity failure;
11
                end if;
12
 
13
                if (memAWriteEnable = '1') then
14
                        ram(to_integer(unsigned(memAAddr))) := memAWrite;
15
                        memARead <= memAWrite;
16
                else
17
                        memARead <= ram(to_integer(unsigned(memAAddr)));
18
                end if;
19
        end if;
20
end process;
21
 
22
process (clk)
23
begin
24
        if (clk'event and clk = '1') then
25
                if (memBWriteEnable = '1') then
26
                        ram(to_integer(unsigned(memBAddr))) := memBWrite;
27
                        memBRead <= memBWrite;
28
                else
29
                        memBRead <= ram(to_integer(unsigned(memBAddr)));
30
                end if;
31
        end if;
32
end process;
33
 
34
 
35
 
36
 
37
end dualport_ram_arch;

powered by: WebSVN 2.1.0

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