Successive arithmetic operations within a process

Discussion in 'VHDL' started by dennismccarty, Mar 15, 2009.

  1. dennismccarty

    dennismccarty

    Joined:
    Mar 15, 2009
    Messages:
    1
    I'm trying to put multiple arithmetic arithmetic operations within a non-clocked process so that the result will be al combinatorial logic.

    I can accept infered latches, but prefer not to have them.

    The simulation does not work. A snipet of the code is as follows:

    ARCHITECTURE behavior OF sq_root IS
    signal q2 : std_logic_vector(1 downto 0);
    --signal q3 : std_logic_vector(2 downto 0);
    signal q4rem : std_logic_vector(3 downto 0);
    --signal q5 : std_logic_vector(4 downto 0);
    signal q6,q6rem,q6sub : std_logic_vector(5 downto 0);
    signal q8,q8sub : std_logic_vector(7 downto 0);
    --signal qfinal : std_logic_vector(7 downto 0);

    BEGIN

    process (d)
    begin
    if d(7) = '1' then --MSB of one. Start Calculation
    y(3) <= '1';
    q2 <= d(7 downto 6) - "01";

    q4rem <= (q2 & (d(5 downto 4))) - "0101";

    The subtraction for q2 evaluates correctly, but q4rem evaluates as unknown.
    What is wrong?
     
    dennismccarty, Mar 15, 2009
    #1
    1. Advertising

  2. dennismccarty

    jeppe

    Joined:
    Mar 10, 2008
    Messages:
    348
    Location:
    Denmark
    Try this addition to the sensitivity-list (but Im not sure you will succed)

    process(d, q2)

    Your welcome
    Jeppe
     
    jeppe, Mar 15, 2009
    #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. bill.blackmon@kpi-consulting.net

    Successive Struts Forwards?

    bill.blackmon@kpi-consulting.net, Mar 31, 2005, in forum: Java
    Replies:
    1
    Views:
    440
    Ryan Dillon
    Apr 1, 2005
  2. Mr. Bill
    Replies:
    6
    Views:
    4,369
    Mr. Bill
    Jan 23, 2004
  3. Jon Perez
    Replies:
    3
    Views:
    271
    Harry George
    Jul 2, 2004
  4. Digital Puer
    Replies:
    1
    Views:
    427
    Dietmar Kuehl
    Mar 6, 2006
  5. pauldepstein@att.net

    beginner question on successive factoring

    pauldepstein@att.net, Sep 21, 2007, in forum: C++
    Replies:
    4
    Views:
    380
    Jerry Coffin
    Sep 21, 2007
Loading...

Share This Page