4 bit adder with overflow check

Discussion in 'VHDL' started by hexler, Apr 14, 2007.

  1. hexler

    hexler

    Joined:
    Apr 14, 2007
    Messages:
    1
    Hi there,

    I found this forum with google search, because I don't know any forum with VHDL topics.

    I have successfully compiled a 4 bit adder with the port map method.
    Now I want to check for an overflow and I've created a process that checks the last carry out.

    But now I'am getting an error that my output bitvector has more than one sources. (Because VHDL is working parallel)

    How can I fix this?

    Here is my architecture: http://pastebin.sk/en/1320/

    Thanks :)
     
    hexler, Apr 14, 2007
    #1
    1. Advertising

  2. hexler

    martin.wahlstedt

    Joined:
    Mar 29, 2007
    Messages:
    14
    The error is correct, if t4='1', you are driving the output from two sources. One thing you can do is to use an internal signal (out_temp) from the two-adders and extend the process to

    process(t4) begin
    if (t4 = '1') then
    output <= "1111";
    else output <= "out_temp";
    end if;
    end process;

    /Martin
     
    martin.wahlstedt, Apr 16, 2007
    #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. ALuPin

    30 bit adder performance

    ALuPin, Dec 10, 2004, in forum: VHDL
    Replies:
    5
    Views:
    639
    Pieter Hulshoff
    Dec 12, 2004
  2. Rune Christensen
    Replies:
    4
    Views:
    10,029
    David R Brooks
    Jan 22, 2005
  3. Nemesis

    Signed Adder without overflow

    Nemesis, May 24, 2005, in forum: VHDL
    Replies:
    4
    Views:
    7,593
    Nemesis
    May 25, 2005
  4. Lilmiss

    n bit adder

    Lilmiss, Jul 24, 2005, in forum: VHDL
    Replies:
    0
    Views:
    3,133
    Lilmiss
    Jul 24, 2005
  5. blckisle

    overflow of adder in VHDL

    blckisle, May 3, 2008, in forum: VHDL
    Replies:
    1
    Views:
    1,072
    blckisle
    May 3, 2008
Loading...

Share This Page