Procedure calls in process

Discussion in 'VHDL' started by Sylvain Munaut, Jan 3, 2005.

  1. Hello all,

    I'm trying to understand a weird behavior I'm observing in the simulator.
    First I must say it's for a test bench so I don't "really" care about
    optimality or synthesis.

    I'm calling a procedure from a continuous process (no sensitivitylist) and
    the result for the first "iteration" is not what I expect, while all the
    others are OK.

    The result can be seen here :

    http://www.246tnt.com/files/wave.png

    It shows two runs of the process that I would expect to be identical ... I've run
    the simulation thru both modelsim and simili with same results.

    Here is the code snippet : (note it's just a test, not at all real PCI ... )

    -- PCI Scenario
    process

    type dataseq_t is array(integer range <>) of std_logic_vector(31 downto 0);

    -- PCI Read sequence

    -- PCI Write sequence
    procedure pci_do_write(
    w : in integer;
    data : in test_t
    ) is
    begin
    pci_frame_n <= '0';
    pci_ad <= data(0);
    wait for 100 ns;
    pci_frame_n <= '1';
    pci_ad <= data(1);
    wait for 100 ns;
    pci_frame_n <= 'Z';
    pci_ad <= data(2);
    end procedure;

    constant ts : dataseq_t(0 to 2) := ( x"12345678", x"9ABCDEF0", x"13FF005A" );
    begin

    -- Reset
    wait for 10 ns;
    pci_do_write(2, ts);
    wait for 200 ns;

    end process;


    Thanks for any insight ...

    Sylvain
     
    Sylvain Munaut, Jan 3, 2005
    #1
    1. Advertising

  2. Sylvain Munaut

    Jim Lewis Guest

    Sylvain,
    Is there another driver of pci_ad? Looks to me like there
    is and it is not turned tristated until well into your
    first pci write cycle. One thing you may want to try is
    initializing all sources for pci_ad to all 'Z'.

    Regards,
    jim

    > Hello all,
    >
    > I'm trying to understand a weird behavior I'm observing in the simulator.
    > First I must say it's for a test bench so I don't "really" care about
    > optimality or synthesis.
    >
    > I'm calling a procedure from a continuous process (no sensitivitylist) and
    > the result for the first "iteration" is not what I expect, while all the
    > others are OK.
    >
    > The result can be seen here :
    >
    > http://www.246tnt.com/files/wave.png
    >
    > It shows two runs of the process that I would expect to be identical ...
    > I've run
    > the simulation thru both modelsim and simili with same results.
    >
    > Here is the code snippet : (note it's just a test, not at all real PCI
    > ... )
    >
    > -- PCI Scenario
    > process
    >
    > type dataseq_t is array(integer range <>) of std_logic_vector(31
    > downto 0);
    >
    > -- PCI Read sequence
    >
    > -- PCI Write sequence
    > procedure pci_do_write(
    > w : in integer;
    > data : in test_t
    > ) is
    > begin
    > pci_frame_n <= '0';
    > pci_ad <= data(0);
    > wait for 100 ns;
    > pci_frame_n <= '1';
    > pci_ad <= data(1);
    > wait for 100 ns;
    > pci_frame_n <= 'Z';
    > pci_ad <= data(2);
    > end procedure;
    >
    > constant ts : dataseq_t(0 to 2) := ( x"12345678", x"9ABCDEF0",
    > x"13FF005A" );
    > begin
    >
    > -- Reset
    > wait for 10 ns;
    > pci_do_write(2, ts);
    > wait for 200 ns;
    >
    > end process;
    >
    >
    > Thanks for any insight ...
    >
    > Sylvain



    --
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Jim Lewis
    Director of Training mailto:
    SynthWorks Design Inc. http://www.SynthWorks.com
    1-503-590-4787

    Expert VHDL Training for Hardware Design and Verification
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     
    Jim Lewis, Jan 3, 2005
    #2
    1. Advertising

  3. Hi Jim

    > Is there another driver of pci_ad? Looks to me like there
    > is and it is not turned tristated until well into your
    > first pci write cycle. One thing you may want to try is
    > initializing all sources for pci_ad to all 'Z'.



    Damn, I missed the obvious ! Since I was modifying my simple
    test bench to make it more "advanced", I just forgot that there
    was the PCI target core I'm working on plugged in ... And it
    reacted to those "weird" test signals ...


    Sylvain
     
    Sylvain Munaut, Jan 4, 2005
    #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. Analog_Guy
    Replies:
    1
    Views:
    517
    Mike Treseler
    Oct 5, 2005
  2. Honne Gowda A
    Replies:
    2
    Views:
    915
    Karl Heinz Buchegger
    Oct 31, 2003
  3. Mike P
    Replies:
    0
    Views:
    3,374
    Mike P
    Jun 19, 2006
  4. Christian Long
    Replies:
    0
    Views:
    394
    Christian Long
    Aug 8, 2003
  5. AlexWare
    Replies:
    2
    Views:
    788
    Paul Uiterlinden
    Oct 23, 2009
Loading...

Share This Page