help

Discussion in 'VHDL' started by thomas, Oct 6, 2004.

  1. thomas

    thomas Guest

    Hi

    I am have a problem with this code

    process (notAccessStart, notWrite)
    begin -- process
    if notAccessStart'event and notAccessStart = '1' then
    if notWrite = '0' then
    case AddressByte is
    when "00000" => reg0(rx_index) <= DataByte;
    rx_index <= rx_index + 1;
    if rx_index = 5 then
    rx_index <= 0;
    end if;
    when "00001" => reg1(rx_index) <= DataByte;
    rx_index <= rx_index + 1;
    if rx_index = 5 then
    rx_index <= 0;
    end if;
    thomas, Oct 6, 2004
    #1
    1. Advertising

  2. thomas wrote:
    > process (notAccessStart, notWrite)
    > begin -- process
    > if notAccessStart'event and notAccessStart = '1' then


    2 things:
    1. Since you're using notAccessStart as a clock, the notWrite in the
    sensitive list doesn't do anything.
    2. I'm surprised to see you react to a rising edge of a signal called
    notAccessStart.

    > if notWrite = '0' then
    > case AddressByte is
    > when "00000" => reg0(rx_index) <= DataByte;
    > rx_index <= rx_index + 1;
    > if rx_index = 5 then
    > rx_index <= 0;
    > end if;

    <snip>
    > if AddressByte is "00000" I what to start writing to reg0(0) then
    > reg0(1) then reg0(2) ...
    > but the first write always starts at rx_index=1 ( reg0(1) )


    This process will just continue with the rx_index as it was the last time it
    was used (+1 considering the adder in almost every branch). As such you
    cannot tell what value it will start with when you enter the "00000"
    branch. You'll need to take a hard look at your initialization and
    execution to figure out how it will work. Since I have no idea of how the
    driving signals notAccessStart, notWrite, and AddressByte are generated, I
    cannot really comment on this.

    Regards,

    Pieter Hulshoff
    Pieter Hulshoff, Oct 6, 2004
    #2
    1. Advertising

  3. thomas

    thomas Guest

    Pieter Hulshoff wrote:
    > thomas wrote:
    >
    >> process (notAccessStart, notWrite)
    >> begin -- process
    >> if notAccessStart'event and notAccessStart = '1' then

    >
    >
    > 2 things:
    > 1. Since you're using notAccessStart as a clock, the notWrite in the
    > sensitive list doesn't do anything.
    > 2. I'm surprised to see you react to a rising edge of a signal called
    > notAccessStart.
    >
    >
    >> if notWrite = '0' then
    >> case AddressByte is
    >> when "00000" => reg0(rx_index) <= DataByte;
    >> rx_index <= rx_index + 1;
    >> if rx_index = 5 then
    >> rx_index <= 0;
    >> end if;

    >
    > <snip>
    >
    >>if AddressByte is "00000" I what to start writing to reg0(0) then
    >>reg0(1) then reg0(2) ...
    >>but the first write always starts at rx_index=1 ( reg0(1) )

    >
    >
    > This process will just continue with the rx_index as it was the last time it
    > was used (+1 considering the adder in almost every branch). As such you
    > cannot tell what value it will start with when you enter the "00000"
    > branch. You'll need to take a hard look at your initialization and
    > execution to figure out how it will work. Since I have no idea of how the
    > driving signals notAccessStart, notWrite, and AddressByte are generated, I
    > cannot really comment on this.
    >
    > Regards,
    >
    > Pieter Hulshoff
    >


    thanks I will do that

    regards

    thomas
    thomas, Oct 7, 2004
    #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. =?Utf-8?B?dHJlbGxvdzQyMg==?=

    HELP! HELP! HELP! Opening Web Application Project Error

    =?Utf-8?B?dHJlbGxvdzQyMg==?=, Feb 20, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    747
    =?Utf-8?B?dHJlbGxvdzQyMg==?=
    Feb 20, 2004
  2. Harvey
    Replies:
    0
    Views:
    679
    Harvey
    Jul 16, 2004
  3. Harvey
    Replies:
    1
    Views:
    824
    Daniel
    Jul 16, 2004
  4. =?Utf-8?B?S2ltb24gSWZhbnRpZGlz?=

    HELP - HELP - HELP

    =?Utf-8?B?S2ltb24gSWZhbnRpZGlz?=, Mar 9, 2006, in forum: ASP .Net
    Replies:
    4
    Views:
    669
    Eliyahu Goldin
    Mar 9, 2006
  5. Buster

    Help, Help, Help

    Buster, Oct 4, 2003, in forum: Java
    Replies:
    3
    Views:
    464
    Saager
    Oct 30, 2003
Loading...

Share This Page