URL
https://opencores.org/ocsvn/mlite/mlite/trunk
[/] [mlite/] [tags/] [V3_0/] [vhdl/] [reg_bank.vhd] - Diff between revs 128 and 132
Go to most recent revision |
Show entire file |
Details |
Blame |
View Log
Rev 128 |
Rev 132 |
Line 14... |
Line 14... |
use ieee.std_logic_1164.all;
|
use ieee.std_logic_1164.all;
|
use ieee.std_logic_unsigned.all;
|
use ieee.std_logic_unsigned.all;
|
use work.mlite_pack.all;
|
use work.mlite_pack.all;
|
|
|
entity reg_bank is
|
entity reg_bank is
|
generic(memory_type : string := "GENERIC");
|
generic(memory_type : string := "DEFAULT");
|
port(clk : in std_logic;
|
port(clk : in std_logic;
|
reset_in : in std_logic;
|
reset_in : in std_logic;
|
pause : in std_logic;
|
pause : in std_logic;
|
rs_index : in std_logic_vector(5 downto 0);
|
rs_index : in std_logic_vector(5 downto 0);
|
rt_index : in std_logic_vector(5 downto 0);
|
rt_index : in std_logic_vector(5 downto 0);
|
Line 105... |
Line 105... |
|
|
-- Option #1
|
-- Option #1
|
-- One tri-port RAM, two read-ports, one write-port
|
-- One tri-port RAM, two read-ports, one write-port
|
-- 32 registers 32-bits wide
|
-- 32 registers 32-bits wide
|
tri_port_mem:
|
tri_port_mem:
|
if memory_type = "GENERIC" generate
|
if memory_type = "DEFAULT" generate
|
ram_proc: process(clk, addr_a1, addr_a2, addr_b, reg_dest_new,
|
ram_proc: process(clk, addr_a1, addr_a2, addr_b, reg_dest_new,
|
write_enable)
|
write_enable)
|
variable tri_port_ram : ram_type;
|
variable tri_port_ram : ram_type;
|
begin
|
begin
|
data_out1 <= tri_port_ram(conv_integer(addr_a1));
|
data_out1 <= tri_port_ram(conv_integer(addr_a1));
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.