using reset for arrays

V

vedpsingh

Hi all,
I am not getting clue, how to do this:
I want to make contents of an array to be zero when RESET signal is
high.
I have been doing this in std_logic_vector but dont know how to do in
array !

-------------------------------------------------------------

type resultArray is array (0 to 62) of integer range 511 downto -511;

architecutre....


signal resultMult : resultArray;



begin
shift_reg : process (clock)

begin
if RESET='1' then --asynchronous RESET active High
-- resultMult <= (others => '0'); --THis dont work
---I want to make resultmult=0 at RESET


elsif (clock'event and clock='1') then

.......................
end process

end architecture
 
J

john Doef

(e-mail address removed) a écrit :
Hi all,
I am not getting clue, how to do this:
I want to make contents of an array to be zero when RESET signal is
high.
I have been doing this in std_logic_vector but dont know how to do in
array ! [...]
type resultArray is array (0 to 62) of integer range 511 downto -511; [...]
-- resultMult <= (others => '0'); --THis dont work
---I want to make resultmult=0 at RESET
Hi,

resultArray is an array of integers. So elements are integers. But
'0' is not
an integer!
You should write:
resultmult <= (others => 0);

JD.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top