Line 130... |
Line 130... |
is
|
is
|
|
|
variable adr : std_logic_vector( 31 downto 0 );
|
variable adr : std_logic_vector( 31 downto 0 );
|
variable data : std_logic_vector( 31 downto 0 );
|
variable data : std_logic_vector( 31 downto 0 );
|
variable str : line;
|
variable str : line;
|
|
variable error : integer:=0;
|
begin
|
begin
|
|
|
write( str, string'("TEST_DSC_INCORRECT" ));
|
write( str, string'("TEST_DSC_INCORRECT" ));
|
writeline( log, str );
|
writeline( log, str );
|
|
|
Line 162... |
Line 163... |
block_read( cmd, ret, 4, 16, data ); -- STATUS
|
block_read( cmd, ret, 4, 16, data ); -- STATUS
|
|
|
write( str, string'("STATUS: " )); hwrite( str, data( 15 downto 0 ) );
|
write( str, string'("STATUS: " )); hwrite( str, data( 15 downto 0 ) );
|
if( data( 15 downto 0 )=x"A021" ) then
|
if( data( 15 downto 0 )=x"A021" ) then
|
write( str, string'(" - Ok" ));
|
write( str, string'(" - Ok" ));
|
cnt_ok := cnt_ok + 1;
|
|
else
|
else
|
write( str, string'(" - Error" ));
|
write( str, string'(" - Error" ));
|
cnt_error := cnt_error + 1;
|
error:=error+1;
|
end if;
|
end if;
|
|
|
writeline( log, str );
|
writeline( log, str );
|
|
|
block_write( cmd, ret, 4, 9, x"00000000" ); -- DMA_CTRL - STOP
|
block_write( cmd, ret, 4, 9, x"00000000" ); -- DMA_CTRL - STOP
|
|
|
|
-- вывод в файл --
|
|
writeline( log, str );
|
|
if( error=0 ) then
|
|
write( str, string'("TEST finished successfully" ));
|
|
cnt_ok := cnt_ok + 1;
|
|
else
|
|
write( str, string'("TEST finished with ERR" ));
|
|
cnt_error := cnt_error + 1;
|
|
end if;
|
|
writeline( log, str );
|
|
writeline( log, str );
|
|
|
|
-- вывод в консоль --
|
|
writeline( output, str );
|
|
if( error=0 ) then
|
|
write( str, string'("TEST finished successfully" ));
|
|
cnt_ok := cnt_ok + 1;
|
|
else
|
|
write( str, string'("TEST finished with ERR" ));
|
|
cnt_error := cnt_error + 1;
|
|
end if;
|
|
writeline( output, str );
|
|
writeline( output, str );
|
|
|
|
|
|
|
end test_dsc_incorrect;
|
end test_dsc_incorrect;
|
|
|
|
|
--! Запуск DMA приём одного блока 4 кБ
|
--! Запуск DMA приём одного блока 4 кБ
|
procedure test_read_4kb (
|
procedure test_read_4kb (
|
Line 296... |
Line 322... |
-- block_write( cmd, ret, 4, 9, x"00000010" ); -- DMA_CTRL - RESET FIFO
|
-- block_write( cmd, ret, 4, 9, x"00000010" ); -- DMA_CTRL - RESET FIFO
|
-- block_write( cmd, ret, 4, 9, x"00000000" ); -- DMA_CTRL
|
-- block_write( cmd, ret, 4, 9, x"00000000" ); -- DMA_CTRL
|
-- block_write( cmd, ret, 4, 9, x"00000001" ); -- DMA_CTRL - START
|
-- block_write( cmd, ret, 4, 9, x"00000001" ); -- DMA_CTRL - START
|
|
|
|
|
|
-- вывод в файл --
|
writeline( log, str );
|
writeline( log, str );
|
if( error=0 ) then
|
if( error=0 ) then
|
write( str, string'(" Тест завершён успешно " ));
|
write( str, string'("TEST finished successfully" ));
|
cnt_ok := cnt_ok + 1;
|
cnt_ok := cnt_ok + 1;
|
else
|
else
|
write( str, string'(" Тест не выполнен " ));
|
write( str, string'("TEST finished with ERR" ));
|
cnt_error := cnt_error + 1;
|
cnt_error := cnt_error + 1;
|
end if;
|
end if;
|
writeline( log, str );
|
writeline( log, str );
|
writeline( log, str );
|
writeline( log, str );
|
|
|
|
-- вывод в консоль --
|
|
writeline( output, str );
|
|
if( error=0 ) then
|
|
write( str, string'("TEST finished successfully" ));
|
|
cnt_ok := cnt_ok + 1;
|
|
else
|
|
write( str, string'("TEST finished with ERR" ));
|
|
cnt_error := cnt_error + 1;
|
|
end if;
|
|
writeline( output, str );
|
|
writeline( output, str );
|
|
|
|
|
|
|
end test_read_4kb;
|
end test_read_4kb;
|
|
|
|
|
--! Чтение 8 кБ из тетрады DIO_IN
|
--! Чтение 8 кБ из тетрады DIO_IN
|
procedure test_adm_read_8kb (
|
procedure test_adm_read_8kb (
|
Line 470... |
Line 511... |
-- block_write( cmd, ret, 4, 9, x"00000010" ); -- DMA_CTRL - RESET FIFO
|
-- block_write( cmd, ret, 4, 9, x"00000010" ); -- DMA_CTRL - RESET FIFO
|
-- block_write( cmd, ret, 4, 9, x"00000000" ); -- DMA_CTRL
|
-- block_write( cmd, ret, 4, 9, x"00000000" ); -- DMA_CTRL
|
-- block_write( cmd, ret, 4, 9, x"00000001" ); -- DMA_CTRL - START
|
-- block_write( cmd, ret, 4, 9, x"00000001" ); -- DMA_CTRL - START
|
|
|
|
|
|
-- вывод в файл --
|
writeline( log, str );
|
writeline( log, str );
|
if( error=0 ) then
|
if( error=0 ) then
|
write( str, string'(" Тест завершён успешно " ));
|
write( str, string'("TEST finished successfully" ));
|
cnt_ok := cnt_ok + 1;
|
cnt_ok := cnt_ok + 1;
|
else
|
else
|
write( str, string'(" Тест не выполнен " ));
|
write( str, string'("TEST finished with ERR" ));
|
cnt_error := cnt_error + 1;
|
cnt_error := cnt_error + 1;
|
end if;
|
end if;
|
writeline( log, str );
|
writeline( log, str );
|
writeline( log, str );
|
writeline( log, str );
|
|
|
|
-- вывод в консоль --
|
|
writeline( output, str );
|
|
if( error=0 ) then
|
|
write( str, string'("TEST finished successfully" ));
|
|
cnt_ok := cnt_ok + 1;
|
|
else
|
|
write( str, string'("TEST finished with ERR" ));
|
|
cnt_error := cnt_error + 1;
|
|
end if;
|
|
writeline( output, str );
|
|
writeline( output, str );
|
|
|
|
|
end test_adm_read_8kb;
|
end test_adm_read_8kb;
|
|
|
|
|
--! Проверка обращений к блоку MAIN
|
--! Проверка обращений к блоку MAIN
|
procedure test_block_main (
|
procedure test_block_main (
|
Line 509... |
Line 564... |
block_read( cmd, ret, 4, 16#08#, data );
|
block_read( cmd, ret, 4, 16#08#, data );
|
write( str, string'("БЛОК 4: " )); hwrite( str, data ); writeline( log, str );
|
write( str, string'("БЛОК 4: " )); hwrite( str, data ); writeline( log, str );
|
|
|
wait for 10 us;
|
wait for 10 us;
|
|
|
-- write( str, "Константы:" );
|
write( str, "Константы:" );
|
-- writeline( log, str );
|
writeline( log, str );
|
-- for ii in 0 to 5 loop
|
for ii in 0 to 5 loop
|
-- write( str, "Блок " );
|
write( str, "Блок " );
|
-- write( str, ii );
|
write( str, ii );
|
-- for jj in 0 to 7 loop
|
for jj in 0 to 7 loop
|
-- block_read( cmd, ret, ii, jj, data );
|
block_read( cmd, ret, ii, jj, data );
|
-- write( str, " " );
|
write( str, " " );
|
-- hwrite( str, data );
|
hwrite( str, data );
|
-- end loop;
|
end loop;
|
-- writeline( log, str );
|
writeline( log, str );
|
-- end loop;
|
end loop;
|
--
|
|
--
|
|
-- writeline( log, str );
|
|
--
|
|
-- block_read( cmd, ret, 0, 16#10#, data );
|
|
-- write( str, "STATUS: " ); hwrite( str, data ); writeline( log, str );
|
|
--
|
|
-- block_write( cmd, ret, 80, 16#08#, x"00000100" );
|
|
--
|
|
-- block_read( cmd, ret, 0, 16#10#, data );
|
|
-- write( str, "STATUS: " ); hwrite( str, data ); writeline( log, str );
|
|
--
|
|
-- block_write( cmd, ret, 80, 16#08#, x"00000200" );
|
|
--
|
|
-- block_read( cmd, ret, 0, 16#10#, data );
|
|
-- write( str, "STATUS: " ); hwrite( str, data ); writeline( log, str );
|
|
--
|
|
--
|
|
-- writeline( log, str );
|
|
-- if( error=0 ) then
|
|
-- write( str, " Тест завершён успешно " );
|
|
-- cnt_ok := cnt_ok + 1;
|
|
-- else
|
|
-- write( str, " Тест не выполнен " );
|
|
-- cnt_error := cnt_error + 1;
|
|
-- end if;
|
|
|
|
for ii in 0 to 127 loop
|
|
|
writeline( log, str );
|
|
|
|
block_read( cmd, ret, 0, 16#10#, data );
|
|
write( str, "STATUS: " ); hwrite( str, data ); writeline( log, str );
|
|
|
|
block_write( cmd, ret, 80, 16#08#, x"00000100" );
|
|
|
|
block_read( cmd, ret, 0, 16#10#, data );
|
|
write( str, "STATUS: " ); hwrite( str, data ); writeline( log, str );
|
|
|
|
block_write( cmd, ret, 80, 16#08#, x"00000200" );
|
|
|
|
block_read( cmd, ret, 0, 16#10#, data );
|
|
write( str, "STATUS: " ); hwrite( str, data ); writeline( log, str );
|
|
|
|
|
|
for ii in 0 to 7 loop
|
|
|
block_write( cmd, ret, 4, 16#08#, x"0000AA55" );
|
block_write( cmd, ret, 4, 16#08#, x"0000AA55" );
|
block_read( cmd, ret, 4, 8, data );
|
block_read( cmd, ret, 4, 8, data );
|
write( str, string'("READ: " )); hwrite( str, data( 15 downto 0 ) ); writeline( log, str );
|
write( str, string'("READ: " )); hwrite( str, data( 15 downto 0 ) ); writeline( log, str );
|
if( data/=x"0000AA55" ) then
|
if( data/=x"0000AA55" ) then
|
Line 561... |
Line 607... |
|
|
end loop;
|
end loop;
|
|
|
|
|
|
|
|
-- вывод в файл --
|
|
writeline( log, str );
|
|
if( error=0 ) then
|
|
write( str, string'("TEST finished successfully" ));
|
|
cnt_ok := cnt_ok + 1;
|
|
else
|
|
write( str, string'("TEST finished with ERR" ));
|
|
cnt_error := cnt_error + 1;
|
|
end if;
|
writeline( log, str );
|
writeline( log, str );
|
writeline( log, str );
|
writeline( log, str );
|
|
|
|
-- вывод в консоль --
|
|
writeline( output, str );
|
|
if( error=0 ) then
|
|
write( str, string'("TEST finished successfully" ));
|
|
cnt_ok := cnt_ok + 1;
|
|
else
|
|
write( str, string'("TEST finished with ERR" ));
|
|
cnt_error := cnt_error + 1;
|
|
end if;
|
|
writeline( output, str );
|
|
writeline( output, str );
|
|
|
|
|
end test_block_main;
|
end test_block_main;
|
|
|
|
|
|
|
|
|
Line 805... |
Line 872... |
-- block_write( cmd, ret, 4, 9, x"00000010" ); -- DMA_CTRL - RESET FIFO
|
-- block_write( cmd, ret, 4, 9, x"00000010" ); -- DMA_CTRL - RESET FIFO
|
-- block_write( cmd, ret, 4, 9, x"00000000" ); -- DMA_CTRL
|
-- block_write( cmd, ret, 4, 9, x"00000000" ); -- DMA_CTRL
|
-- block_write( cmd, ret, 4, 9, x"00000001" ); -- DMA_CTRL - START
|
-- block_write( cmd, ret, 4, 9, x"00000001" ); -- DMA_CTRL - START
|
|
|
|
|
|
-- вывод в файл --
|
writeline( log, str );
|
writeline( log, str );
|
if( error=0 ) then
|
if( error=0 ) then
|
write( str, string'(" Тест завершён успешно " ));
|
write( str, string'("TEST finished successfully" ));
|
cnt_ok := cnt_ok + 1;
|
cnt_ok := cnt_ok + 1;
|
else
|
else
|
write( str, string'(" Тест не выполнен " ));
|
write( str, string'("TEST finished with ERR" ));
|
cnt_error := cnt_error + 1;
|
cnt_error := cnt_error + 1;
|
end if;
|
end if;
|
writeline( log, str );
|
writeline( log, str );
|
writeline( log, str );
|
writeline( log, str );
|
|
|
|
-- вывод в консоль --
|
|
writeline( output, str );
|
|
if( error=0 ) then
|
|
write( str, string'("TEST finished successfully" ));
|
|
cnt_ok := cnt_ok + 1;
|
|
else
|
|
write( str, string'("TEST finished with ERR" ));
|
|
cnt_error := cnt_error + 1;
|
|
end if;
|
|
writeline( output, str );
|
|
writeline( output, str );
|
|
|
|
|
|
|
end test_adm_read_16kb;
|
end test_adm_read_16kb;
|
|
|
|
|
|
|
|
|
Line 1038... |
Line 1120... |
-- block_write( cmd, ret, 4, 9, x"00000010" ); -- DMA_CTRL - RESET FIFO
|
-- block_write( cmd, ret, 4, 9, x"00000010" ); -- DMA_CTRL - RESET FIFO
|
-- block_write( cmd, ret, 4, 9, x"00000000" ); -- DMA_CTRL
|
-- block_write( cmd, ret, 4, 9, x"00000000" ); -- DMA_CTRL
|
-- block_write( cmd, ret, 4, 9, x"00000001" ); -- DMA_CTRL - START
|
-- block_write( cmd, ret, 4, 9, x"00000001" ); -- DMA_CTRL - START
|
|
|
|
|
|
-- вывод в файл --
|
writeline( log, str );
|
writeline( log, str );
|
if( error=0 ) then
|
if( error=0 ) then
|
write( str, string'(" Тест завершён успешно " ));
|
write( str, string'("TEST finished successfully" ));
|
cnt_ok := cnt_ok + 1;
|
cnt_ok := cnt_ok + 1;
|
else
|
else
|
write( str, string'(" Тест не выполнен " ));
|
write( str, string'("TEST finished with ERR" ));
|
cnt_error := cnt_error + 1;
|
cnt_error := cnt_error + 1;
|
end if;
|
end if;
|
writeline( log, str );
|
writeline( log, str );
|
writeline( log, str );
|
writeline( log, str );
|
|
|
|
-- вывод в консоль --
|
|
writeline( output, str );
|
|
if( error=0 ) then
|
|
write( str, string'("TEST finished successfully" ));
|
|
cnt_ok := cnt_ok + 1;
|
|
else
|
|
write( str, string'("TEST finished with ERR" ));
|
|
cnt_error := cnt_error + 1;
|
|
end if;
|
|
writeline( output, str );
|
|
writeline( output, str );
|
|
|
|
|
end test_adm_write_16kb;
|
end test_adm_write_16kb;
|
|
|
end package body test_pkg;
|
end package body test_pkg;
|
|
|
|
|
No newline at end of file
|
No newline at end of file
|