Skip to content
Snippets Groups Projects
Commit bb12daa4 authored by Matthieu Cattin's avatar Matthieu Cattin
Browse files

genrams: Fix constants assigned to input ports -> incompatible with VHDL'93.

Replaced by a function taking the number of bits in parameter and returning a vector.
parent e2b3df34
No related merge requests found
......@@ -6,7 +6,7 @@
-- Author : Tomasz Wlostowski
-- Company : CERN BE-CO-HT
-- Created : 2011-01-25
-- Last update: 2012-01-24
-- Last update: 2013-10-30
-- Platform :
-- Standard : VHDL'93
-------------------------------------------------------------------------------
......@@ -38,11 +38,13 @@
library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;
package genram_pkg is
function f_log2_size (A : natural) return natural;
function f_gen_dummy_vec (val : std_logic; size : natural) return std_logic_vector;
function f_zeros (size : integer) return std_logic_vector;
type t_generic_ram_init is array (integer range <>, integer range <>) of std_logic;
......@@ -212,5 +214,11 @@ package body genram_pkg is
return tmp;
end f_gen_dummy_vec;
function f_zeros(size : integer)
return std_logic_vector is
begin
return std_logic_vector(to_unsigned(0, size));
end f_zeros;
end genram_pkg;
......@@ -6,7 +6,7 @@
-- Author : Wesley W. Terpstra
-- Company : GSI
-- Created : 2013-03-04
-- Last update: 2013-03-04
-- Last update: 2013-10-30
-- Platform :
-- Standard : VHDL'93
-------------------------------------------------------------------------------
......@@ -70,6 +70,7 @@ end generic_simple_dpram;
architecture syn of generic_simple_dpram is
begin
-- Works well enough until a Xilinx guru can optimize it.
......@@ -90,10 +91,10 @@ begin
da_i => da_i,
qa_o => open,
clkb_i => clkb_i,
bweb_i => (others => '0'),
bweb_i => f_zeros((g_data_width+7)/8),
web_i => '0',
ab_i => ab_i,
db_i => (others => '0'),
db_i => f_zeros(g_data_width),
qb_o => qb_o);
end syn;
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment