CARVIEW |
Select Language
HTTP/2 200
date: Tue, 14 Oct 2025 23:56:23 GMT
content-type: text/html; charset=UTF-8
server: cloudflare
x-frame-options: DENY
x-content-type-options: nosniff
x-xss-protection: 1;mode=block
vary: accept-encoding
cf-cache-status: DYNAMIC
content-encoding: gzip
set-cookie: _csrf-frontend=5f2244833d39ddc6d08a3b56348aa1852a19e93c4e92588f10d66a0d73377ce6a%3A2%3A%7Bi%3A0%3Bs%3A14%3A%22_csrf-frontend%22%3Bi%3A1%3Bs%3A32%3A%221SvnqeuAU3vmEZ_w2ZXnk8pMHWpbWU_N%22%3B%7D; HttpOnly; Path=/
cf-ray: 98eb0352b958d3d4-BLR
ARM_RAMB_4kx32 - Pastebin.com
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --------------------------------------------------------------------------------
- -- Wrapper um Basys3-Blockram fuer den RAM des HWPR-Prozessors.
- --------------------------------------------------------------------------------
- -- Datum: 23.05.2022
- -- Version: 1.1
- --------------------------------------------------------------------------------
- library ieee;
- use ieee.std_logic_1164.all;
- use ieee.numeric_std.all;
- entity ArmRAMB_4kx32 is
- generic(
- --------------------------------------------------------------------------------
- -- SELECT_LINES ist fuer das HWPR irrelevant, wird aber in einer
- -- komplexeren Variante dieses Speichers zur Groessenauswahl
- -- benoetigt. Im Hardwarepraktikum bitte ignorieren und nicht aendern.
- --------------------------------------------------------------------------------
- SELECT_LINES : natural range 0 to 2 := 1);
- port(
- RAM_CLK : in std_logic;
- ENA : in std_logic;
- ADDRA : in std_logic_vector(11 downto 0);
- WEB : in std_logic_vector(3 downto 0);
- ENB : in std_logic;
- ADDRB : in std_logic_vector(11 downto 0);
- DIB : in std_logic_vector(31 downto 0);
- DOA : out std_logic_vector(31 downto 0);
- DOB : out std_logic_vector(31 downto 0));
- end entity ArmRAMB_4kx32;
- architecture behavioral of ArmRAMB_4kx32 is
- type ram_type is array (4095 downto 0) of std_logic_vector(31 downto 0);
- signal RAM : ram_type;
- begin
- WRITE_AND_READ: process(RAM_CLK)
- begin
- if(rising_edge(RAM_CLK)) then
- if (ENA = '1') then --wenn enable A, lesen aus dem RAM anstelle (int) der entsprechenden Register Adresse
- DOA <= RAM(to_integer(unsigned(ADDRA)));
- end if;
- -- DIB hat die Form: |++++|++++|++++|++++| besteht aus 32 Bit - 4 Bloecken
- if (ENB = '1') then --wenn enable B, kann man aus B lesen oder auf B schreiben, je nach WEB
- if (WEB = "0000") then --lesezugriff auf port B
- DOB <= RAM(to_integer(unsigned(ADDRB)));
- end if;
- if (WEB(0) = '1') then --erstes block (die letzten 8Bit) schreiben
- RAM(to_integer(unsigned(ADDRB)))(7 downto 0) <= DIB(7 downto 0);
- end if;
- if (WEB(1) = '1') then -- zweites block
- RAM(to_integer(unsigned(ADDRB)))(15 downto 8) <= DIB(15 downto 8);
- end if;
- if (WEB(2) = '1') then --drittes block
- RAM(to_integer(unsigned(ADDRB)))(23 downto 16) <= DIB(23 downto 16);
- end if;
- if (WEB(3) = '1') then --viertes block
- RAM(to_integer(unsigned(ADDRB)))(31 downto 24) <= DIB(31 downto 24);
- end if;
- end if;
- end if;
- end process;
- end architecture behavioral;
Advertisement
Add Comment
Please, Sign In to add comment
-
⚡ Crypto Swap Glitch ✅ Working ⚡
JavaScript | 4 sec ago | 0.24 KB
-
💵 Make 3000$ in 20 minutes 💵
JavaScript | 15 sec ago | 0.24 KB
-
🔥 Exchange profit method
JavaScript | 24 sec ago | 0.24 KB
-
⭐⭐⭐Swapzone.io Glitch (Working)⭐⭐
Java | 32 sec ago | 0.15 KB
-
⭐⭐⭐MAKE $9OO INSTANTLY D M⭐⭐
Java | 39 sec ago | 0.15 KB
-
🚨 Free Crypto Method 🚨
JavaScript | 41 sec ago | 0.24 KB
-
⭐⭐⭐Crypto Accounts⭐⭐
Java | 43 sec ago | 0.15 KB
-
⭐⭐⭐Instant Profit Method⭐⭐
Java | 50 sec ago | 0.15 KB
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand