I dont' see it... I based my code on an example that is in my program
documentation on how to create a Block RAM.
See
http://toolbox.xilinx.com/docsan/3_1...2/xst02013.htm,
section "Single-Port RAM with Synchronous Read (Read Through)".
Note that my synth tool is saying it will use a dual-port RAM, when it is
clearly a single-port RAM... I suppose it has to do with the large size of
the address input (15 downto 0).
I sum up my question: I simply want to create a 65,535 x 16-bit RAM in the
more efficient possible way.
"Duane Clark" <> wrote in message
news:_Ftgj.36956$. net...
> Xin Xiao wrote:
>> This is the code:
>>
>>
>> entity SRAM is
>> Port ( Clk : in STD_LOGIC;
>> Enable : in STD_LOGIC;
>> Addr : in std_logic_vector(15 downto 0);
>> RW : in STD_LOGIC;
>> Data_in : in std_logic_vector(15 downto 0);
>> Data_out : out std_logic_vector(15 downto 0));
>> end SRAM;
>>
>> <signal declaration>
>>
>> begin
>> process (Clk)
>> begin
>> if (rising_edge(Clk)) then
>> if (Enable = '1') then
>> if (RW = '1') then
>> memory(conv_integer(Addr)) <= Data_in;
>> end if;
>> read_a <= Addr;
>> end if;
>> end if;
>> end process;
>> Data_out <= memory(conv_integer(read_a));
>> end Behavioral;
>
> Go back and read Andy's post again, and then think carefully about how you
> are generating read_a. Ignore everything else; your problem is with
> read_a. It will come to you