Altera Mentor Verification IP Altera Edition AMBA AXI3/4T Uživatelský manuál Strana 764

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 783
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 763
Mentor VIP AE AXI3/4 User Guide, V10.2b
744
VHDL AXI3 and AXI4 Test Programs
VHDL AXI4 Master BFM Test Program
September 2013
variable data_words : std_logic_vector(AXI_MAX_BIT_SIZE-1
downto 0);
variable lp: line;
begin
wait_on(AXI_RESET_0_TO_1, index, axi_tr_if_0(index));
wait_on(AXI_CLOCK_POSEDGE, index, axi_tr_if_0(index));
-- 4 x Writes
-- Write data value 1 on byte lanes 1 to address 1.
create_write_transaction(1, tr_id, index, axi_tr_if_0(index));
data_words(31 downto 0) := x"00000100";
set_data_words(data_words, tr_id, index, axi_tr_if_0(index));
set_write_strobes(2, tr_id, index, axi_tr_if_0(index));
report "master_test_program: Writing data (1) to address (1)";
-- By default it will run in Blocking mode
execute_transaction(tr_id, index, axi_tr_if_0(index));
-- Write data value 2 on byte lane 2 to address 2.
create_write_transaction(2, tr_id, index, axi_tr_if_0(index));
data_words(31 downto 0) := x"00020000";
set_data_words(data_words, tr_id, index, axi_tr_if_0(index));
set_write_strobes(4, tr_id, index, axi_tr_if_0(index));
report "master_test_program: Writing data (2) to address (2)";
-- By default it will run in Blocking mode
execute_transaction(tr_id, index, axi_tr_if_0(index));
-- Write data value 3 on byte lane 3 to address 3.
create_write_transaction(3, tr_id, index, axi_tr_if_0(index));
data_words(31 downto 0) := x"03000000";
set_data_words(data_words, tr_id, index, axi_tr_if_0(index));
set_write_strobes(8, tr_id, index, axi_tr_if_0(index));
report "master_test_program: Writing data (3) to address (3)";
-- By default it will run in Blocking mode
execute_transaction(tr_id, index, axi_tr_if_0(index));
-- Write data value 4 on byte lane 0 to address 4.
create_write_transaction(4, tr_id, index, axi_tr_if_0(index));
data_words(31 downto 0) := x"00000004";
set_data_words(data_words, tr_id, index, axi_tr_if_0(index));
set_write_strobes(1, tr_id, index, axi_tr_if_0(index));
report "master_test_program: Writing data (4) to address (4)";
-- By default it will run in Blocking mode
execute_transaction(tr_id, index, axi_tr_if_0(index));
--4 x Reads
--Read data from address 1.
create_read_transaction(1, tr_id, index, axi_tr_if_0(index));
set_id(1, tr_id, index, axi_tr_if_0(index));
set_size(AXI_BYTES_1, tr_id, index, axi_tr_if_0(index));
execute_transaction(tr_id, index, axi_tr_if_0(index));
get_data_words(data_words, tr_id, index, axi_tr_if_0(index));
if(data_words(31 downto 0) = x"00000100") then
Zobrazit stránku 763
1 2 ... 759 760 761 762 763 764 765 766 767 768 769 ... 782 783

Komentáře k této Příručce

Žádné komentáře