URL
https://opencores.org/ocsvn/xucpu/xucpu/trunk
[/] [xucpu/] [trunk/] [src/] [components/] [BRAM/] [tb_generic_ram.vhdl] - Diff between revs 23 and 25
Go to most recent revision |
Show entire file |
Details |
Blame |
View Log
Rev 23 |
Rev 25 |
Line 19... |
Line 19... |
|
|
LIBRARY ieee;
|
LIBRARY ieee;
|
USE ieee.std_logic_1164.ALL;
|
USE ieee.std_logic_1164.ALL;
|
USE ieee.numeric_std.ALL;
|
USE ieee.numeric_std.ALL;
|
USE work.RAM.ALL;
|
USE work.RAM.ALL;
|
|
USE work.hexio.ALL;
|
|
|
-- Test bench for instatiating a memory and initialising
|
-- Test bench for instatiating a memory and initialising
|
-- it from a file.
|
-- it from a file.
|
|
|
ENTITY tb_generic_ram IS
|
ENTITY tb_generic_ram IS
|
Line 39... |
Line 40... |
SIGNAL data_i : STD_LOGIC_VECTOR(15 DOWNTO 0) := (OTHERS => '0');
|
SIGNAL data_i : STD_LOGIC_VECTOR(15 DOWNTO 0) := (OTHERS => '0');
|
SIGNAL data_o : STD_LOGIC_VECTOR(15 DOWNTO 0);
|
SIGNAL data_o : STD_LOGIC_VECTOR(15 DOWNTO 0);
|
SIGNAL inst_o : STD_LOGIC_VECTOR(15 DOWNTO 0);
|
SIGNAL inst_o : STD_LOGIC_VECTOR(15 DOWNTO 0);
|
|
|
SIGNAL ctr_a : NATURAL RANGE 0 TO (2**w_addr - 1);
|
SIGNAL ctr_a : NATURAL RANGE 0 TO (2**w_addr - 1);
|
|
CONSTANT dummy : INTEGER := notify_f("Initialising tb_generic_ram");
|
|
|
BEGIN -- ARCHITECTURE Structural
|
BEGIN -- ARCHITECTURE Structural
|
|
|
|
-- purpose: Data dumping when simulation starts
|
|
-- type : combinational
|
|
-- inputs :
|
|
-- outputs:
|
|
dump1: PROCESS IS
|
|
BEGIN -- PROCESS dump1
|
|
notify("Simulation of tb_generic_ram starts");
|
|
WAIT;
|
|
END PROCESS dump1;
|
|
|
RAM1 : memory
|
RAM1 : memory
|
GENERIC MAP (
|
GENERIC MAP (
|
filename => "test_data.txt",
|
filename => "test_data.txt",
|
w_addr => w_addr)
|
w_addr => w_addr)
|
PORT MAP (
|
PORT MAP (
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.