Line 162... |
Line 162... |
|
|
/* Synthesisable stimuli sequencer. */
|
/* Synthesisable stimuli sequencer. */
|
|
|
|
|
/* Data transmitter. */
|
/* Data transmitter. */
|
sequencer: process(nReset,irq_write) is
|
sequencer_ns: process(all) is begin
|
|
txFSM<=i_txFSM;
|
|
if not nReset then txFSM<=idle;
|
|
else
|
|
case i_txFSM is
|
|
when idle=>
|
|
if outstandingTransactions>0 then txFSM<=transmitting; end if;
|
|
when transmitting=>
|
|
if axiMaster_out.tLast then
|
|
txFSM<=idle;
|
|
end if;
|
|
when others=> null;
|
|
end case;
|
|
end if;
|
|
end process sequencer_ns;
|
|
|
|
sequencer_op: process(nReset,irq_write) is
|
/* Local procedures to map BFM signals with the package procedure. */
|
/* Local procedures to map BFM signals with the package procedure. */
|
procedure read(address:in i_transactor.t_addr) is begin
|
procedure read(address:in i_transactor.t_addr) is begin
|
i_transactor.read(readRequest,address);
|
i_transactor.read(readRequest,address);
|
end procedure read;
|
end procedure read;
|
|
|
Line 188... |
Line 204... |
if not nReset then
|
if not nReset then
|
/*simulation only. */
|
/*simulation only. */
|
/* synthesis translate_off */
|
/* synthesis translate_off */
|
rv0.InitSeed(rv0'instance_name);
|
rv0.InitSeed(rv0'instance_name);
|
/* synthesis translate_on */
|
/* synthesis translate_on */
|
|
|
txFSM<=idle;
|
|
elsif falling_edge(irq_write) then
|
elsif falling_edge(irq_write) then
|
case txFSM is
|
case txFSM is
|
when idle=>
|
|
if outstandingTransactions>0 then
|
|
/* synthesis translate_off */
|
|
write(rv0.RandSigned(axiMaster_out.tData'length));
|
|
/* synthesis translate_on */
|
|
txFSM<=transmitting;
|
|
end if;
|
|
when transmitting=>
|
when transmitting=>
|
if writeResponse.trigger then
|
if txFSM/=i_txFSM or writeResponse.trigger then
|
/* synthesis translate_off */
|
/* synthesis translate_off */
|
write(rv0.RandSigned(axiMaster_out.tData'length));
|
write(rv0.RandSigned(axiMaster_out.tData'length));
|
/* synthesis translate_on */
|
/* synthesis translate_on */
|
end if;
|
end if;
|
|
|
if axiMaster_out.tLast then
|
|
txFSM<=idle;
|
|
end if;
|
|
when others=>null;
|
when others=>null;
|
end case;
|
end case;
|
end if;
|
end if;
|
end process sequencer;
|
end process sequencer_op;
|
|
|
|
sequencer_regs: process(irq_write) is begin
|
|
if falling_edge(irq_write) then
|
|
i_txFSM<=txFSM;
|
|
end if;
|
|
end process sequencer_regs;
|
|
|
/* Reset symbolsPerTransfer to new value (prepare for new transfer) after current transfer has been completed. */
|
/* Reset symbolsPerTransfer to new value (prepare for new transfer) after current transfer has been completed. */
|
process(nReset,irq_write) is
|
process(nReset,irq_write) is
|
/* synthesis translate_off */
|
/* synthesis translate_off */
|
variable rv0:RandomPType;
|
variable rv0:RandomPType;
|