|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232 |
- library ieee;
- use ieee.std_logic_1164.all;
- use ieee.numeric_std.all;
- use ieee.float_pkg.all;
-
- library work;
- use work.reg32.all;
- use work.avalon_slave.all;
- use work.test_utility.all;
- use work.test_avalon_slave.all;
- use work.task.all;
- use work.fft_data.all;
- use work.test_hardware_task.all;
-
- library std;
- use std.env.all;
- use std.textio.all;
-
- entity test_task_fft is
- end entity test_task_fft;
-
- architecture test of test_task_fft is
-
- procedure test_configure( signal clk : in std_logic;
- signal req : out work.avalon_slave.Request;
- signal rsp : in work.avalon_slave.Response ) is
-
- variable index : integer := 0;
- variable writedata : std_logic_vector( 31 downto 0 );
- begin
- std.textio.write( std.textio.OUTPUT, " test_configure ... " );
- index := 0;
- writedata := x"08000000"; -- 2^32 / 32
- write_and_assert_config_eq( clk => clk, req => req, rsp => rsp,
- index => index, config => writedata );
-
- index := 1;
- writedata := x"00000000";
- write_and_assert_config_eq( clk => clk, req => req, rsp => rsp,
- index => index, config => writedata );
-
- index := 2;
- writedata := x"40800000"; -- 2 ** 2 = 4 float
- write_and_assert_config_eq( clk => clk, req => req, rsp => rsp,
- index => index, config => writedata );
-
- std.textio.write( std.textio.OUTPUT, TEST_OK );
-
- end procedure test_configure;
-
- procedure test_execute( signal clk : in std_logic;
- signal req : out work.avalon_slave.Request;
- signal rsp : in work.avalon_slave.Response;
- signal write : in std_logic;
- signal writedata : in std_logic_vector ) is
-
- type data_array is array ( natural range <> ) of std_logic_vector( writedata'range );
-
- variable expected_readdata : std_logic_vector( 31 downto 0 );
- variable index : integer := 0;
-
- variable writedata_fft : integer;
- variable writedata_float : float32;
- variable writedata_real : real;
- variable expected_real : real;
- variable abs_err : real := 0.5e-1;
- variable result : data_array( 0 to work.task.STREAM_LEN - 1 );
- variable result_fft : data_array( 0 to work.task.STREAM_LEN - 1 );
- file data_file : text;
- file data_file_fft : text;
- file data_file_fft_bit_reversed : text;
- variable index_bit_reversed : std_logic_vector( 9 downto 0 );
-
- begin
- std.textio.write( std.textio.OUTPUT, " test_execute ... " );
-
- expected_readdata := to_std_logic_vector( TASK_IDLE, expected_readdata'length );
- assert_state_eq( clk => clk, req => req, rsp => rsp, state => expected_readdata );
-
- write_start( clk => clk, req => req );
-
- expected_readdata := to_std_logic_vector( TASK_RUNNING, expected_readdata'length );
- assert_state_eq( clk => clk, req => req, rsp => rsp, state => expected_readdata );
-
- file_open( data_file, "data.py", write_mode );
- std.textio.write( data_file, "float_data = [" );
-
- file_open( data_file_fft, "fft_out.py", write_mode );
- std.textio.write( data_file_fft, "ftt_out_data = [" );
-
- while index < STREAM_LEN loop
- wait until falling_edge( clk );
- if ( write = '1' ) then
- result( index ) := writedata;
- writedata_float := to_float( result( index ) );
- writedata_real := to_real( writedata_float );
- std.textio.write( data_file, to_string( writedata_real ) & "," );
-
- result_fft( index ) := writedata;
- writedata_fft := to_integer(signed(result_fft( index )));
- std.textio.write( data_file_fft, to_string( writedata_fft ) & "," );
-
- index := index + 1;
-
- end if;
- end loop;
- std.textio.write( data_file, "]" & LF );
- file_close( data_file );
-
- std.textio.write( data_file_fft, "]" & LF );
- file_close( data_file_fft );
-
- while index < STREAM_LEN loop
- writedata_float := to_float( result( index ) );
- writedata_real := to_real( writedata_float );
- expected_real := work.fft_data.expected( index );
- assert_near( writedata_real, expected_real, abs_err );
- end loop;
-
- file_open( data_file_fft_bit_reversed, "fft_out_bit_reversed.py", write_mode );
- std.textio.write( data_file_fft_bit_reversed, "ftt_out_data = [" );
-
- index := 0;
- index_bit_reversed := "0000000000";
- while index < STREAM_LEN loop
- index_bit_reversed := std_logic_vector(to_unsigned(index, index_bit_reversed'length));
- index_bit_reversed := index_bit_reversed(0)&index_bit_reversed(1)&index_bit_reversed(2)&index_bit_reversed(3)&index_bit_reversed(4)&index_bit_reversed(5)&index_bit_reversed(6)&index_bit_reversed(7)&index_bit_reversed(8)&index_bit_reversed(9);
- index := to_integer(unsigned(index_bit_reversed));
-
- writedata_fft := to_integer(signed(result_fft( index )));
-
- std.textio.write( data_file_fft_bit_reversed, to_string( writedata_fft ) & "," );
-
- index_bit_reversed := index_bit_reversed(0)&index_bit_reversed(1)&index_bit_reversed(2)&index_bit_reversed(3)&index_bit_reversed(4)&index_bit_reversed(5)&index_bit_reversed(6)&index_bit_reversed(7)&index_bit_reversed(8)&index_bit_reversed(9);
- index := to_integer(unsigned(index_bit_reversed));
-
- index := index + 1;
-
- end loop;
- std.textio.write( data_file_fft_bit_reversed, "]" & LF );
- file_close( data_file_fft_bit_reversed );
-
- std.textio.write( std.textio.OUTPUT, TEST_OK );
- end procedure test_execute;
-
- signal clk : std_logic := '0';
- signal reset : std_logic := '1';
-
- signal req : work.avalon_slave.Request;
- signal rsp : work.avalon_slave.Response;
-
- signal signal_read : std_logic;
- signal signal_readdata : std_logic_vector( 31 downto 0 );
- signal index_output : integer range 0 to 1023;
-
- type input_data_array is array ( natural range <> ) of std_logic_vector(31 downto 0);
-
- constant input_data: input_data_array (0 to 1023) := (x"40daf8d9",x"400464d6",x"40707518",x"412f4d86",x"bf2c6338",x"3fe858d0",x"40a93c0d",x"411d1b42",x"40ae6f95",x"40f76d48",x"414b45bb",x"bf80c95c",x"40653088",x"40cf8814",x"404a5d41",x"40c8b99e",x"c0a2d52e",x"c097b780",x"c0618ef7",x"c0e982c7",x"c024cbd1",x"bf618a97",x"bfe51ce1",x"3fb47578",x"c11df822",x"c08594f9",x"403fd955",x"c0aa7966",x"bff13a72",x"40132fc6",x"bf2de1e2",x"4061d87f",x"c06ac864",x"bf711298",x"4011b5da",x"4110d242",x"402cc82f",x"413cdf10",x"4025bc6a",x"41356772",x"404ff73c",x"40ab30ae",x"412170aa",x"40326cc2",x"412caa7b",x"c09488ea",x"c092507c",x"c06f49b3",x"bf0d20d4",x"402ca19a",x"bff135fa",x"3fafefe8",x"c1197ab4",x"c10ca7e7",x"c0e7237f",x"c091c47c",x"c066436a",x"3d914c40",x"c0999d9d",x"bf82f570",x"c0e55fe3",x"c05520da",x"40605138",x"c021210c",x"40c78efa",x"bfd5f3be",x"3fd3d6b1",x"3fe55ef8",x"408eaf1a",x"bf99eb4a",x"400acf31",x"40ca0d76",x"c06f7ec0",x"c0156063",x"3fcbe0a0",x"4009d2a1",x"3feb3b7c",x"40f5953d",x"bfbe458a",x"4046b62c",x"c113cc05",x"c087d026",x"bfccd099",x"3f8155a6",x"c0f1209c",x"c11042a8",x"c0bf6ebc",x"3fc1136c",x"c1464c70",x"c12df84f",x"c10aa752",x"c0b06ec4",x"c08650e5",x"bfd06e2c",x"c0d2c72e",x"c0e3e57a",x"c08b3546",x"bfb0d585",x"403febfc",x"be122ec9",x"3fe57176",x"3fe53e46",x"4108cf43",x"3f01a6a4",x"403c3ee3",x"4017e4ad",x"40eb2c13",x"3ef0621c",x"40eba5ee",x"c09499f7",x"c054478c",x"bfac1b65",x"40b68a12",x"c11be620",x"c09ceffc",x"3f01c820",x"c0e2f412",x"c0a78f83",x"c0a41d0e",x"c05f2f6a",x"c0f98a04",x"c0fba274",x"c0fe9e26",x"c0a150f5",x"c07b476d",x"3e009bf0",x"c055c84d",x"bf142c8e",x"be67ec78",x"3dd2c0cc",x"3f011ca1",x"4077ccb8",x"3fc47cab",x"4107f727",x"bfd2f436",x"3f229404",x"403e75a3",x"405653d7",x"4055b80b",x"406c1a7a",x"408bf1a0",x"bf2951d8",x"3f5e1db9",x"3f0ceda0",x"bd48f1c8",x"40078de7",x"c0d40bfe",x"c047cafb",x"c02e4bc7",x"c03dd5ae",x"c0142d40",x"beadb830",x"c088264a",x"3eddd418",x"c07f2957",x"c0377cbb",x"3e6054b0",x"c0a43500",x"bfaf530d",x"404a35ab",x"c09d1b4d",x"3f137065",x"4029875f",x"40824c49",x"408786ed",x"40d59fa1",x"408f5241",x"410b56f8",x"40942720",x"4132ff7d",x"3f1748c0",x"407ed381",x"40886ce3",x"406f5b24",x"404b8482",x"4095a7c8",x"bfc0d0ee",x"c04d5c67",x"bef1981b",x"3f9b8e53",x"3f010d6c",x"40816b01",x"c03be548",x"bfe2e631",x"bf50b956",x"3fcb2630",x"c10cc7d7",x"c0ea1e79",x"c0996e64",x"bf4c0708",x"40df4d51",x"c082593a",x"3f911f18",x"40f2c5fe",x"3f240db0",x"407dd077",x"413a600e",x"beb58cb0",x"40014757",x"40b022de",x"4135f6b6",x"40a286ee",x"40c11cb7",x"410ced4a",x"bf935600",x"404d3b0a",x"41359a58",x"c09f481d",x"3da888b0",x"40ff55c1",x"bf8628b1",x"40559908",x"bfb1b61e",x"407bbeaa",x"c0a9e96e",x"c0fac5df",x"c0be2c58",x"c10fbd7b",x"c059776c",x"3ff23d0b",x"c0eef375",x"bfe29bf2",x"4021884b",x"3f07d900",x"40b22610",x"3daed460",x"4030b71f",x"40bf6a6e",x"3f9d6390",x"408a28d2",x"40a9da87",x"41306adc",x"40827670",x"40adf30d",x"40d3bb17",x"40c4c47c",x"40b053dc",x"411a898e",x"c041170a",x"3f230783",x"40b82185",x"c056f0a5",x"c0b27b9c",x"c08a913e",x"c0b1592a",x"c0ebbd8e",x"c08110fa",x"bf837a24",x"c082cffd",x"3fe6a02c",x"c0938da1",x"c03e4892",x"4015ee20",x"c04f04bf",x"bfba869f",x"be97d71c",x"408be6b0",x"beaf6864",x"4090daba",x"c089e406",x"3f9bc832",x"4128abc9",x"3f81999a",x"412b3f77",x"3fae413e",x"4092db9f",x"40ea6812",x"3fd46a6c",x"409e2e5c",x"c0696f7e",x"c018fc04",x"c07bf051",x"c0e7a797",x"c0c227ae",x"c05904cc",x"bfda9871",x"40492d22",x"c0d14fa4",x"c073a299",x"bfe46994",x"c0c18767",x"3e32b7c0",x"c1122d14",x"c140dffe",x"c12987f0",x"c1008994",x"c07640e8",x"bf0eaa08",x"c07e82be",x"bf9edaa2",x"40063aa3",x"c028afad",x"c03ef2d1",x"3f67c42c",x"405ec244",x"405c9d20",x"4040f756",x"401b9b21",x"406c6bbe",x"40543aca",x"410be00e",x"c0f35646",x"c101ed3c",x"c04273b8",x"40945b7d",x"c0ffe39e",x"c0d78e2c",x"c1123262",x"c0f7522a",x"c112c3f2",x"c154d998",x"c1537448",x"c14ae788",x"c0e56daa",x"bfee3c9e",x"c0b09aa8",x"c052c2eb",x"bf4acce8",x"c0fa6c22",x"c0a14e7e",x"c09a94ba",x"bf8d327f",x"4035c5b3",x"c03ea671",x"3f71fbc5",x"40f09f04",x"3fb6559a",x"40402833",x"40f2c9b0",x"3ffdacc4",x"40302c24",x"41118f2c",x"c0811c5a",x"3e833d44",x"40f77617",x"c0ceb437",x"c0011eb4",x"bf68a1b3",x"3f87bf94",x"c1035b72",x"c088c46d",x"3fad9ee0",x"c0eddc85",x"c11520cf",x"c0a3ae5c",x"c07f6a7e",x"406f84db",x"c0ab7840",x"40733e14",x"c06a6562",x"3ffd4321",x"bf8c24dd",x"3f927763",x"4042c5e0",x"bebc7778",x"3e71d150",x"3f1aedcc",x"4063fe9d",x"410fa150",x"3fd93bda",x"408ca422",x"409fc375",x"40b22aa6",x"40983215",x"4077de82",x"40ef5ece",x"3ff40f95",x"3ffbcd45",x"408f19d2",x"c0a83ae8",x"bfa0b156",x"bf18a1bb",x"40504818",x"c02d22cb",x"c0066d63",x"c006b74c",x"4018adb5",x"c049e8d2",x"3fd9b518",x"c112ab95",x"c03af28c",x"3f5a6b62",x"4075f720",x"c0b999c4",x"3ec39b04",x"405bb566",x"41145003",x"3e03bb30",x"c041d4aa",x"40565bb8",x"41476c6c",x"3de36dc0",x"40a020bd",x"414ce41b",x"40863b44",x"41129a5f",x"c028844a",x"c02b6540",x"c010647f",x"3feab4d4",x"41121b63",x"c0a16e58",x"bf2a96f9",x"4012eae9",x"c07973bb",x"c0b21017",x"c012342e",x"3ee9c9d8",x"c09d65e0",x"c0b6db34",x"c00e2a4a",x"bca9a3c0",x"402e6279",x"bf4f67fd",x"3fd545b1",x"3ff1c82a",x"4008f3d4",x"40dc9f64",x"3f53a7a8",x"406cf38e",x"41004546",x"bfb01428",x"40830f84",x"40ff9540",x"40152a98",x"40a1c715",x"40b6236d",x"409ac997",x"4102c902",x"3fb04b34",x"4024a316",x"400305c9",x"4068d5e0",x"3d2bb5e4",x"be916be5",x"3f9bc382",x"c00ac4ee",x"c01105ce",x"c0196620",x"c045b9b5",x"c04c7398",x"3f21c9f8",x"c06ca29b",x"bf65323e",x"40b0059c",x"c078bdd8",x"3f2c9dd0",x"3fa884ec",x"3ff8b3aa",x"40ec3c9e",x"c0630d84",x"bf6b41f0",x"bfce31a4",x"3f52ecd0",x"3f513fac",x"3eb5ed48",x"bfb2807c",x"3eef23f0",x"403c5d42",x"409b1ae2",x"4004d502",x"3fd84473",x"3f75847a",x"405024a4",x"bf95845b",x"3fb02bf1",x"c030aa97",x"c02b3e59",x"c06f890a",x"c08854e2",x"c0939869",x"c04096d0",x"c0ad5aa9",x"c02bf3f2",x"c0a84db8",x"c08ebd2a",x"c06ac675",x"bf474acc",x"c0542510",x"bff1bfad",x"3e21d4f8",x"3f2da811",x"40884bc0",x"bdd3f538",x"3fa060ff",x"3fe2f6d1",x"4108f818",x"c050c105",x"bf9abf70",x"c056cd3a",x"3f71a969",x"3fe09a2a",x"3fe4fb32",x"40d440f3",x"c0a514ec",x"bff02925",x"3fbb9bec",x"c04892e8",x"3e8bbba0",x"c0957aa2",x"3fc8db7c",x"c121ec19",x"c0cc7e06",x"c0b61353",x"3ec16b70",x"c0e28b6c",x"c03be8d5",x"c10b9c91",x"c128ec19",x"c0a2e87f",x"c03f078b",x"406b26fb",x"c0d108a2",x"bfdc9646",x"bd8f0118",x"40ba501c",x"3e6bd66c",x"40e43cf5",x"bfc2b632",x"c075f716",x"3fa9b636",x"403987f9",x"40934dbc",x"3fd28110",x"40a54b98",x"3eb7f8cb",x"40d0b07e",x"c0a862e6",x"bffa36e8",x"bfe545ff",x"c0162b65",x"c01a0971",x"40489147",x"c12696f6",x"c10cb790",x"c0abaea6",x"c096b4ec",x"c00b2756",x"c093fd3b",x"3eaf1170",x"c0b955fc",x"c0af1112",x"c00f52e4",x"bf5f118b",x"3f01a222",x"3f594028",x"40af408f",x"3fbe11ff",x"40368dfe",x"405bfb0c",x"40e893a5",x"4065f10b",x"410b4a36",x"3fc4024c",x"406fea5d",x"407b70e4",x"40773fb2",x"4037454d",x"40e4d0b4",x"bfe45ab3",x"3eacc56b",x"3f04fc7a",x"400bcd69",x"bfd671cf",x"bfbe63c5",x"40a7d286",x"c092059a",x"406fa312",x"c08818e8",x"bffcb53d",x"c00c7f0a",x"3f8c29c8",x"c0caafa4",x"c06b8568",x"c06e3b23",x"c0b37d25",x"3eac4954",x"409885e0",x"4038b4e1",x"40f7dc32",x"407d7c23",x"40dbb73b",x"41479089",x"bf085878",x"40953f7f",x"40c96689",x"40b59556",x"4109445e",x"bf7bb538",x"3edd9bc0",x"c05020e6",x"c02acd03",x"3f8c2062",x"3fc1c778",x"3fa6daca",x"40b56421",x"bfe9596e",x"40ca74c7",x"c1105c17",x"c0657b14",x"4052b152",x"c02fd13f",x"405e014c",x"c0081df5",x"40750df0",x"c03ae291",x"c03a6685",x"c086d86d",x"3f8b9fec",x"4103e159",x"40230980",x"41245338",x"4066b5c0",x"40b7d324",x"4102b96c",x"40afe790",x"41312c9e",x"409a0fd0",x"412aad3c",x"3fd934ae",x"40840594",x"4092be26",x"4056b65c",x"4099efb0",x"3fa2231b",x"409bf1ba",x"bf38b3a0",x"3fca21ac",x"bfde84e1",x"3fe857a8",x"c03feba6",x"bf77ef6c",x"406dca58",x"c0874354",x"bff47e27",x"c00624a6",x"bf98387e",x"404b284a",x"c059653e",x"c053ae82",x"c0866abc",x"3f223a5d",x"40b549aa",x"400ff449",x"4104cdac",x"403753d3",x"40870dd7",x"40cffb7f",x"407ceeb4",x"4086a7d0",x"411e7ad2",x"bf93f3e2",x"40064777",x"409be6ea",x"3f86714e",x"3f62ed02",x"3f7a0b17",x"400c1e0c",x"c0f4dd7a",x"c06beb6b",x"c042973a",x"c0305a3a",x"bfb85e46",x"c10b3416",x"c0ab1cb4",x"4041fdbe",x"c0d2e272",x"4046b7e4",x"c12cc469",x"c09973c9",x"bfe0f17a",x"40a5a850",x"c0f4815c",x"c0a8c5d5",x"c0247ef5",x"c029f71c",x"c08f81ef",x"3f5ca439",x"411932c5",x"c08fef6a",x"c0532d62",x"3fac9e2e",x"401b584f",x"40e1d549",x"3e59b184",x"40c80f05",x"c082e544",x"c104d295",x"c05ee450",x"4014aaf7",x"c0cd5f78",x"c08c8315",x"404759fa",x"c0e6f95f",x"3fee4dd4",x"c14f1342",x"c1412544",x"c0dea785",x"c0a4bb7e",x"c03e6d44",x"c0f0e03f",x"c0f3d061",x"c111e4cf",x"c0cb9e2e",x"c1059bbf",x"c01833d2",x"3e7f4a4e",x"3ef95adb",x"3fa0f798",x"40a8832e",x"3faa0343",x"410ed5a0",x"c0686403",x"3f9286fa",x"40150a45",x"40f6ebb4",x"bc2a3a80",x"40361e77",x"c0363e3a",x"c0881900",x"bffb3e93",x"3f9402e2",x"c1123c9c",x"c0fb7978",x"c09a4095",x"c093237e",x"c09cfa9f",x"c00a0f0b",x"c0b18100",x"c032da33",x"c0f28e3d",x"c0953c90",x"c062eca2",x"c014a903",x"c004e888",x"406b15da",x"bfd891b4",x"3ea724e3",x"3fd3f8fc",x"40ea8c4a",x"3fa1d0ea",x"411e83c9",x"c0452595",x"40163eb0",x"40c5d5d4",x"405a99ba",x"40fcdb4c",x"40217feb",x"40b3bbdc",x"bfd587f8",x"c0b8f562",x"bf4fe9c5",x"3fb7d7ab",x"4029a390",x"bfcb9de6",x"bf955520",x"c00d4438",x"409c1ca2",x"c12bbfbc",x"c1270002",x"c09d6161",x"3f85986c",x"c06205f6",x"c017b4cf",x"3f971f69",x"c0be3833",x"c04ca058",x"c0416ef8",x"c07e0144",x"3f927bff",x"403dd9e8",x"407f44d0",x"40cdaaea",x"408f74ea",x"40a8a886",x"41284cea",x"409533dd",x"41226284",x"4091c391",x"40a3e69b",x"4099e5d6",x"409a7d83",x"4127103a",x"3f640c1e",x"40d4823b",x"3e8f253e",x"3f03d428",x"40d70628",x"c021689f",x"403ec858",x"c086fdf2",x"c09b49aa",x"c012d2a8",x"bfc5ea56",x"4077cffb",x"c09e8330",x"c0e8332f",x"bfb7f596",x"3f95eea2",x"3fb92c4e",x"41097c1f",x"c019ffb9",x"402ebea2",x"410f4b18",x"40047e99",x"40a2aba3",x"40c10076",x"411d07d0",x"bfe90870",x"407dc044",x"414a0ea4",x"406c4c7c",x"40b7016b",x"40c5cf5f",x"404ccb6e",x"40a1d6ca",x"bf9e68e5",x"c042832c",x"c0f86f5b",x"c1069412",x"c048712e",x"3dc79ab0",x"beefd60c",x"bf868084",x"bfd5c09d",x"405c7b67",x"c0c8f8e6",x"c11d1aff",x"c112f6cc",x"c1042833",x"c0dc382c",x"bf6b6710",x"40840056",x"3fc47e0f",x"4096a63e",x"3f340228",x"3f536620",x"3ed2d1b0",x"c019b8d0",x"404bc311",x"410490e8",x"40820ea4",x"40b0e1fc",x"4093196c",x"40626c99",x"40bc7c31",x"c068df7b",x"3de89630",x"40b9c8a3",x"c08cb9f7",x"bff9b2f8",x"4049fef3",x"c0741dfd",x"40101165",x"c09c6630",x"4034c682",x"c0bcf662",x"bdef7640",x"c0cdeeca",x"c08140ea",x"bef3f1a0",x"c0495832",x"40afc769",x"c1118454",x"c0fc8a1b",x"bfd2ea1e",x"3fcdc36d",x"3fdf4bb5",x"3ff37236",x"409b169a",x"bf4507c8",x"c01d8203",x"beddd0f8",x"c0021d37",x"3fd58238",x"40076a3a",x"3fd7f84a",x"3fbe9cbc",x"40886cf4",x"bfaf25fe",x"3f6ddca6",x"c0282fd7",x"c03c87f6",x"bfc87c84",x"c0981a67",x"bfcc8c38",x"c0bc3e91",x"c097a546",x"c0aadfdf",x"c0696a23",x"c0b7c161",x"c0a29fe0",x"c091f965",x"3f602070",x"c0d16ff8",x"c0412937",x"bfb7a195",x"bf87cd77",x"be94d7d6",x"3ee51d3d",x"40e5b6bc",x"3e1b7170",x"408cca8a",x"3fdc1813",x"40176ae5",x"40364a3f",x"400869de",x"40c61976",x"bff6704c",x"3d98d400",x"3d1726e0",x"407daba8",x"c0280d2b",x"3fd27338",x"c0b33678",x"c0852d6d",x"c08c8360",x"bf631e88",x"c0f16b52",x"c0b71d47",x"c03e8c82",x"c0b6ac59",x"c09d516f",x"c0816e10",x"3e5d75a0",x"c0886390",x"c02d9163",x"bfed0375",x"bf45033a",x"3fcc603e",x"3e664b0e",x"40511138",x"3fce2b8a",x"401e655c",x"40c29380",x"402b64f4",x"407fcdc8",x"405e8cb9",x"40769b91",x"4042b656",x"40572e48",x"40143b14",x"4087ee0d",x"3d25ba88",x"401eea69",x"bfa9a898",x"40a298e4",x"c1022b85",x"c078a896",x"c03d4654",x"4006c07a",x"c099f037",x"c05b2580",x"402b15d3",x"c1042d88",x"c06de496",x"3f96e4fc",x"c1050ec3",x"c013191e",x"40359f37",x"c067dcc0",x"bf4875a4",x"400728ec",x"404cea41",x"40f36cf6",x"c05e5c9a",x"40338367",x"413c6367",x"4069edaa",x"40bed7b2",x"40a9341c",x"40bc48a6",x"40edd2bd",x"bfe28bea",x"bed47718",x"c04422c5",x"3f24a4ae",x"40b83676",x"c041b214",x"bf66b2f0",x"3f6fcf40",x"bfe8558c",x"3f14ec98",x"c0199d65",x"401d875e",x"c0345f60",x"3fc40e20",x"bfec20f1",x"bd523e90",x"3d9dbfb4",x"3fdb1a5e",x"40900dbf",x"3fcc640a",x"4065fe4f",x"411474e5",x"40501e50",x"413f211a",x"bf72e7d8",x"4091e06c",x"41074300",x"40b9df89",x"4122d009",x"40a419ea",x"40fa6074",x"3fe62880",x"3e0ed320",x"403ec4d0",x"40375370",x"40856fc4",x"3f7c735b",x"3f0df7b6",x"bdcb1282",x"40cf4ee6",x"c04db21c",x"bee0915c",x"bf98d0d8",x"bfe66abc",x"bf1fa580",x"bf59cd2c",x"3f73dc8a",x"c08eb01d",x"c0b45d49",x"bf3d01f9",x"4096ad9e");
- signal signal_write : std_logic;
- signal signal_writedata : std_logic_vector( 31 downto 0 );
-
- begin
-
- dut : entity work.task_fft
- port map (
- clk => clk,
- reset => reset,
-
- address => req.address,
- read => req.read,
- readdata => rsp.readdata,
- write => req.write,
- writedata => req.writedata,
-
- signal_read => signal_read,
- signal_readdata => signal_readdata,
-
- signal_write => signal_write,
- signal_writedata => signal_writedata
- );
-
- clk <= not clk after 10 ns;
-
- p_number_input_sample: process ( clk, reset ) is
- begin
- if ( reset = '1' ) then
- index_output <= 1;
- signal_readdata <= input_data(0);
- elsif ( rising_edge( clk ) ) then
- if signal_read = '1' then
- if index_output /= 1023 then
- index_output <= index_output + 1;
- end if;
- signal_readdata <= input_data(index_output);
- end if;
- end if;
- end process p_number_input_sample;
-
- reset_release : process is
- begin
- wait for 435 ns;
- reset <= '0';
- wait;
- end process reset_release;
-
- stimulus: process is
- variable address : std_logic_vector( 3 downto 0 );
- variable level : std_logic_vector( 31 downto 0 );
- variable readdata : std_logic_vector( 31 downto 0 );
- variable writedata : std_logic_vector( 31 downto 0 );
- variable expected_readdata : std_logic_vector( 31 downto 0 );
- begin
- std.textio.write( std.textio.OUTPUT, "--------------------------------------------------------------------------------" & LF );
- std.textio.write( std.textio.OUTPUT, "Starting test_task_fft" & LF );
- wait until falling_edge( reset );
- wait until falling_edge( clk );
-
- test_configure( clk => clk, req => req, rsp => rsp );
- test_execute( clk => clk, req => req, rsp => rsp,
-
- write => signal_write, writedata => signal_writedata );
- wait until falling_edge( signal_write );
-
- wait for 200 ns;
- std.textio.write( std.textio.OUTPUT, "Finished test_task_fft" & LF );
- std.textio.write( std.textio.OUTPUT, "--------------------------------------------------------------------------------" & LF );
-
- std.env.finish( 0 );
- end process stimulus;
- end architecture test;
-
-
|