to many FOR loops?

Discussion in 'VHDL' started by eismaus4, Apr 27, 2004.

  1. eismaus4

    eismaus4 Guest

    Hi,
    I need help with a code I have written for autocorralation.
    I have added the whole code. The problem: all loops are working
    exactly. But when I add the equation_counting_loop (which just says
    that the inner part shoult be run three times) then the simulation
    programm is not able to simulate the code. does anybody has an idea,
    what could be the problem?

    library IEEE;
    use IEEE.std_logic_1164.all;
    use IEEE.std_logic_unsigned.all;
    use IEEE.std_logic_arith.all;

    entity SAMPLES_3 is

    port ( s : in std_logic_vector(23 downto 0);

    res : out std_logic_vector(47 downto 0);
    res1 : out std_logic_vector(23 downto 0));
    end SAMPLES_3;

    architecture BEHAVE of SAMPLES_3 is

    begin

    process(s)
    variable tt : std_logic_vector (15 downto 0);
    variable var : std_logic_vector (15 downto 0);
    variable sb : std_logic_vector (23 downto 0);

    variable a,b : integer;
    begin

    a := 31;
    b := 63;
    tt := "0000000000000000";
    var := "0000000000000000";

    sb(23 downto 0) := s(23 downto 0);


    equation_counting : for i in 2 downto 1 loop


    adding_counting : for j in 3 downto 1 loop

    what_to_add : for m in 7 downto 0 loop
    a := a-1;
    end loop what_to_add;

    var := s(a downto (a-7)) * sb(a downto (a-7));
    tt := tt + var;

    end loop adding_counting;


    result_place : for n in 15 downto 0 loop
    b := b-1;

    res(b downto (b-15)) <= tt;


    sb := "00000000" & sb(23 downto 8);
    res1 <= sb;

    end loop equation_counting;

    end process;
    end BEHAVE;


    thank you for your help
    regards
    eismaus
    eismaus4, Apr 27, 2004
    #1
    1. Advertising

  2. eismaus4

    fe Guest

    You forgot end loop result_place;

    cheers
    fe


    "eismaus4" <> wrote in message
    news:...
    > Hi,
    > I need help with a code I have written for autocorralation.
    > I have added the whole code. The problem: all loops are working
    > exactly. But when I add the equation_counting_loop (which just says
    > that the inner part shoult be run three times) then the simulation
    > programm is not able to simulate the code. does anybody has an idea,
    > what could be the problem?
    >
    > library IEEE;
    > use IEEE.std_logic_1164.all;
    > use IEEE.std_logic_unsigned.all;
    > use IEEE.std_logic_arith.all;
    >
    > entity SAMPLES_3 is
    >
    > port ( s : in std_logic_vector(23 downto 0);
    >
    > res : out std_logic_vector(47 downto 0);
    > res1 : out std_logic_vector(23 downto 0));
    > end SAMPLES_3;
    >
    > architecture BEHAVE of SAMPLES_3 is
    >
    > begin
    >
    > process(s)
    > variable tt : std_logic_vector (15 downto 0);
    > variable var : std_logic_vector (15 downto 0);
    > variable sb : std_logic_vector (23 downto 0);
    >
    > variable a,b : integer;
    > begin
    >
    > a := 31;
    > b := 63;
    > tt := "0000000000000000";
    > var := "0000000000000000";
    >
    > sb(23 downto 0) := s(23 downto 0);
    >
    >
    > equation_counting : for i in 2 downto 1 loop
    >
    >
    > adding_counting : for j in 3 downto 1 loop
    >
    > what_to_add : for m in 7 downto 0 loop
    > a := a-1;
    > end loop what_to_add;
    >
    > var := s(a downto (a-7)) * sb(a downto (a-7));
    > tt := tt + var;
    >
    > end loop adding_counting;
    >
    >
    > result_place : for n in 15 downto 0 loop
    > b := b-1;
    >
    > res(b downto (b-15)) <= tt;
    >
    >
    > sb := "00000000" & sb(23 downto 8);
    > res1 <= sb;
    >
    > end loop equation_counting;
    >
    > end process;
    > end BEHAVE;
    >
    >
    > thank you for your help
    > regards
    > eismaus
    fe, Apr 27, 2004
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Marco Ippolito
    Replies:
    0
    Views:
    2,564
    Marco Ippolito
    Oct 11, 2004
  2. =?Utf-8?B?U3R1?=

    session vars how many is to many ?

    =?Utf-8?B?U3R1?=, Mar 5, 2005, in forum: ASP .Net
    Replies:
    5
    Views:
    325
  3. Replies:
    3
    Views:
    348
  4. Me
    Replies:
    2
    Views:
    229
  5. Jacob JKW

    Arbitrarily Many Nested Loops

    Jacob JKW, Mar 30, 2006, in forum: Perl Misc
    Replies:
    18
    Views:
    222
    Tim Kazner
    Apr 1, 2006
Loading...

Share This Page