Line 37... |
Line 37... |
--//// useful, but WITHOUT ANY WARRANTY; without even the implied ////
|
--//// useful, but WITHOUT ANY WARRANTY; without even the implied ////
|
--//// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR ////
|
--//// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR ////
|
--//// PURPOSE. See the GNU Lesser General Public License for more ////
|
--//// PURPOSE. See the GNU Lesser General Public License for more ////
|
--//// details. ////
|
--//// details. ////
|
--//// ////
|
--//// ////
|
--//// You should have received WIDTH_ADDRESS copy of the GNU Lesser General ////
|
--//// You should have received a copy of the GNU Lesser General ////
|
--//// Public License along with this source; if not, download it ////
|
--//// Public License along with this source; if not, download it ////
|
--//// from http://www.opencores.org/lgpl.shtml ////
|
--//// from http://www.opencores.org/lgpl.shtml ////
|
--//// ////
|
--//// ////
|
--//////////////////////////////////////////////////////////////////////
|
--//////////////////////////////////////////////////////////////////////
|
|
|
|
|
library ieee;
|
library ieee;
|
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 ieee.numeric_std.all;
|
use ieee.numeric_std.all;
|
|
|
Line 72... |
Line 73... |
subtype word_t is std_logic_vector((WIDTH_WORD-1) downto 0);
|
subtype word_t is std_logic_vector((WIDTH_WORD-1) downto 0);
|
type memory_t is array(2**WIDTH_ADDRESS-1 downto 0) of word_t;
|
type memory_t is array(2**WIDTH_ADDRESS-1 downto 0) of word_t;
|
|
|
signal ram : memory_t;
|
signal ram : memory_t;
|
attribute ram_init_file : string;
|
attribute ram_init_file : string;
|
-- attribute ram_init_file of ram : signal is "sumador.mif"; --code sumador.txt
|
attribute ram_init_file of ram : signal is "adder.mif"; --code adder.txt
|
attribute ram_init_file of ram : signal is "fibonacci.mif"; --code fibonacci.txt
|
-- attribute ram_init_file of ram : signal is "fibonacci.mif"; --code fibonacci.txt
|
|
|
signal addr_reg_s : unsigned((WIDTH_ADDRESS-1) downto 0);
|
signal addr_reg_s : unsigned((WIDTH_ADDRESS-1) downto 0);
|
|
|
begin
|
begin
|
|
|