Hallo Simon, do you have also a clock event? first I see
if (rdy /= '1') then wait until rdy = '1'; else wait for 0 ns; end if; this is simplify wait until rdy='1'; Hier you will get an glitch. ack is high for short time but wait_for_transaction can not see this short event. The signal ack is only 0ns high. -- Find start of xaction ack <= '1'; if (rdy /= '1') then wait until rdy = '1'; else wait for 0 ns; end if; ack <= '0'; 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; Am 10.10.2016 um 09:44 schrieb Simon Thijs de Feber: > 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
_______________________________________________ Ghdl-discuss mailing list Ghdl-discuss@gna.org https://mail.gna.org/listinfo/ghdl-discuss