Altera Mentor Verification IP Altera Edition AMBA AXI4-St Manuel d'utilisateur Page 183

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 231
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 182
VHDL Tutorials
Verifying a Slave DUT
Mentor Verification IP AE AMBA AXI4-Stream User Guide, V10.3
183
April 2014
Example 11-2. Master Transaction Creation and Execution
--************************
-- Traffic generation: **
--************************
-- 10 x packet with
-- Number of transfer = i % 10. Values : 1, 2 .. 10
-- id = i % 15. Values 0, 1, 2 .. 14
-- dest = i %20. Values 0, 1, 2 .. 19
for i in 0 to 9 loop
transfer_count := (i mod 10) + 1;
create_master_transaction(transfer_count, trans, index,
axi4stream_tr_if_0(index));
set_id(i mod 15, trans, index, axi4stream_tr_if_0(index));
set_dest(i mod 20, trans, index, axi4stream_tr_if_0(index));
for j in 0 to ((transfer_count * byte_count) - 1) loop
set_data(i + j, j, trans, index, axi4stream_tr_if_0(index));
if(((i + j) mod 5) = 0) then
set_byte_type(AXI4STREAM_NULL_BYTE, j, trans, index,
axi4stream_tr_if_0(index));
elsif(((i + j) mod 5) = 1) then
set_byte_type(AXI4STREAM_POS_BYTE, j, trans, index,
axi4stream_tr_if_0(index));
else
set_byte_type(AXI4STREAM_DATA_BYTE, j, trans, index,
axi4stream_tr_if_0(index));
end if;
end loop;
execute_transaction(trans, index, axi4stream_tr_if_0(index));
end loop;
The master test program repeats the creation of master transactions similar to that shown in
Example 11-2, but instead calls the execute_transfer() task per iteration of the inner for loop, as
shown in Example 11-3.
Vue de la page 182
1 2 ... 178 179 180 181 182 183 184 185 186 187 188 ... 230 231

Commentaires sur ces manuels

Pas de commentaire