Multi-Source

Discussion in 'VHDL' started by Michael, Sep 17, 2003.

  1. Michael

    Michael Guest

    hello
    I'm trying to implement a PCI bus, and i'm trying to interpret C/BE
    for the number of words to be read.. what i have done is, to have one
    process that "listens" for C/BE and interprets it, then in another
    process, it decrements the count per read.. I get the multi source
    error, because I can't modify the same signal in 2 processes.. How
    else can I approach this? The following is my code:
    counting: process(C_BE, AD)
    begin
    case DEV_RTYP is
    when "0100" =>
    count <= "010";
    when "0101" =>
    count <= "011";
    when others =>
    end case;
    end process counting;

    out_logic: process(current_state, DEV_DATA, DEV_ADDR, DEV_RTYP,
    DEV_RDY, DEV_GRNT,
    FRAME, C_BE, IRDY, TRDY, DEVSEL, AD)
    begin
    ...
    case current_state is
    ...
    when "00011" =>
    IRDY <= '1';
    DRV_RDY <= '1';
    DEV_DATA <= AD;
    if LAST = '1' then
    FRAME <= '0';
    else
    FRAME <= '1';
    end if;
    count <= count - 1;
    ...
    end process out_logic;

    please help

    thank you
     
    Michael, Sep 17, 2003
    #1
    1. Advertising

  2. Michael

    Mario Trams Guest

    Michael wrote:

    > hello
    > I'm trying to implement a PCI bus, and i'm trying to interpret C/BE
    > for the number of words to be read.. what i have done is, to have one
    > process that "listens" for C/BE and interprets it, then in another
    > process, it decrements the count per read.. I get the multi source
    > error, because I can't modify the same signal in 2 processes.. How
    > else can I approach this? The following is my code:


    y <= a when en_a = '1' else (others => 'Z');
    y <= b when en_b = '1' else (others => 'Z');
    ......

    Regards,
    Mario
     
    Mario Trams, Sep 17, 2003
    #2
    1. Advertising

  3. Michael

    Dan RADUT Guest

    (Michael) wrote in message news:<>...
    Hi:

    Try as I suggest below:

    > I'm trying to implement a PCI bus, and i'm trying to interpret C/BE
    > for the number of words to be read.. what i have done is, to have one
    > process that "listens" for C/BE and interprets it, then in another
    > process, it decrements the count per read.. I get the multi source
    > error, because I can't modify the same signal in 2 processes.. How
    > else can I approach this? The following is my code:
    > counting: process(C_BE, AD)

    -- add current_state to this process sensitivity list, that is change this line
    -- of code to:
    -- coounting: process(C_BE, AD, current_state)
    > begin
    > case DEV_RTYP is
    > when "0100" =>
    > count <= "010";
    > when "0101" =>
    > count <= "011";
    > when others =>

    -- here insert this piece of code:
    -- if current_state = "00011" then
    -- count <= count - 1;
    -- else
    -- null;
    -- end if;
    -- then go to the other process and...
    > end case;
    > end process counting;
    >
    > out_logic: process(current_state, DEV_DATA, DEV_ADDR, DEV_RTYP,
    > DEV_RDY, DEV_GRNT,
    > FRAME, C_BE, IRDY, TRDY, DEVSEL, AD)
    > begin
    > ...
    > case current_state is
    > ...
    > when "00011" =>
    > IRDY <= '1';
    > DRV_RDY <= '1';
    > DEV_DATA <= AD;
    > if LAST = '1' then
    > FRAME <= '0';
    > else
    > FRAME <= '1';
    > end if;

    -- delete (or comment) the statement below: thus you remove the second source
    -- of the count driver.
    > count <= count - 1;
    > ...
    > end process out_logic;
    >


    good luck,

    Dan R
     
    Dan RADUT, Sep 17, 2003
    #3
    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. John Grandy
    Replies:
    0
    Views:
    645
    John Grandy
    Sep 13, 2005
  2. Dave
    Replies:
    3
    Views:
    417
    Kevin Goodsell
    Apr 19, 2004
  3. Replies:
    38
    Views:
    1,324
    Dennis Lee Bieber
    Feb 15, 2005
  4. ian douglas
    Replies:
    2
    Views:
    1,030
    Randy Howard
    Jul 30, 2004
  5. akineko
    Replies:
    3
    Views:
    2,738
    Jesse Noller
    Jan 29, 2009
Loading...

Share This Page