Hi SimonThere is one use model you must take care with.    If you do a 
directive type transaction  - one that interacts with the model but does 
nothing on the interface it still must have time pass or the ack signaling will 
fail due to cancelations.     
See the signal errors directive in the book.   In the more recent books it 
shows 'wait until rising_edge (clk);'   however a 'wait for 0 ns ;' is 
sufficient   
Jim


Sent from my Sprint Samsung Galaxy Note5.
-------- Original message --------From: Simon Thijs de Feber 
<st.de.fe...@gmail.com> Date: 10/10/16  12:44 AM  (GMT-08:00) To: GHDL discuss 
list <ghdl-discuss@gna.org> Subject: SPAM: Re: [Ghdl-discuss] Handshaking 
For some stupid reason I am not able to replicate the error anymore.I have 
since changed my code to make it work and proceed. It seems these changes had 
positive effect on the behaviour :(
@Rene
These are the procedures :
[code]
  procedure request_transaction ( signal rdy : out std_logic;                   
               signal ack : in  std_logic                                ) is   
 begin
    -- Record contains new xaction    rdy <= '1';    -- Ack = '0', model has 
started    wait until ack = '0';    -- Remove xaction request    rdy <= '0';    
-- Model executes xaction    --    -- Wait for xaction done    wait until ack = 
'1';
  end procedure request_transaction;

    procedure wait_for_transaction ( signal rdy : in  std_logic;                
                   signal ack : out std_logic                                 ) 
is      variable ack_time : time;        begin
    -- Done          ack      <= '1';    ack_time := now;        -- Find start 
of xaction    if (rdy /= '1') then      wait until rdy = '1';    else       
wait for 0 ns;    end if;    
    -- Model is active and has taken over contents of record    ack <= '0';
  end procedure wait_for_transaction;
[/code]
Basic idea behind it is to use transactions and handshake via these 2 
procedures.
best regards,
Simon










_______________________________________________
Ghdl-discuss mailing list
Ghdl-discuss@gna.org
https://mail.gna.org/listinfo/ghdl-discuss

Reply via email to