Skip to content

Commit

Permalink
memory-blocks/ram-2-port: adicionar arquivo .mif
Browse files Browse the repository at this point in the history
  • Loading branch information
goll72 committed Oct 15, 2024
1 parent ff580ec commit 9683b3d
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 6 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,5 @@
!*.build.mk
!setup.bat
!setup.sh

!**/*.mif
25 changes: 25 additions & 0 deletions memory-blocks/ram-2-port/ram.mif
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
DEPTH = 32;
WIDTH = 4;

ADDRESS_RADIX = HEX;
DATA_RADIX = HEX;

CONTENT BEGIN

00: 0;
01: D;
[02..06]: F;
07: 8;
[08..0E]: 0;
0F: F;
10: 0;
11: 1;
12: 2;
13: 3;
14: 4;
15: 5;
[16..1A]: E;
[1B..1E]: A;
1F: F;

END;
12 changes: 6 additions & 6 deletions memory-blocks/ram-2-port/ram32x4.vhdl
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@ USE altera_mf.altera_mf_components.all;
ENTITY ram32x4 IS
PORT
(
clock : IN STD_LOGIC := '1';
data : IN STD_LOGIC_VECTOR (3 DOWNTO 0);
rdaddress : IN STD_LOGIC_VECTOR (4 DOWNTO 0);
wraddress : IN STD_LOGIC_VECTOR (4 DOWNTO 0);
wren : IN STD_LOGIC := '0';
q : OUT STD_LOGIC_VECTOR (3 DOWNTO 0)
clock : IN STD_LOGIC := '1';
data : IN STD_LOGIC_VECTOR (3 DOWNTO 0);
rdaddress : IN STD_LOGIC_VECTOR (4 DOWNTO 0);
wraddress : IN STD_LOGIC_VECTOR (4 DOWNTO 0);
wren : IN STD_LOGIC := '0';
q : OUT STD_LOGIC_VECTOR (3 DOWNTO 0)
);
END ram32x4;

Expand Down

0 comments on commit 9683b3d

Please sign in to comment.