- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hey i´m using the "1- port ram" from the megaWizard plugin manager.
when i change the adress, the output is always the value of the first adress. Do i have to do some settings or how can i change this?#
LIBRARY ieee;
USE ieee.std_logic_1164.all;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
-- Entity Declaration
ENTITY block_name IS
-- {{ALTERA_IO_BEGIN}} DO NOT REMOVE THIS LINE!
PORT
(
clock : IN STD_LOGIC; // clock
resultim : IN STD_LOGIC_VECTOR(23 downto 0); // newinputdata
speicher : IN STD_LOGIC_VECTOR(31 downto 0); // data from the actual adress of the ram
adresse : buffer STD_LOGIC_VECTOR(11 downto 0); // adress
writeenable : OUT STD_LOGIC; //
ausgang2 : OUT STD_LOGIC_VECTOR(31 downto 0) // output and input from the ram
);
-- {{ALTERA_IO_END}} DO NOT REMOVE THIS LINE!
END block_name;
-- Architecture Body
ARCHITECTURE aufsummiererimaginaerteil_architecture OF block_name IS
signal zaehler : natural range 0 to 12;
BEGIN
writeenable <= '1';
process (clock )
begin
If clock = '1' and clock'event then
if zaehler = 12 then
zaehler <= 0;
else zaehler <= zaehler + 1;
end if;
ausgang2 <= resultim + speicher;
If zaehler = 0 then adresse <= "000000000000";end if;
If zaehler = 1 then adresse <= adresse + "1000";end if;
If zaehler = 2 then adresse <= adresse + "1000";end if;
If zaehler = 3 then adresse <= adresse + "1000";end if;
If zaehler = 4 then adresse <= adresse + "1000";end if;
If zaehler = 5 then adresse <= adresse + "1000";end if;
If zaehler = 6 then adresse <= adresse + "1000";end if;
If zaehler = 7 then adresse <= adresse + "1000";end if;
If zaehler = 8 then adresse <= adresse + "1000";end if;
If zaehler = 9 then adresse <= adresse + "1000";end if;
If zaehler = 10 then adresse <= adresse + "1000";end if;
If zaehler = 11 then adresse <= adresse + "1000";end if; If zaehler = 12 then adresse <= adresse + "1000";end if; end if; end process; END aufsummiererimaginaerteil_architecture;
Link Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There's no RAM instance in your code.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ok and how i do a ram instance? ( that was not my ram code only a code to initialize the adresses and the input and so on) kind regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You should show the code that your question is related to.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
i don´t know the code from the ramblock i´m using the megafunction and it doesn´t work

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page