From 8391563935d924918cd7decc0b51d9cea0b44e52 Mon Sep 17 00:00:00 2001 From: Retrocamara42 Date: Thu, 12 Jun 2025 07:22:40 -0500 Subject: [PATCH 1/3] feat: test updated to write results and script for validation implemented --- .../simple_multicast_x_test/result.ref | 6 +- .../simple_multicast_x_test/stimuli.txt | 2 +- test/noc_tb.vhdl | 109 ++---------------- .../generate_test_files.py | 52 ++++----- test/scripts/generate_test_files/result.ref | 4 + test/scripts/generate_test_files/stimuli.txt | 2 + test/scripts/result.ref | 2 - test/scripts/stimuli.txt | 2 - test/scripts/validate_results/result.ref | 4 + test/scripts/validate_results/simulation.log | 4 + test/scripts/validate_results/test.log | 8 ++ .../validate_results/validate_results.py | 22 ++++ 12 files changed, 86 insertions(+), 131 deletions(-) rename test/scripts/{ => generate_test_files}/generate_test_files.py (77%) create mode 100644 test/scripts/generate_test_files/result.ref create mode 100644 test/scripts/generate_test_files/stimuli.txt delete mode 100644 test/scripts/result.ref delete mode 100644 test/scripts/stimuli.txt create mode 100644 test/scripts/validate_results/result.ref create mode 100644 test/scripts/validate_results/simulation.log create mode 100644 test/scripts/validate_results/test.log create mode 100644 test/scripts/validate_results/validate_results.py diff --git a/test/input/noc_tests/simple_multicast_x_test/result.ref b/test/input/noc_tests/simple_multicast_x_test/result.ref index c737bbb..c2c6a0d 100644 --- a/test/input/noc_tests/simple_multicast_x_test/result.ref +++ b/test/input/noc_tests/simple_multicast_x_test/result.ref @@ -1,2 +1,4 @@ -0 1017 0001000000000000001000100001000010000000000000000000000000000001 -0 1011 0001000000000000010000100001000010000000000000000000000000000001 \ No newline at end of file +0 1019 0001000000000000001000100001100000000000000000000000000000000001 +0 1017 0001000000000000001000100001100000000000000000000000000000000001 +0 1011 0001000000000000001000100001100000000000000000000000000000000001 +0 1009 0001000000000000001000100001100000000000000000000000000000000001 diff --git a/test/input/noc_tests/simple_multicast_x_test/stimuli.txt b/test/input/noc_tests/simple_multicast_x_test/stimuli.txt index 8b0cf27..e03d506 100644 --- a/test/input/noc_tests/simple_multicast_x_test/stimuli.txt +++ b/test/input/noc_tests/simple_multicast_x_test/stimuli.txt @@ -1,2 +1,2 @@ # is external? | path | data -0 971 0001000000000000001000100001000010000000000000000000000000000001 +0 971 0001000000000000001000100001100000000000000000000000000000000001 diff --git a/test/noc_tb.vhdl b/test/noc_tb.vhdl index e3b1b3c..a24179b 100644 --- a/test/noc_tb.vhdl +++ b/test/noc_tb.vhdl @@ -42,63 +42,22 @@ architecture bench of noc_tb is file conf_file : text open read_mode is "config.txt"; file stimuli_file : text open read_mode is "stimuli.txt"; - file reference_file : text open read_mode is "result.ref"; file log_file : text open write_mode is "simulation.log"; procedure log_test_result ( index : integer; - sollwert, istwert : WORD; - is_external, soll_is_external : boolean; - sollpath, istpath : integer + istwert : WORD; + is_external : std_logic; + istpath : integer ) is variable rowOut : LINE; begin - write(rowOut, index); - if is_external then - write(rowOut, string'(" = loop (path/fifo - external)")); - else - write(rowOut, string'(" = loop (path/fifo - PE)")); - end if; - WRITELINE(log_file, rowOut); - - write(rowOut, string'("-->")); - write(rowOut, sollwert); - write(rowOut, string'(" = sollwert")); - WRITELINE(log_file, rowOut); - write(rowOut, string'("-->")); - write(rowOut, istwert); - write(rowOut, string'(" = istwert")); - WRITELINE(log_file, rowOut); - - write(rowOut, string'("-->")); - write(rowOut, soll_is_external); - write(rowOut, string'(" = soll is_external")); - WRITELINE(log_file, rowOut); - write(rowOut, string'("-->")); write(rowOut, is_external); - write(rowOut, string'(" = ist is_external")); + write(rowOut, string'(" ")); + write(rowOut, index); + write(rowOut, string'(" ")); + write(rowOut, istwert); WRITELINE(log_file, rowOut); - - write(rowOut, string'("-->")); - write(rowOut, sollpath); - write(rowOut, string'(" = sollpath")); - WRITELINE(log_file, rowOut); - write(rowOut, string'("-->")); - write(rowOut, istpath); - write(rowOut, string'(" = istpath")); - WRITELINE(log_file, rowOut); - - if istwert = sollwert and is_external = soll_is_external then - write(rowOut, string'("-------------------------->pass")); - WRITELINE(log_file, rowOut); - write(rowOut, string'("******************************")); - WRITELINE(log_file, rowOut); - else - write(rowOut, string'("-------------------------->fail")); - WRITELINE(log_file, rowOut); - write(rowOut, string'("******************************")); - WRITELINE(log_file, rowOut); - end if; end procedure; begin @@ -191,7 +150,7 @@ begin wait; end process; - validate_results: process(c_send_reqs, pe_send_reqs, + save_results: process(c_send_reqs, pe_send_reqs, c_send_reqs_prev, pe_send_reqs_prev, data_chip_out, pe_data_out) variable input_line : line; @@ -205,32 +164,9 @@ begin for i in 0 to num_paths_ext*4-1 loop if (c_send_reqs(i) = '0' and c_send_reqs_prev(i) = '1') or (c_send_reqs(i) = '1' and c_send_reqs_prev(i) = '0') then - istwert := data_chip_out(i); + istwert := data_chip_out(i); istpath := i; - readline(reference_file, input_line); - - read(input_line, is_external, valid_data); - assert valid_data report "Invalid data in file (is external)" - severity error; - - ist_is_external := is_external(0) = '1'; - assert ist_is_external report "Invalid result (is external)" - severity warning; - - read(input_line, sollpath, valid_data); - assert valid_data report "Invalid data in file (path)" - severity error; - assert istpath = sollpath report "Invalid result (path)" - severity warning; - - read(input_line, sollwert, valid_data); - assert valid_data report "Invalid data in file (data)" - severity error; - assert istwert = sollwert report "Invalid result (data)" - severity warning; - - log_test_result(i, istwert, sollwert, TRUE, ist_is_external, - sollpath, istpath); + log_test_result(i, istwert, '1', istpath); end if; end loop; elsif pe_send_reqs'event or pe_send_reqs_prev'event then @@ -239,30 +175,7 @@ begin (pe_send_reqs(i) = '1' and pe_send_reqs_prev(i) = '0') then istwert := pe_data_out(i); istpath := i; - readline(reference_file, input_line); - - read(input_line, is_external, valid_data); - assert valid_data report "Invalid data in file (is external)" - severity error; - - ist_is_external := is_external(0) = '1'; - assert not ist_is_external report "Invalid result (is external)" - severity warning; - - read(input_line, sollpath, valid_data); - assert valid_data report "Invalid data in file (path)" - severity error; - assert istpath = sollpath report "Invalid result (path)" - severity warning; - - read(input_line, sollwert, valid_data); - assert valid_data report "Invalid data in file (data)" - severity error; - assert istwert = sollwert report "Invalid result (data)" - severity warning; - - log_test_result(i, istwert, sollwert, FALSE, ist_is_external, - sollpath, istpath); + log_test_result(i, istwert, '0', istpath); end if; end loop; end if; diff --git a/test/scripts/generate_test_files.py b/test/scripts/generate_test_files/generate_test_files.py similarity index 77% rename from test/scripts/generate_test_files.py rename to test/scripts/generate_test_files/generate_test_files.py index 9887447..06633c4 100644 --- a/test/scripts/generate_test_files.py +++ b/test/scripts/generate_test_files/generate_test_files.py @@ -16,32 +16,33 @@ def get_index_path(path_x : str, path_y : str): index_path -= (4**i)*(int(path_x[4-i])*2 + int(path_y[4-i])) return index_path -def get_multicast_reference(copy_x, copy_y, recv_path, packets): +def get_multicast_reference(copy_x, copy_y, recv_path, packet): x_paths = [] y_paths = [] x_poss_paths = [] y_poss_paths = [] - path_packets = [] num_paths = 1 - for i in range(len(copy_x)): - if copy_x[i] == "1" and copy_y == "1": + for bit_pos in range(len(copy_x)): + if copy_x[bit_pos] == "1" and copy_y[bit_pos] == "1": x_poss_paths.append(["0","0","1","1"]) - y_poss_paths.append(["0","1","0","1"]) + y_poss_paths.append(["0","0","1","1"]) num_paths *= 4 - elif copy_x[i] == "1": + elif copy_x[bit_pos] == "1": x_poss_paths.append(["0","1"]) - y_poss_paths.append([recv_path[0][i],recv_path[0][i]]) + y_poss_paths.append([recv_path[1][bit_pos],recv_path[1][bit_pos]]) num_paths *= 2 - elif copy_y[i] == "1": - x_poss_paths.append([recv_path[0][i],recv_path[0][i]]) + elif copy_y[bit_pos] == "1": + x_poss_paths.append([recv_path[0][bit_pos],recv_path[0][bit_pos]]) y_poss_paths.append(["0","1"]) num_paths *= 2 else: - y_poss_paths.append(recv_path[0][i]) - x_poss_paths.append(recv_path[0][i]) + x_poss_paths.append([recv_path[0][bit_pos]]) + y_poss_paths.append([recv_path[1][bit_pos]]) + division = num_paths for i in range(len(x_poss_paths)): k = 0 + division = int(division/len(x_poss_paths[i])) for j in range(num_paths): if i == 0: x_paths.append(x_poss_paths[0][k]) @@ -49,15 +50,17 @@ def get_multicast_reference(copy_x, copy_y, recv_path, packets): else: x_paths[j] += x_poss_paths[i][k] y_paths[j] += y_poss_paths[i][k] - k += 1 - if k == len(x_poss_paths[0]): - k = 0 + if ((j+1) % division) == 0: + if k < len(x_poss_paths[0]): + k += 1 + else: + k = 0 reference = "" for x_path, y_path in zip(x_paths, y_paths): index_path = get_index_path(x_path, y_path) reference += "0 " + str(index_path) + " " - reference += packets[i] + "\n" #TODO + reference += packet + "\n" return reference @@ -103,32 +106,29 @@ for p, path in enumerate(sender_paths): reference += "0 " + str(index_path) + " " reference += packet + "\n" else: - list_copy_x = list_copy_y = list("00000") + list_copy_x = list("00000") + list_copy_y = list("00000") for j in range(2,len(recv_paths[p]),2): for i in range(len(recv_paths[p][0])): if recv_paths[p][0][i] != recv_paths[p][j][i]: list_copy_x[i]= "1" - if recv_paths[p][1][i] != recv_paths[p][j+1][i]: - copylist_copy_y_y[i]= "1" + list_copy_y[i]= "1" copy_x = ''.join(list_copy_x) copy_y = ''.join(list_copy_y) - packets = [] - for i in range(0,len(recv_paths[p]),2): - packet = HEADER + CHIP_X + CHIP_Y - packet += recv_paths[p][i] + recv_paths[p][i+1] + copy_x + copy_y - packet += f'{data_packet:030b}' - packets.append(packet) + packet = HEADER + CHIP_X + CHIP_Y + packet += recv_paths[p][0] + recv_paths[p][1] + copy_x + copy_y + packet += f'{data_packet:030b}' # assign packet - stimuli += packets[0] + "\n" + stimuli += packet + "\n" # reference """for i in range(int(len(recv_paths[p])/2)): index_path = get_index_path(recv_paths[p][2*i],recv_paths[p][2*i+1]) reference += "0 " + str(index_path) + " " reference += packets[i] + "\n" """ - reference = get_multicast_reference(copy_x, copy_y, recv_paths[p], packets) + reference = get_multicast_reference(copy_x, copy_y, recv_paths[p], packet) data_packet += 1 diff --git a/test/scripts/generate_test_files/result.ref b/test/scripts/generate_test_files/result.ref new file mode 100644 index 0000000..c2c6a0d --- /dev/null +++ b/test/scripts/generate_test_files/result.ref @@ -0,0 +1,4 @@ +0 1019 0001000000000000001000100001100000000000000000000000000000000001 +0 1017 0001000000000000001000100001100000000000000000000000000000000001 +0 1011 0001000000000000001000100001100000000000000000000000000000000001 +0 1009 0001000000000000001000100001100000000000000000000000000000000001 diff --git a/test/scripts/generate_test_files/stimuli.txt b/test/scripts/generate_test_files/stimuli.txt new file mode 100644 index 0000000..e03d506 --- /dev/null +++ b/test/scripts/generate_test_files/stimuli.txt @@ -0,0 +1,2 @@ +# is external? | path | data +0 971 0001000000000000001000100001100000000000000000000000000000000001 diff --git a/test/scripts/result.ref b/test/scripts/result.ref deleted file mode 100644 index 93154d1..0000000 --- a/test/scripts/result.ref +++ /dev/null @@ -1,2 +0,0 @@ -0 1017 0001000000000000001000100001100011000000000000000000000000000001 -0 1011 0001000000000000010000100001100011000000000000000000000000000001 diff --git a/test/scripts/stimuli.txt b/test/scripts/stimuli.txt deleted file mode 100644 index 364cef6..0000000 --- a/test/scripts/stimuli.txt +++ /dev/null @@ -1,2 +0,0 @@ -# is external? | path | data -0 971 0001000000000000001000100001100011000000000000000000000000000001 diff --git a/test/scripts/validate_results/result.ref b/test/scripts/validate_results/result.ref new file mode 100644 index 0000000..c2c6a0d --- /dev/null +++ b/test/scripts/validate_results/result.ref @@ -0,0 +1,4 @@ +0 1019 0001000000000000001000100001100000000000000000000000000000000001 +0 1017 0001000000000000001000100001100000000000000000000000000000000001 +0 1011 0001000000000000001000100001100000000000000000000000000000000001 +0 1009 0001000000000000001000100001100000000000000000000000000000000001 diff --git a/test/scripts/validate_results/simulation.log b/test/scripts/validate_results/simulation.log new file mode 100644 index 0000000..c9b6a45 --- /dev/null +++ b/test/scripts/validate_results/simulation.log @@ -0,0 +1,4 @@ +0 1009 0001000000000000001000100001100000000000000000000000000000000001 +0 1011 0001000000000000001000100001100000000000000000000000000000000001 +0 1017 0001000000000000001000100001100000000000000000000000000000000001 +0 1019 0001000000000000001000100001100000000000000000000000000000000001 diff --git a/test/scripts/validate_results/test.log b/test/scripts/validate_results/test.log new file mode 100644 index 0000000..7176fa7 --- /dev/null +++ b/test/scripts/validate_results/test.log @@ -0,0 +1,8 @@ +0 1009 0001000000000000001000100001100000000000000000000000000000000001 +---> passed! +0 1011 0001000000000000001000100001100000000000000000000000000000000001 +---> passed! +0 1017 0001000000000000001000100001100000000000000000000000000000000001 +---> passed! +0 1019 0001000000000000001000100001100000000000000000000000000000000001 +---> passed! diff --git a/test/scripts/validate_results/validate_results.py b/test/scripts/validate_results/validate_results.py new file mode 100644 index 0000000..dd5bb5f --- /dev/null +++ b/test/scripts/validate_results/validate_results.py @@ -0,0 +1,22 @@ +reference = [] +with open("result.ref", "r") as f: + for line in f: + reference.append(line) +print(reference) + +results = [] +with open("simulation.log", "r") as f: + for line in f: + results.append(line) +print(results) + +test_logs = [] +for result in results: + if result in reference: + test_logs.append(result + "---> passed!") + else: + test_logs.append(result + "---> failed!") + +with open("test.log", "w") as f: + for test_log in test_logs: + f.write(test_log+"\n") \ No newline at end of file From a538f2d9a142ed8f127f1bd3f113757c8eee50b9 Mon Sep 17 00:00:00 2001 From: Retrocamara42 Date: Thu, 12 Jun 2025 08:58:36 -0500 Subject: [PATCH 2/3] feat: scripts copy files automatically --- .gitignore | 1 + .../simple_multicast_4_test/result.ref | 16 ++ .../simple_multicast_4_test/simulation.log | 16 ++ .../simple_multicast_4_test/stimuli.txt | 2 + .../simple_multicast_4_test/test.log | 32 ++++ .../simple_multicast_x_test/simulation.log | 4 + .../simple_multicast_x_test/test.log | 8 + .../simple_multicast_y_test/result.ref | 4 + .../simple_multicast_y_test/simulation.log | 4 + .../simple_multicast_y_test/stimuli.txt | 2 + .../simple_multicast_y_test/test.log | 8 + .../generate_test_files.py | 143 +++-------------- test/scripts/generate_test_files/result.ref | 20 ++- test/scripts/generate_test_files/stimuli.txt | 2 +- test/scripts/generate_test_files/utils.py | 146 ++++++++++++++++++ test/scripts/validate_results/result.ref | 20 ++- test/scripts/validate_results/simulation.log | 20 ++- test/scripts/validate_results/test.log | 32 +++- .../validate_results/validate_results.py | 17 +- 19 files changed, 355 insertions(+), 142 deletions(-) create mode 100644 test/input/noc_tests/simple_multicast_4_test/result.ref create mode 100644 test/input/noc_tests/simple_multicast_4_test/simulation.log create mode 100644 test/input/noc_tests/simple_multicast_4_test/stimuli.txt create mode 100644 test/input/noc_tests/simple_multicast_4_test/test.log create mode 100644 test/input/noc_tests/simple_multicast_x_test/simulation.log create mode 100644 test/input/noc_tests/simple_multicast_x_test/test.log create mode 100644 test/input/noc_tests/simple_multicast_y_test/result.ref create mode 100644 test/input/noc_tests/simple_multicast_y_test/simulation.log create mode 100644 test/input/noc_tests/simple_multicast_y_test/stimuli.txt create mode 100644 test/input/noc_tests/simple_multicast_y_test/test.log create mode 100644 test/scripts/generate_test_files/utils.py diff --git a/.gitignore b/.gitignore index 9627ab6..fad0d7b 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ drawings/*.odg drawings/*.odg# *.mpf work +**/__pycache__ diff --git a/test/input/noc_tests/simple_multicast_4_test/result.ref b/test/input/noc_tests/simple_multicast_4_test/result.ref new file mode 100644 index 0000000..d339d28 --- /dev/null +++ b/test/input/noc_tests/simple_multicast_4_test/result.ref @@ -0,0 +1,16 @@ +0 765 0001000000000001011100000101001010000000000000000000000000000001 +0 761 0001000000000001011100000101001010000000000000000000000000000001 +0 757 0001000000000001011100000101001010000000000000000000000000000001 +0 753 0001000000000001011100000101001010000000000000000000000000000001 +0 701 0001000000000001011100000101001010000000000000000000000000000001 +0 697 0001000000000001011100000101001010000000000000000000000000000001 +0 693 0001000000000001011100000101001010000000000000000000000000000001 +0 689 0001000000000001011100000101001010000000000000000000000000000001 +0 637 0001000000000001011100000101001010000000000000000000000000000001 +0 633 0001000000000001011100000101001010000000000000000000000000000001 +0 629 0001000000000001011100000101001010000000000000000000000000000001 +0 625 0001000000000001011100000101001010000000000000000000000000000001 +0 573 0001000000000001011100000101001010000000000000000000000000000001 +0 569 0001000000000001011100000101001010000000000000000000000000000001 +0 565 0001000000000001011100000101001010000000000000000000000000000001 +0 561 0001000000000001011100000101001010000000000000000000000000000001 diff --git a/test/input/noc_tests/simple_multicast_4_test/simulation.log b/test/input/noc_tests/simple_multicast_4_test/simulation.log new file mode 100644 index 0000000..351a0df --- /dev/null +++ b/test/input/noc_tests/simple_multicast_4_test/simulation.log @@ -0,0 +1,16 @@ +0 561 0001000000000001011100000101001010000000000000000000000000000001 +0 565 0001000000000001011100000101001010000000000000000000000000000001 +0 569 0001000000000001011100000101001010000000000000000000000000000001 +0 573 0001000000000001011100000101001010000000000000000000000000000001 +0 625 0001000000000001011100000101001010000000000000000000000000000001 +0 629 0001000000000001011100000101001010000000000000000000000000000001 +0 633 0001000000000001011100000101001010000000000000000000000000000001 +0 637 0001000000000001011100000101001010000000000000000000000000000001 +0 689 0001000000000001011100000101001010000000000000000000000000000001 +0 693 0001000000000001011100000101001010000000000000000000000000000001 +0 697 0001000000000001011100000101001010000000000000000000000000000001 +0 701 0001000000000001011100000101001010000000000000000000000000000001 +0 753 0001000000000001011100000101001010000000000000000000000000000001 +0 757 0001000000000001011100000101001010000000000000000000000000000001 +0 761 0001000000000001011100000101001010000000000000000000000000000001 +0 765 0001000000000001011100000101001010000000000000000000000000000001 diff --git a/test/input/noc_tests/simple_multicast_4_test/stimuli.txt b/test/input/noc_tests/simple_multicast_4_test/stimuli.txt new file mode 100644 index 0000000..aa1d8a8 --- /dev/null +++ b/test/input/noc_tests/simple_multicast_4_test/stimuli.txt @@ -0,0 +1,2 @@ +# is external? | path | data +0 971 0001000000000001011100000101001010000000000000000000000000000001 # origin: (00100-00110) --> dest: (01011-10000,00001-11010) diff --git a/test/input/noc_tests/simple_multicast_4_test/test.log b/test/input/noc_tests/simple_multicast_4_test/test.log new file mode 100644 index 0000000..60d88a7 --- /dev/null +++ b/test/input/noc_tests/simple_multicast_4_test/test.log @@ -0,0 +1,32 @@ +0 561 0001000000000001011100000101001010000000000000000000000000000001 +---> passed! +0 565 0001000000000001011100000101001010000000000000000000000000000001 +---> passed! +0 569 0001000000000001011100000101001010000000000000000000000000000001 +---> passed! +0 573 0001000000000001011100000101001010000000000000000000000000000001 +---> passed! +0 625 0001000000000001011100000101001010000000000000000000000000000001 +---> passed! +0 629 0001000000000001011100000101001010000000000000000000000000000001 +---> passed! +0 633 0001000000000001011100000101001010000000000000000000000000000001 +---> passed! +0 637 0001000000000001011100000101001010000000000000000000000000000001 +---> passed! +0 689 0001000000000001011100000101001010000000000000000000000000000001 +---> passed! +0 693 0001000000000001011100000101001010000000000000000000000000000001 +---> passed! +0 697 0001000000000001011100000101001010000000000000000000000000000001 +---> passed! +0 701 0001000000000001011100000101001010000000000000000000000000000001 +---> passed! +0 753 0001000000000001011100000101001010000000000000000000000000000001 +---> passed! +0 757 0001000000000001011100000101001010000000000000000000000000000001 +---> passed! +0 761 0001000000000001011100000101001010000000000000000000000000000001 +---> passed! +0 765 0001000000000001011100000101001010000000000000000000000000000001 +---> passed! diff --git a/test/input/noc_tests/simple_multicast_x_test/simulation.log b/test/input/noc_tests/simple_multicast_x_test/simulation.log new file mode 100644 index 0000000..c9b6a45 --- /dev/null +++ b/test/input/noc_tests/simple_multicast_x_test/simulation.log @@ -0,0 +1,4 @@ +0 1009 0001000000000000001000100001100000000000000000000000000000000001 +0 1011 0001000000000000001000100001100000000000000000000000000000000001 +0 1017 0001000000000000001000100001100000000000000000000000000000000001 +0 1019 0001000000000000001000100001100000000000000000000000000000000001 diff --git a/test/input/noc_tests/simple_multicast_x_test/test.log b/test/input/noc_tests/simple_multicast_x_test/test.log new file mode 100644 index 0000000..7176fa7 --- /dev/null +++ b/test/input/noc_tests/simple_multicast_x_test/test.log @@ -0,0 +1,8 @@ +0 1009 0001000000000000001000100001100000000000000000000000000000000001 +---> passed! +0 1011 0001000000000000001000100001100000000000000000000000000000000001 +---> passed! +0 1017 0001000000000000001000100001100000000000000000000000000000000001 +---> passed! +0 1019 0001000000000000001000100001100000000000000000000000000000000001 +---> passed! diff --git a/test/input/noc_tests/simple_multicast_y_test/result.ref b/test/input/noc_tests/simple_multicast_y_test/result.ref new file mode 100644 index 0000000..93d8c2c --- /dev/null +++ b/test/input/noc_tests/simple_multicast_y_test/result.ref @@ -0,0 +1,4 @@ +0 1017 0001000000000000001001110000000101000000000000000000000000000001 +0 1016 0001000000000000001001110000000101000000000000000000000000000001 +0 1001 0001000000000000001001110000000101000000000000000000000000000001 +0 1000 0001000000000000001001110000000101000000000000000000000000000001 diff --git a/test/input/noc_tests/simple_multicast_y_test/simulation.log b/test/input/noc_tests/simple_multicast_y_test/simulation.log new file mode 100644 index 0000000..38261a7 --- /dev/null +++ b/test/input/noc_tests/simple_multicast_y_test/simulation.log @@ -0,0 +1,4 @@ +0 1000 0001000000000000001001110000000101000000000000000000000000000001 +0 1001 0001000000000000001001110000000101000000000000000000000000000001 +0 1016 0001000000000000001001110000000101000000000000000000000000000001 +0 1017 0001000000000000001001110000000101000000000000000000000000000001 diff --git a/test/input/noc_tests/simple_multicast_y_test/stimuli.txt b/test/input/noc_tests/simple_multicast_y_test/stimuli.txt new file mode 100644 index 0000000..0a23eb1 --- /dev/null +++ b/test/input/noc_tests/simple_multicast_y_test/stimuli.txt @@ -0,0 +1,2 @@ +# is external? | path | data +0 971 0001000000000000001001110000000101000000000000000000000000000001 diff --git a/test/input/noc_tests/simple_multicast_y_test/test.log b/test/input/noc_tests/simple_multicast_y_test/test.log new file mode 100644 index 0000000..9200a49 --- /dev/null +++ b/test/input/noc_tests/simple_multicast_y_test/test.log @@ -0,0 +1,8 @@ +0 1000 0001000000000000001001110000000101000000000000000000000000000001 +---> passed! +0 1001 0001000000000000001001110000000101000000000000000000000000000001 +---> passed! +0 1016 0001000000000000001001110000000101000000000000000000000000000001 +---> passed! +0 1017 0001000000000000001001110000000101000000000000000000000000000001 +---> passed! diff --git a/test/scripts/generate_test_files/generate_test_files.py b/test/scripts/generate_test_files/generate_test_files.py index 06633c4..50fc838 100644 --- a/test/scripts/generate_test_files/generate_test_files.py +++ b/test/scripts/generate_test_files/generate_test_files.py @@ -1,140 +1,39 @@ -NUM_PE = 1024 -HEADER = "0001" -CHIP_X = "00000" -CHIP_Y = "00000" -NO_COPY = "00000" -sender_paths = [["00100","00110"]] # x,y -recv_paths = [["00001","00010","00010","00010"]] +import shutil, sys +from utils import * +# inputs +sender_paths = [["00100","00110"]] # x,y +#recv_paths = [["00001","00010","00010","00010"]] +recv_paths = [["01011","10000","00001","11010"]] +test_name = "simple_multicast_4_test" + +# constants stimuli = "# is external? | path | data\n" reference = "" -ref_path_count = [96,64,32,0] # N,S,W,E - -def get_index_path(path_x : str, path_y : str): - index_path = NUM_PE-1 - for i in range(len(path_x)): - index_path -= (4**i)*(int(path_x[4-i])*2 + int(path_y[4-i])) - return index_path - -def get_multicast_reference(copy_x, copy_y, recv_path, packet): - x_paths = [] - y_paths = [] - x_poss_paths = [] - y_poss_paths = [] - num_paths = 1 - for bit_pos in range(len(copy_x)): - if copy_x[bit_pos] == "1" and copy_y[bit_pos] == "1": - x_poss_paths.append(["0","0","1","1"]) - y_poss_paths.append(["0","0","1","1"]) - num_paths *= 4 - elif copy_x[bit_pos] == "1": - x_poss_paths.append(["0","1"]) - y_poss_paths.append([recv_path[1][bit_pos],recv_path[1][bit_pos]]) - num_paths *= 2 - elif copy_y[bit_pos] == "1": - x_poss_paths.append([recv_path[0][bit_pos],recv_path[0][bit_pos]]) - y_poss_paths.append(["0","1"]) - num_paths *= 2 - else: - x_poss_paths.append([recv_path[0][bit_pos]]) - y_poss_paths.append([recv_path[1][bit_pos]]) - - division = num_paths - for i in range(len(x_poss_paths)): - k = 0 - division = int(division/len(x_poss_paths[i])) - for j in range(num_paths): - if i == 0: - x_paths.append(x_poss_paths[0][k]) - y_paths.append(y_poss_paths[0][k]) - else: - x_paths[j] += x_poss_paths[i][k] - y_paths[j] += y_poss_paths[i][k] - if ((j+1) % division) == 0: - if k < len(x_poss_paths[0]): - k += 1 - else: - k = 0 - - reference = "" - for x_path, y_path in zip(x_paths, y_paths): - index_path = get_index_path(x_path, y_path) - reference += "0 " + str(index_path) + " " - reference += packet + "\n" - - return reference for p, path in enumerate(sender_paths): data_packet = 1 if len(path) == 2: index_path = get_index_path(path[0], path[1]) stimuli += "0 " + str(index_path) + " " - if len(recv_paths[p]) == 1: - if recv_paths[p][0] == "N": - ex_chip_y = int(CHIP_y,2)-1 - index_path = ref_path_count[0] - ref_path_count[0] = ref_path_count[0]+1 - elif recv_paths[p][0] == "S": - ex_chip_y = int(CHIP_y,2)+1 - index_path = ref_path_count[1] - ref_path_count[1] = ref_path_count[1]+1 - elif recv_paths[p][0] == "W": - ex_chip_x = int(CHIP_X,2)-1 - index_path = ref_path_count[2] - ref_path_count[2] = ref_path_count[2]+1 - else: - ex_chip_x = int(CHIP_X,2)+1 - index_path = ref_path_count[3] - ref_path_count[3] = ref_path_count[3]+1 - packet = HEADER + ex_chip_x + ex_chip_y - packet += NO_COPY*4 - # assign packet - packet += f'{data_packet:030b}' - stimuli += packet + "\n" - # reference - reference += "0 " + str(index_path) + " " - reference += packet + "\n" + data_packet, stimuli, reference = gen_ref_for_direct_msg( + path, recv_paths[p], data_packet, stimuli, reference) elif len(recv_paths[p]) == 2: - packet = HEADER + CHIP_X + CHIP_Y - packet += recv_paths[p][0] + recv_paths[p][1] + NO_COPY*2 - # assign packet - packet += f'{data_packet:030b}' - stimuli += packet + "\n" - # reference - index_path = get_index_path(recv_paths[p][0], recv_paths[p][1]) - reference += "0 " + str(index_path) + " " - reference += packet + "\n" + data_packet, stimuli, reference = gen_ref_for_sing_dir_multicast( + path, recv_paths[p], data_packet, stimuli, reference) else: - list_copy_x = list("00000") - list_copy_y = list("00000") - for j in range(2,len(recv_paths[p]),2): - for i in range(len(recv_paths[p][0])): - if recv_paths[p][0][i] != recv_paths[p][j][i]: - list_copy_x[i]= "1" - if recv_paths[p][1][i] != recv_paths[p][j+1][i]: - list_copy_y[i]= "1" + data_packet, stimuli, reference = gen_ref_for_mult_dir_multicast( + path, recv_paths[p], data_packet, stimuli, reference) - copy_x = ''.join(list_copy_x) - copy_y = ''.join(list_copy_y) - packet = HEADER + CHIP_X + CHIP_Y - packet += recv_paths[p][0] + recv_paths[p][1] + copy_x + copy_y - packet += f'{data_packet:030b}' - # assign packet - stimuli += packet + "\n" - # reference - """for i in range(int(len(recv_paths[p])/2)): - index_path = get_index_path(recv_paths[p][2*i],recv_paths[p][2*i+1]) - reference += "0 " + str(index_path) + " " - reference += packets[i] + "\n" - """ - reference = get_multicast_reference(copy_x, copy_y, recv_paths[p], packet) - - data_packet += 1 with open("stimuli.txt", "w") as f: - f.write(stimuli) + f.write(stimuli) with open("result.ref", "w") as f: - f.write(reference) \ No newline at end of file + f.write(reference) + +shutil.copyfile("stimuli.txt", "../../input/noc_tests/"+test_name+"/stimuli.txt") +shutil.copyfile("stimuli.txt", "/home/juanmanuel/modelsim/stimuli.txt") +shutil.copyfile("result.ref", "../../input/noc_tests/"+test_name+"/result.ref") diff --git a/test/scripts/generate_test_files/result.ref b/test/scripts/generate_test_files/result.ref index c2c6a0d..d339d28 100644 --- a/test/scripts/generate_test_files/result.ref +++ b/test/scripts/generate_test_files/result.ref @@ -1,4 +1,16 @@ -0 1019 0001000000000000001000100001100000000000000000000000000000000001 -0 1017 0001000000000000001000100001100000000000000000000000000000000001 -0 1011 0001000000000000001000100001100000000000000000000000000000000001 -0 1009 0001000000000000001000100001100000000000000000000000000000000001 +0 765 0001000000000001011100000101001010000000000000000000000000000001 +0 761 0001000000000001011100000101001010000000000000000000000000000001 +0 757 0001000000000001011100000101001010000000000000000000000000000001 +0 753 0001000000000001011100000101001010000000000000000000000000000001 +0 701 0001000000000001011100000101001010000000000000000000000000000001 +0 697 0001000000000001011100000101001010000000000000000000000000000001 +0 693 0001000000000001011100000101001010000000000000000000000000000001 +0 689 0001000000000001011100000101001010000000000000000000000000000001 +0 637 0001000000000001011100000101001010000000000000000000000000000001 +0 633 0001000000000001011100000101001010000000000000000000000000000001 +0 629 0001000000000001011100000101001010000000000000000000000000000001 +0 625 0001000000000001011100000101001010000000000000000000000000000001 +0 573 0001000000000001011100000101001010000000000000000000000000000001 +0 569 0001000000000001011100000101001010000000000000000000000000000001 +0 565 0001000000000001011100000101001010000000000000000000000000000001 +0 561 0001000000000001011100000101001010000000000000000000000000000001 diff --git a/test/scripts/generate_test_files/stimuli.txt b/test/scripts/generate_test_files/stimuli.txt index e03d506..aa1d8a8 100644 --- a/test/scripts/generate_test_files/stimuli.txt +++ b/test/scripts/generate_test_files/stimuli.txt @@ -1,2 +1,2 @@ # is external? | path | data -0 971 0001000000000000001000100001100000000000000000000000000000000001 +0 971 0001000000000001011100000101001010000000000000000000000000000001 # origin: (00100-00110) --> dest: (01011-10000,00001-11010) diff --git a/test/scripts/generate_test_files/utils.py b/test/scripts/generate_test_files/utils.py new file mode 100644 index 0000000..6074235 --- /dev/null +++ b/test/scripts/generate_test_files/utils.py @@ -0,0 +1,146 @@ +NUM_PE = 1024 +HEADER = "0001" +CHIP_X = "00000" +CHIP_Y = "00000" +NO_COPY = "00000" +DEF_POS = "00000" +ref_path_count = [96,64,32,0] # N,S,W,E + +def get_index_path(path_x : str, path_y : str): + index_path = NUM_PE-1 + for i in range(len(path_x)): + index_path -= (4**i)*(int(path_x[4-i])*2 + int(path_y[4-i])) + return index_path + +def get_multicast_reference(copy_x, copy_y, recv_path, packet): + x_paths = [] + y_paths = [] + x_poss_paths = [] + y_poss_paths = [] + num_paths = 1 + for bit_pos in range(len(copy_x)): + if copy_x[bit_pos] == "1" and copy_y[bit_pos] == "1": + x_poss_paths.append(["0","0","1","1"]) + y_poss_paths.append(["0","1","0","1"]) + num_paths *= 4 + elif copy_x[bit_pos] == "1": + x_poss_paths.append(["0","1"]) + y_poss_paths.append([recv_path[1][bit_pos],recv_path[1][bit_pos]]) + num_paths *= 2 + elif copy_y[bit_pos] == "1": + x_poss_paths.append([recv_path[0][bit_pos],recv_path[0][bit_pos]]) + y_poss_paths.append(["0","1"]) + num_paths *= 2 + else: + x_poss_paths.append([recv_path[0][bit_pos]]) + y_poss_paths.append([recv_path[1][bit_pos]]) + + division = num_paths + for i in range(len(x_poss_paths)): + x_poss_ind = 0 + y_poss_ind = 0 + division = int(division/len(x_poss_paths[i])) + for j in range(num_paths): + if i == 0: + x_paths.append(x_poss_paths[0][x_poss_ind]) + y_paths.append(y_poss_paths[0][y_poss_ind]) + else: + x_paths[j] += x_poss_paths[i][x_poss_ind] + y_paths[j] += y_poss_paths[i][y_poss_ind] + if ((j+1) % division) == 0: + x_poss_ind = x_poss_ind+1 if x_poss_ind+1 < len(x_poss_paths[i]) \ + else 0 + y_poss_ind = y_poss_ind+1 if y_poss_ind+1 < len(y_poss_paths[i]) \ + else 0 + + reference = "" + for x_path, y_path in zip(x_paths, y_paths): + index_path = get_index_path(x_path, y_path) + reference += "0 " + str(index_path) + " " + reference += packet + "\n" + + return reference + +def get_origin_dest_comment(path, recv_path): + comment = " # origin: (" + path[0] + "-" + path[1] + ")" + comment += " --> dest: (" + for i in range(0, len(recv_path), 2): + comment += recv_path[i] + "-" + recv_path[i+1] + if i+2 < len(recv_path): + comment += "," + comment += ")" + return comment + +def gen_ref_for_direct_msg(path, recv_path, data_packet, stimuli, reference): + if recv_path[0] == "N": + ex_chip_x = DEF_POS + ex_chip_y = int(CHIP_y,2)-1 + index_path = ref_path_count[0] + ref_path_count[0] = ref_path_count[0]+1 + elif recv_path[0] == "S": + ex_chip_x = DEF_POS + ex_chip_y = int(CHIP_y,2)+1 + index_path = ref_path_count[1] + ref_path_count[1] = ref_path_count[1]+1 + elif recv_path[0] == "W": + ex_chip_x = int(CHIP_X,2)-1 + ex_chip_y = DEF_POS + index_path = ref_path_count[2] + ref_path_count[2] = ref_path_count[2]+1 + else: + ex_chip_x = int(CHIP_X,2)+1 + ex_chip_y = DEF_POS + index_path = ref_path_count[3] + ref_path_count[3] = ref_path_count[3]+1 + packet = HEADER + ex_chip_x + ex_chip_y + packet += NO_COPY*4 + # assign packet + packet += f'{data_packet:030b}' + stimuli += packet + get_origin_dest_comment(path, recv_path) + "\n" + # reference + reference += "0 " + str(index_path) + " " + reference += packet + "\n" + + return data_packet, stimuli, reference + + +def gen_ref_for_sing_dir_multicast(path, recv_path, data_packet, stimuli, reference): + packet = HEADER + CHIP_X + CHIP_Y + packet += recv_path[0] + recv_path[1] + NO_COPY*2 + # assign packet + packet += f'{data_packet:030b}' + stimuli += packet + get_origin_dest_comment(path, recv_path) + "\n" + # reference + index_path = get_index_path(recv_path[0], recv_path[1]) + reference += "0 " + str(index_path) + " " + reference += packet + "\n" + + return data_packet, stimuli, reference + + +def gen_ref_for_mult_dir_multicast(path, recv_path, data_packet, stimuli, reference): + list_copy_x = list("00000") + list_copy_y = list("00000") + for j in range(2,len(recv_path),2): + for i in range(len(recv_path[0])): + if recv_path[0][i] != recv_path[j][i]: + list_copy_x[i]= "1" + if recv_path[1][i] != recv_path[j+1][i]: + list_copy_y[i]= "1" + + copy_x = ''.join(list_copy_x) + copy_y = ''.join(list_copy_y) + packet = HEADER + CHIP_X + CHIP_Y + packet += recv_path[0] + recv_path[1] + copy_x + copy_y + packet += f'{data_packet:030b}' + # assign packet + stimuli += packet + get_origin_dest_comment(path, recv_path) + "\n" + # reference + """for i in range(int(len(recv_path)/2)): + index_path = get_index_path(recv_path[2*i],recv_path[2*i+1]) + reference += "0 " + str(index_path) + " " + reference += packets[i] + "\n" + """ + reference = get_multicast_reference(copy_x, copy_y, recv_path, packet) + + return data_packet, stimuli, reference diff --git a/test/scripts/validate_results/result.ref b/test/scripts/validate_results/result.ref index c2c6a0d..d339d28 100644 --- a/test/scripts/validate_results/result.ref +++ b/test/scripts/validate_results/result.ref @@ -1,4 +1,16 @@ -0 1019 0001000000000000001000100001100000000000000000000000000000000001 -0 1017 0001000000000000001000100001100000000000000000000000000000000001 -0 1011 0001000000000000001000100001100000000000000000000000000000000001 -0 1009 0001000000000000001000100001100000000000000000000000000000000001 +0 765 0001000000000001011100000101001010000000000000000000000000000001 +0 761 0001000000000001011100000101001010000000000000000000000000000001 +0 757 0001000000000001011100000101001010000000000000000000000000000001 +0 753 0001000000000001011100000101001010000000000000000000000000000001 +0 701 0001000000000001011100000101001010000000000000000000000000000001 +0 697 0001000000000001011100000101001010000000000000000000000000000001 +0 693 0001000000000001011100000101001010000000000000000000000000000001 +0 689 0001000000000001011100000101001010000000000000000000000000000001 +0 637 0001000000000001011100000101001010000000000000000000000000000001 +0 633 0001000000000001011100000101001010000000000000000000000000000001 +0 629 0001000000000001011100000101001010000000000000000000000000000001 +0 625 0001000000000001011100000101001010000000000000000000000000000001 +0 573 0001000000000001011100000101001010000000000000000000000000000001 +0 569 0001000000000001011100000101001010000000000000000000000000000001 +0 565 0001000000000001011100000101001010000000000000000000000000000001 +0 561 0001000000000001011100000101001010000000000000000000000000000001 diff --git a/test/scripts/validate_results/simulation.log b/test/scripts/validate_results/simulation.log index c9b6a45..351a0df 100644 --- a/test/scripts/validate_results/simulation.log +++ b/test/scripts/validate_results/simulation.log @@ -1,4 +1,16 @@ -0 1009 0001000000000000001000100001100000000000000000000000000000000001 -0 1011 0001000000000000001000100001100000000000000000000000000000000001 -0 1017 0001000000000000001000100001100000000000000000000000000000000001 -0 1019 0001000000000000001000100001100000000000000000000000000000000001 +0 561 0001000000000001011100000101001010000000000000000000000000000001 +0 565 0001000000000001011100000101001010000000000000000000000000000001 +0 569 0001000000000001011100000101001010000000000000000000000000000001 +0 573 0001000000000001011100000101001010000000000000000000000000000001 +0 625 0001000000000001011100000101001010000000000000000000000000000001 +0 629 0001000000000001011100000101001010000000000000000000000000000001 +0 633 0001000000000001011100000101001010000000000000000000000000000001 +0 637 0001000000000001011100000101001010000000000000000000000000000001 +0 689 0001000000000001011100000101001010000000000000000000000000000001 +0 693 0001000000000001011100000101001010000000000000000000000000000001 +0 697 0001000000000001011100000101001010000000000000000000000000000001 +0 701 0001000000000001011100000101001010000000000000000000000000000001 +0 753 0001000000000001011100000101001010000000000000000000000000000001 +0 757 0001000000000001011100000101001010000000000000000000000000000001 +0 761 0001000000000001011100000101001010000000000000000000000000000001 +0 765 0001000000000001011100000101001010000000000000000000000000000001 diff --git a/test/scripts/validate_results/test.log b/test/scripts/validate_results/test.log index 7176fa7..60d88a7 100644 --- a/test/scripts/validate_results/test.log +++ b/test/scripts/validate_results/test.log @@ -1,8 +1,32 @@ -0 1009 0001000000000000001000100001100000000000000000000000000000000001 +0 561 0001000000000001011100000101001010000000000000000000000000000001 ---> passed! -0 1011 0001000000000000001000100001100000000000000000000000000000000001 +0 565 0001000000000001011100000101001010000000000000000000000000000001 ---> passed! -0 1017 0001000000000000001000100001100000000000000000000000000000000001 +0 569 0001000000000001011100000101001010000000000000000000000000000001 ---> passed! -0 1019 0001000000000000001000100001100000000000000000000000000000000001 +0 573 0001000000000001011100000101001010000000000000000000000000000001 +---> passed! +0 625 0001000000000001011100000101001010000000000000000000000000000001 +---> passed! +0 629 0001000000000001011100000101001010000000000000000000000000000001 +---> passed! +0 633 0001000000000001011100000101001010000000000000000000000000000001 +---> passed! +0 637 0001000000000001011100000101001010000000000000000000000000000001 +---> passed! +0 689 0001000000000001011100000101001010000000000000000000000000000001 +---> passed! +0 693 0001000000000001011100000101001010000000000000000000000000000001 +---> passed! +0 697 0001000000000001011100000101001010000000000000000000000000000001 +---> passed! +0 701 0001000000000001011100000101001010000000000000000000000000000001 +---> passed! +0 753 0001000000000001011100000101001010000000000000000000000000000001 +---> passed! +0 757 0001000000000001011100000101001010000000000000000000000000000001 +---> passed! +0 761 0001000000000001011100000101001010000000000000000000000000000001 +---> passed! +0 765 0001000000000001011100000101001010000000000000000000000000000001 ---> passed! diff --git a/test/scripts/validate_results/validate_results.py b/test/scripts/validate_results/validate_results.py index dd5bb5f..27edeef 100644 --- a/test/scripts/validate_results/validate_results.py +++ b/test/scripts/validate_results/validate_results.py @@ -1,14 +1,22 @@ +import shutil, sys + +test_name = "" +if not len(sys.argv) < 1: + test_name = sys.argv[1] + +if test_name != "": + shutil.copyfile("../../input/noc_tests/"+test_name+"/result.ref", "result.ref") + shutil.copyfile("/home/juanmanuel/modelsim/simulation.log", "simulation.log") + reference = [] with open("result.ref", "r") as f: for line in f: reference.append(line) -print(reference) results = [] with open("simulation.log", "r") as f: for line in f: results.append(line) -print(results) test_logs = [] for result in results: @@ -19,4 +27,7 @@ for result in results: with open("test.log", "w") as f: for test_log in test_logs: - f.write(test_log+"\n") \ No newline at end of file + f.write(test_log+"\n") + +if test_name != "": + shutil.copyfile("test.log", "../../input/noc_tests/"+test_name+"/test.log") From d9fafc743755c9f86df9ddd060f235979c74e3e5 Mon Sep 17 00:00:00 2001 From: Retrocamara42 Date: Thu, 12 Jun 2025 10:19:39 -0500 Subject: [PATCH 3/3] feat: random test added, issues fixed with scripts, noc_tb send acks when req is received --- Readme.md | 4 +- .../noc_tests/random_pe_to_pe_test/result.ref | 260 +++++++++++++++++ .../random_pe_to_pe_test/simulation.log | 65 +++++ .../random_pe_to_pe_test/stimuli.txt | 3 + .../noc_tests/random_pe_to_pe_test/test.log | 130 +++++++++ test/noc_tb.vhdl | 10 +- .../generate_test_files.py | 13 +- test/scripts/generate_test_files/result.ref | 276 +++++++++++++++++- test/scripts/generate_test_files/stimuli.txt | 3 +- test/scripts/generate_test_files/utils.py | 31 +- test/scripts/validate_results/result.ref | 81 ++++- test/scripts/validate_results/simulation.log | 81 ++++- test/scripts/validate_results/test.log | 130 ++++++++- .../validate_results/validate_results.py | 3 +- 14 files changed, 1009 insertions(+), 81 deletions(-) create mode 100644 test/input/noc_tests/random_pe_to_pe_test/result.ref create mode 100644 test/input/noc_tests/random_pe_to_pe_test/simulation.log create mode 100644 test/input/noc_tests/random_pe_to_pe_test/stimuli.txt create mode 100644 test/input/noc_tests/random_pe_to_pe_test/test.log diff --git a/Readme.md b/Readme.md index 07d6320..6fc7d88 100644 --- a/Readme.md +++ b/Readme.md @@ -38,5 +38,5 @@ FIFO5 -> U -> Upstream ### Router ![alt text](./drawings/router.png) --- TODO: Test multicast x,y,4, test multiple data points --- TODO: read arrived data so that it doesn't stay in the buffer \ No newline at end of file +# TODO: delete line where header is compared to 1 +# TODO: do throttle (many same data points) testw \ No newline at end of file diff --git a/test/input/noc_tests/random_pe_to_pe_test/result.ref b/test/input/noc_tests/random_pe_to_pe_test/result.ref new file mode 100644 index 0000000..bd889b2 --- /dev/null +++ b/test/input/noc_tests/random_pe_to_pe_test/result.ref @@ -0,0 +1,260 @@ +0 899 0001000000000001110111100100010000000000000000000000000000000001 +0 771 0001000000000001110111100100010000000000000000000000000000000001 +0 643 0001000000000001110111100100010000000000000000000000000000000001 +0 515 0001000000000001110111100100010000000000000000000000000000000001 +0 991 0001000000000010100010111100111111000000000000000000000000000001 +0 990 0001000000000010100010111100111111000000000000000000000000000001 +0 989 0001000000000010100010111100111111000000000000000000000000000001 +0 988 0001000000000010100010111100111111000000000000000000000000000001 +0 987 0001000000000010100010111100111111000000000000000000000000000001 +0 986 0001000000000010100010111100111111000000000000000000000000000001 +0 985 0001000000000010100010111100111111000000000000000000000000000001 +0 984 0001000000000010100010111100111111000000000000000000000000000001 +0 975 0001000000000010100010111100111111000000000000000000000000000001 +0 974 0001000000000010100010111100111111000000000000000000000000000001 +0 973 0001000000000010100010111100111111000000000000000000000000000001 +0 972 0001000000000010100010111100111111000000000000000000000000000001 +0 971 0001000000000010100010111100111111000000000000000000000000000001 +0 970 0001000000000010100010111100111111000000000000000000000000000001 +0 969 0001000000000010100010111100111111000000000000000000000000000001 +0 968 0001000000000010100010111100111111000000000000000000000000000001 +0 927 0001000000000010100010111100111111000000000000000000000000000001 +0 926 0001000000000010100010111100111111000000000000000000000000000001 +0 925 0001000000000010100010111100111111000000000000000000000000000001 +0 924 0001000000000010100010111100111111000000000000000000000000000001 +0 923 0001000000000010100010111100111111000000000000000000000000000001 +0 922 0001000000000010100010111100111111000000000000000000000000000001 +0 921 0001000000000010100010111100111111000000000000000000000000000001 +0 920 0001000000000010100010111100111111000000000000000000000000000001 +0 911 0001000000000010100010111100111111000000000000000000000000000001 +0 910 0001000000000010100010111100111111000000000000000000000000000001 +0 909 0001000000000010100010111100111111000000000000000000000000000001 +0 908 0001000000000010100010111100111111000000000000000000000000000001 +0 907 0001000000000010100010111100111111000000000000000000000000000001 +0 906 0001000000000010100010111100111111000000000000000000000000000001 +0 905 0001000000000010100010111100111111000000000000000000000000000001 +0 904 0001000000000010100010111100111111000000000000000000000000000001 +0 863 0001000000000010100010111100111111000000000000000000000000000001 +0 862 0001000000000010100010111100111111000000000000000000000000000001 +0 861 0001000000000010100010111100111111000000000000000000000000000001 +0 860 0001000000000010100010111100111111000000000000000000000000000001 +0 859 0001000000000010100010111100111111000000000000000000000000000001 +0 858 0001000000000010100010111100111111000000000000000000000000000001 +0 857 0001000000000010100010111100111111000000000000000000000000000001 +0 856 0001000000000010100010111100111111000000000000000000000000000001 +0 847 0001000000000010100010111100111111000000000000000000000000000001 +0 846 0001000000000010100010111100111111000000000000000000000000000001 +0 845 0001000000000010100010111100111111000000000000000000000000000001 +0 844 0001000000000010100010111100111111000000000000000000000000000001 +0 843 0001000000000010100010111100111111000000000000000000000000000001 +0 842 0001000000000010100010111100111111000000000000000000000000000001 +0 841 0001000000000010100010111100111111000000000000000000000000000001 +0 840 0001000000000010100010111100111111000000000000000000000000000001 +0 799 0001000000000010100010111100111111000000000000000000000000000001 +0 798 0001000000000010100010111100111111000000000000000000000000000001 +0 797 0001000000000010100010111100111111000000000000000000000000000001 +0 796 0001000000000010100010111100111111000000000000000000000000000001 +0 795 0001000000000010100010111100111111000000000000000000000000000001 +0 794 0001000000000010100010111100111111000000000000000000000000000001 +0 793 0001000000000010100010111100111111000000000000000000000000000001 +0 792 0001000000000010100010111100111111000000000000000000000000000001 +0 783 0001000000000010100010111100111111000000000000000000000000000001 +0 782 0001000000000010100010111100111111000000000000000000000000000001 +0 781 0001000000000010100010111100111111000000000000000000000000000001 +0 780 0001000000000010100010111100111111000000000000000000000000000001 +0 779 0001000000000010100010111100111111000000000000000000000000000001 +0 778 0001000000000010100010111100111111000000000000000000000000000001 +0 777 0001000000000010100010111100111111000000000000000000000000000001 +0 776 0001000000000010100010111100111111000000000000000000000000000001 +0 735 0001000000000010100010111100111111000000000000000000000000000001 +0 734 0001000000000010100010111100111111000000000000000000000000000001 +0 733 0001000000000010100010111100111111000000000000000000000000000001 +0 732 0001000000000010100010111100111111000000000000000000000000000001 +0 731 0001000000000010100010111100111111000000000000000000000000000001 +0 730 0001000000000010100010111100111111000000000000000000000000000001 +0 729 0001000000000010100010111100111111000000000000000000000000000001 +0 728 0001000000000010100010111100111111000000000000000000000000000001 +0 719 0001000000000010100010111100111111000000000000000000000000000001 +0 718 0001000000000010100010111100111111000000000000000000000000000001 +0 717 0001000000000010100010111100111111000000000000000000000000000001 +0 716 0001000000000010100010111100111111000000000000000000000000000001 +0 715 0001000000000010100010111100111111000000000000000000000000000001 +0 714 0001000000000010100010111100111111000000000000000000000000000001 +0 713 0001000000000010100010111100111111000000000000000000000000000001 +0 712 0001000000000010100010111100111111000000000000000000000000000001 +0 671 0001000000000010100010111100111111000000000000000000000000000001 +0 670 0001000000000010100010111100111111000000000000000000000000000001 +0 669 0001000000000010100010111100111111000000000000000000000000000001 +0 668 0001000000000010100010111100111111000000000000000000000000000001 +0 667 0001000000000010100010111100111111000000000000000000000000000001 +0 666 0001000000000010100010111100111111000000000000000000000000000001 +0 665 0001000000000010100010111100111111000000000000000000000000000001 +0 664 0001000000000010100010111100111111000000000000000000000000000001 +0 655 0001000000000010100010111100111111000000000000000000000000000001 +0 654 0001000000000010100010111100111111000000000000000000000000000001 +0 653 0001000000000010100010111100111111000000000000000000000000000001 +0 652 0001000000000010100010111100111111000000000000000000000000000001 +0 651 0001000000000010100010111100111111000000000000000000000000000001 +0 650 0001000000000010100010111100111111000000000000000000000000000001 +0 649 0001000000000010100010111100111111000000000000000000000000000001 +0 648 0001000000000010100010111100111111000000000000000000000000000001 +0 607 0001000000000010100010111100111111000000000000000000000000000001 +0 606 0001000000000010100010111100111111000000000000000000000000000001 +0 605 0001000000000010100010111100111111000000000000000000000000000001 +0 604 0001000000000010100010111100111111000000000000000000000000000001 +0 603 0001000000000010100010111100111111000000000000000000000000000001 +0 602 0001000000000010100010111100111111000000000000000000000000000001 +0 601 0001000000000010100010111100111111000000000000000000000000000001 +0 600 0001000000000010100010111100111111000000000000000000000000000001 +0 591 0001000000000010100010111100111111000000000000000000000000000001 +0 590 0001000000000010100010111100111111000000000000000000000000000001 +0 589 0001000000000010100010111100111111000000000000000000000000000001 +0 588 0001000000000010100010111100111111000000000000000000000000000001 +0 587 0001000000000010100010111100111111000000000000000000000000000001 +0 586 0001000000000010100010111100111111000000000000000000000000000001 +0 585 0001000000000010100010111100111111000000000000000000000000000001 +0 584 0001000000000010100010111100111111000000000000000000000000000001 +0 543 0001000000000010100010111100111111000000000000000000000000000001 +0 542 0001000000000010100010111100111111000000000000000000000000000001 +0 541 0001000000000010100010111100111111000000000000000000000000000001 +0 540 0001000000000010100010111100111111000000000000000000000000000001 +0 539 0001000000000010100010111100111111000000000000000000000000000001 +0 538 0001000000000010100010111100111111000000000000000000000000000001 +0 537 0001000000000010100010111100111111000000000000000000000000000001 +0 536 0001000000000010100010111100111111000000000000000000000000000001 +0 527 0001000000000010100010111100111111000000000000000000000000000001 +0 526 0001000000000010100010111100111111000000000000000000000000000001 +0 525 0001000000000010100010111100111111000000000000000000000000000001 +0 524 0001000000000010100010111100111111000000000000000000000000000001 +0 523 0001000000000010100010111100111111000000000000000000000000000001 +0 522 0001000000000010100010111100111111000000000000000000000000000001 +0 521 0001000000000010100010111100111111000000000000000000000000000001 +0 520 0001000000000010100010111100111111000000000000000000000000000001 +0 479 0001000000000010100010111100111111000000000000000000000000000001 +0 478 0001000000000010100010111100111111000000000000000000000000000001 +0 477 0001000000000010100010111100111111000000000000000000000000000001 +0 476 0001000000000010100010111100111111000000000000000000000000000001 +0 475 0001000000000010100010111100111111000000000000000000000000000001 +0 474 0001000000000010100010111100111111000000000000000000000000000001 +0 473 0001000000000010100010111100111111000000000000000000000000000001 +0 472 0001000000000010100010111100111111000000000000000000000000000001 +0 463 0001000000000010100010111100111111000000000000000000000000000001 +0 462 0001000000000010100010111100111111000000000000000000000000000001 +0 461 0001000000000010100010111100111111000000000000000000000000000001 +0 460 0001000000000010100010111100111111000000000000000000000000000001 +0 459 0001000000000010100010111100111111000000000000000000000000000001 +0 458 0001000000000010100010111100111111000000000000000000000000000001 +0 457 0001000000000010100010111100111111000000000000000000000000000001 +0 456 0001000000000010100010111100111111000000000000000000000000000001 +0 415 0001000000000010100010111100111111000000000000000000000000000001 +0 414 0001000000000010100010111100111111000000000000000000000000000001 +0 413 0001000000000010100010111100111111000000000000000000000000000001 +0 412 0001000000000010100010111100111111000000000000000000000000000001 +0 411 0001000000000010100010111100111111000000000000000000000000000001 +0 410 0001000000000010100010111100111111000000000000000000000000000001 +0 409 0001000000000010100010111100111111000000000000000000000000000001 +0 408 0001000000000010100010111100111111000000000000000000000000000001 +0 399 0001000000000010100010111100111111000000000000000000000000000001 +0 398 0001000000000010100010111100111111000000000000000000000000000001 +0 397 0001000000000010100010111100111111000000000000000000000000000001 +0 396 0001000000000010100010111100111111000000000000000000000000000001 +0 395 0001000000000010100010111100111111000000000000000000000000000001 +0 394 0001000000000010100010111100111111000000000000000000000000000001 +0 393 0001000000000010100010111100111111000000000000000000000000000001 +0 392 0001000000000010100010111100111111000000000000000000000000000001 +0 351 0001000000000010100010111100111111000000000000000000000000000001 +0 350 0001000000000010100010111100111111000000000000000000000000000001 +0 349 0001000000000010100010111100111111000000000000000000000000000001 +0 348 0001000000000010100010111100111111000000000000000000000000000001 +0 347 0001000000000010100010111100111111000000000000000000000000000001 +0 346 0001000000000010100010111100111111000000000000000000000000000001 +0 345 0001000000000010100010111100111111000000000000000000000000000001 +0 344 0001000000000010100010111100111111000000000000000000000000000001 +0 335 0001000000000010100010111100111111000000000000000000000000000001 +0 334 0001000000000010100010111100111111000000000000000000000000000001 +0 333 0001000000000010100010111100111111000000000000000000000000000001 +0 332 0001000000000010100010111100111111000000000000000000000000000001 +0 331 0001000000000010100010111100111111000000000000000000000000000001 +0 330 0001000000000010100010111100111111000000000000000000000000000001 +0 329 0001000000000010100010111100111111000000000000000000000000000001 +0 328 0001000000000010100010111100111111000000000000000000000000000001 +0 287 0001000000000010100010111100111111000000000000000000000000000001 +0 286 0001000000000010100010111100111111000000000000000000000000000001 +0 285 0001000000000010100010111100111111000000000000000000000000000001 +0 284 0001000000000010100010111100111111000000000000000000000000000001 +0 283 0001000000000010100010111100111111000000000000000000000000000001 +0 282 0001000000000010100010111100111111000000000000000000000000000001 +0 281 0001000000000010100010111100111111000000000000000000000000000001 +0 280 0001000000000010100010111100111111000000000000000000000000000001 +0 271 0001000000000010100010111100111111000000000000000000000000000001 +0 270 0001000000000010100010111100111111000000000000000000000000000001 +0 269 0001000000000010100010111100111111000000000000000000000000000001 +0 268 0001000000000010100010111100111111000000000000000000000000000001 +0 267 0001000000000010100010111100111111000000000000000000000000000001 +0 266 0001000000000010100010111100111111000000000000000000000000000001 +0 265 0001000000000010100010111100111111000000000000000000000000000001 +0 264 0001000000000010100010111100111111000000000000000000000000000001 +0 223 0001000000000010100010111100111111000000000000000000000000000001 +0 222 0001000000000010100010111100111111000000000000000000000000000001 +0 221 0001000000000010100010111100111111000000000000000000000000000001 +0 220 0001000000000010100010111100111111000000000000000000000000000001 +0 219 0001000000000010100010111100111111000000000000000000000000000001 +0 218 0001000000000010100010111100111111000000000000000000000000000001 +0 217 0001000000000010100010111100111111000000000000000000000000000001 +0 216 0001000000000010100010111100111111000000000000000000000000000001 +0 207 0001000000000010100010111100111111000000000000000000000000000001 +0 206 0001000000000010100010111100111111000000000000000000000000000001 +0 205 0001000000000010100010111100111111000000000000000000000000000001 +0 204 0001000000000010100010111100111111000000000000000000000000000001 +0 203 0001000000000010100010111100111111000000000000000000000000000001 +0 202 0001000000000010100010111100111111000000000000000000000000000001 +0 201 0001000000000010100010111100111111000000000000000000000000000001 +0 200 0001000000000010100010111100111111000000000000000000000000000001 +0 159 0001000000000010100010111100111111000000000000000000000000000001 +0 158 0001000000000010100010111100111111000000000000000000000000000001 +0 157 0001000000000010100010111100111111000000000000000000000000000001 +0 156 0001000000000010100010111100111111000000000000000000000000000001 +0 155 0001000000000010100010111100111111000000000000000000000000000001 +0 154 0001000000000010100010111100111111000000000000000000000000000001 +0 153 0001000000000010100010111100111111000000000000000000000000000001 +0 152 0001000000000010100010111100111111000000000000000000000000000001 +0 143 0001000000000010100010111100111111000000000000000000000000000001 +0 142 0001000000000010100010111100111111000000000000000000000000000001 +0 141 0001000000000010100010111100111111000000000000000000000000000001 +0 140 0001000000000010100010111100111111000000000000000000000000000001 +0 139 0001000000000010100010111100111111000000000000000000000000000001 +0 138 0001000000000010100010111100111111000000000000000000000000000001 +0 137 0001000000000010100010111100111111000000000000000000000000000001 +0 136 0001000000000010100010111100111111000000000000000000000000000001 +0 95 0001000000000010100010111100111111000000000000000000000000000001 +0 94 0001000000000010100010111100111111000000000000000000000000000001 +0 93 0001000000000010100010111100111111000000000000000000000000000001 +0 92 0001000000000010100010111100111111000000000000000000000000000001 +0 91 0001000000000010100010111100111111000000000000000000000000000001 +0 90 0001000000000010100010111100111111000000000000000000000000000001 +0 89 0001000000000010100010111100111111000000000000000000000000000001 +0 88 0001000000000010100010111100111111000000000000000000000000000001 +0 79 0001000000000010100010111100111111000000000000000000000000000001 +0 78 0001000000000010100010111100111111000000000000000000000000000001 +0 77 0001000000000010100010111100111111000000000000000000000000000001 +0 76 0001000000000010100010111100111111000000000000000000000000000001 +0 75 0001000000000010100010111100111111000000000000000000000000000001 +0 74 0001000000000010100010111100111111000000000000000000000000000001 +0 73 0001000000000010100010111100111111000000000000000000000000000001 +0 72 0001000000000010100010111100111111000000000000000000000000000001 +0 31 0001000000000010100010111100111111000000000000000000000000000001 +0 30 0001000000000010100010111100111111000000000000000000000000000001 +0 29 0001000000000010100010111100111111000000000000000000000000000001 +0 28 0001000000000010100010111100111111000000000000000000000000000001 +0 27 0001000000000010100010111100111111000000000000000000000000000001 +0 26 0001000000000010100010111100111111000000000000000000000000000001 +0 25 0001000000000010100010111100111111000000000000000000000000000001 +0 24 0001000000000010100010111100111111000000000000000000000000000001 +0 15 0001000000000010100010111100111111000000000000000000000000000001 +0 14 0001000000000010100010111100111111000000000000000000000000000001 +0 13 0001000000000010100010111100111111000000000000000000000000000001 +0 12 0001000000000010100010111100111111000000000000000000000000000001 +0 11 0001000000000010100010111100111111000000000000000000000000000001 +0 10 0001000000000010100010111100111111000000000000000000000000000001 +0 9 0001000000000010100010111100111111000000000000000000000000000001 +0 8 0001000000000010100010111100111111000000000000000000000000000001 diff --git a/test/input/noc_tests/random_pe_to_pe_test/simulation.log b/test/input/noc_tests/random_pe_to_pe_test/simulation.log new file mode 100644 index 0000000..e69fb58 --- /dev/null +++ b/test/input/noc_tests/random_pe_to_pe_test/simulation.log @@ -0,0 +1,65 @@ +0 221 0001000000000010101100000000000000000000000000000000000000000001 +0 145 0001000000000010100110001011110010000000000000000000000000000001 +0 147 0001000000000010100110001011110010000000000000000000000000000001 +0 149 0001000000000010100110001011110010000000000000000000000000000001 +0 151 0001000000000010100110001011110010000000000000000000000000000001 +0 153 0001000000000010100110001011110010000000000000000000000000000001 +0 155 0001000000000010100110001011110010000000000000000000000000000001 +0 157 0001000000000010100110001011110010000000000000000000000000000001 +0 159 0001000000000010100110001011110010000000000000000000000000000001 +0 177 0001000000000010100110001011110010000000000000000000000000000001 +0 179 0001000000000010100110001011110010000000000000000000000000000001 +0 181 0001000000000010100110001011110010000000000000000000000000000001 +0 183 0001000000000010100110001011110010000000000000000000000000000001 +0 185 0001000000000010100110001011110010000000000000000000000000000001 +0 187 0001000000000010100110001011110010000000000000000000000000000001 +0 189 0001000000000010100110001011110010000000000000000000000000000001 +0 191 0001000000000010100110001011110010000000000000000000000000000001 +0 401 0001000000000010100110001011110010000000000000000000000000000001 +0 403 0001000000000010100110001011110010000000000000000000000000000001 +0 405 0001000000000010100110001011110010000000000000000000000000000001 +0 407 0001000000000010100110001011110010000000000000000000000000000001 +0 409 0001000000000010100110001011110010000000000000000000000000000001 +0 411 0001000000000010100110001011110010000000000000000000000000000001 +0 413 0001000000000010100110001011110010000000000000000000000000000001 +0 415 0001000000000010100110001011110010000000000000000000000000000001 +0 433 0001000000000010100110001011110010000000000000000000000000000001 +0 435 0001000000000010100110001011110010000000000000000000000000000001 +0 437 0001000000000010100110001011110010000000000000000000000000000001 +0 439 0001000000000010100110001011110010000000000000000000000000000001 +0 441 0001000000000010100110001011110010000000000000000000000000000001 +0 443 0001000000000010100110001011110010000000000000000000000000000001 +0 445 0001000000000010100110001011110010000000000000000000000000000001 +0 447 0001000000000010100110001011110010000000000000000000000000000001 +0 657 0001000000000010100110001011110010000000000000000000000000000001 +0 659 0001000000000010100110001011110010000000000000000000000000000001 +0 661 0001000000000010100110001011110010000000000000000000000000000001 +0 663 0001000000000010100110001011110010000000000000000000000000000001 +0 665 0001000000000010100110001011110010000000000000000000000000000001 +0 667 0001000000000010100110001011110010000000000000000000000000000001 +0 669 0001000000000010100110001011110010000000000000000000000000000001 +0 671 0001000000000010100110001011110010000000000000000000000000000001 +0 689 0001000000000010100110001011110010000000000000000000000000000001 +0 691 0001000000000010100110001011110010000000000000000000000000000001 +0 693 0001000000000010100110001011110010000000000000000000000000000001 +0 695 0001000000000010100110001011110010000000000000000000000000000001 +0 697 0001000000000010100110001011110010000000000000000000000000000001 +0 699 0001000000000010100110001011110010000000000000000000000000000001 +0 701 0001000000000010100110001011110010000000000000000000000000000001 +0 703 0001000000000010100110001011110010000000000000000000000000000001 +0 913 0001000000000010100110001011110010000000000000000000000000000001 +0 915 0001000000000010100110001011110010000000000000000000000000000001 +0 917 0001000000000010100110001011110010000000000000000000000000000001 +0 919 0001000000000010100110001011110010000000000000000000000000000001 +0 921 0001000000000010100110001011110010000000000000000000000000000001 +0 923 0001000000000010100110001011110010000000000000000000000000000001 +0 925 0001000000000010100110001011110010000000000000000000000000000001 +0 927 0001000000000010100110001011110010000000000000000000000000000001 +0 945 0001000000000010100110001011110010000000000000000000000000000001 +0 947 0001000000000010100110001011110010000000000000000000000000000001 +0 949 0001000000000010100110001011110010000000000000000000000000000001 +0 951 0001000000000010100110001011110010000000000000000000000000000001 +0 953 0001000000000010100110001011110010000000000000000000000000000001 +0 955 0001000000000010100110001011110010000000000000000000000000000001 +0 957 0001000000000010100110001011110010000000000000000000000000000001 +0 959 0001000000000010100110001011110010000000000000000000000000000001 diff --git a/test/input/noc_tests/random_pe_to_pe_test/stimuli.txt b/test/input/noc_tests/random_pe_to_pe_test/stimuli.txt new file mode 100644 index 0000000..03f644a --- /dev/null +++ b/test/input/noc_tests/random_pe_to_pe_test/stimuli.txt @@ -0,0 +1,3 @@ +# is external? | path | data +0 272 0001000000000001110111100100010000000000000000000000000000000001 # origin: (11111-01011) --> dest: (01110-11110,00110-01110) +0 863 0001000000000010100010111100111111000000000000000000000000000001 # origin: (01100-00000) --> dest: (10100-01011,00101-00000,10101-00001,11101-10111) diff --git a/test/input/noc_tests/random_pe_to_pe_test/test.log b/test/input/noc_tests/random_pe_to_pe_test/test.log new file mode 100644 index 0000000..c7e4d30 --- /dev/null +++ b/test/input/noc_tests/random_pe_to_pe_test/test.log @@ -0,0 +1,130 @@ +0 221 0001000000000010101100000000000000000000000000000000000000000001 +---> passed! +0 145 0001000000000010100110001011110010000000000000000000000000000001 +---> passed! +0 147 0001000000000010100110001011110010000000000000000000000000000001 +---> passed! +0 149 0001000000000010100110001011110010000000000000000000000000000001 +---> passed! +0 151 0001000000000010100110001011110010000000000000000000000000000001 +---> passed! +0 153 0001000000000010100110001011110010000000000000000000000000000001 +---> passed! +0 155 0001000000000010100110001011110010000000000000000000000000000001 +---> passed! +0 157 0001000000000010100110001011110010000000000000000000000000000001 +---> passed! +0 159 0001000000000010100110001011110010000000000000000000000000000001 +---> passed! +0 177 0001000000000010100110001011110010000000000000000000000000000001 +---> passed! +0 179 0001000000000010100110001011110010000000000000000000000000000001 +---> passed! +0 181 0001000000000010100110001011110010000000000000000000000000000001 +---> passed! +0 183 0001000000000010100110001011110010000000000000000000000000000001 +---> passed! +0 185 0001000000000010100110001011110010000000000000000000000000000001 +---> passed! +0 187 0001000000000010100110001011110010000000000000000000000000000001 +---> passed! +0 189 0001000000000010100110001011110010000000000000000000000000000001 +---> passed! +0 191 0001000000000010100110001011110010000000000000000000000000000001 +---> passed! +0 401 0001000000000010100110001011110010000000000000000000000000000001 +---> passed! +0 403 0001000000000010100110001011110010000000000000000000000000000001 +---> passed! +0 405 0001000000000010100110001011110010000000000000000000000000000001 +---> passed! +0 407 0001000000000010100110001011110010000000000000000000000000000001 +---> passed! +0 409 0001000000000010100110001011110010000000000000000000000000000001 +---> passed! +0 411 0001000000000010100110001011110010000000000000000000000000000001 +---> passed! +0 413 0001000000000010100110001011110010000000000000000000000000000001 +---> passed! +0 415 0001000000000010100110001011110010000000000000000000000000000001 +---> passed! +0 433 0001000000000010100110001011110010000000000000000000000000000001 +---> passed! +0 435 0001000000000010100110001011110010000000000000000000000000000001 +---> passed! +0 437 0001000000000010100110001011110010000000000000000000000000000001 +---> passed! +0 439 0001000000000010100110001011110010000000000000000000000000000001 +---> passed! +0 441 0001000000000010100110001011110010000000000000000000000000000001 +---> passed! +0 443 0001000000000010100110001011110010000000000000000000000000000001 +---> passed! +0 445 0001000000000010100110001011110010000000000000000000000000000001 +---> passed! +0 447 0001000000000010100110001011110010000000000000000000000000000001 +---> passed! +0 657 0001000000000010100110001011110010000000000000000000000000000001 +---> passed! +0 659 0001000000000010100110001011110010000000000000000000000000000001 +---> passed! +0 661 0001000000000010100110001011110010000000000000000000000000000001 +---> passed! +0 663 0001000000000010100110001011110010000000000000000000000000000001 +---> passed! +0 665 0001000000000010100110001011110010000000000000000000000000000001 +---> passed! +0 667 0001000000000010100110001011110010000000000000000000000000000001 +---> passed! +0 669 0001000000000010100110001011110010000000000000000000000000000001 +---> passed! +0 671 0001000000000010100110001011110010000000000000000000000000000001 +---> passed! +0 689 0001000000000010100110001011110010000000000000000000000000000001 +---> passed! +0 691 0001000000000010100110001011110010000000000000000000000000000001 +---> passed! +0 693 0001000000000010100110001011110010000000000000000000000000000001 +---> passed! +0 695 0001000000000010100110001011110010000000000000000000000000000001 +---> passed! +0 697 0001000000000010100110001011110010000000000000000000000000000001 +---> passed! +0 699 0001000000000010100110001011110010000000000000000000000000000001 +---> passed! +0 701 0001000000000010100110001011110010000000000000000000000000000001 +---> passed! +0 703 0001000000000010100110001011110010000000000000000000000000000001 +---> passed! +0 913 0001000000000010100110001011110010000000000000000000000000000001 +---> passed! +0 915 0001000000000010100110001011110010000000000000000000000000000001 +---> passed! +0 917 0001000000000010100110001011110010000000000000000000000000000001 +---> passed! +0 919 0001000000000010100110001011110010000000000000000000000000000001 +---> passed! +0 921 0001000000000010100110001011110010000000000000000000000000000001 +---> passed! +0 923 0001000000000010100110001011110010000000000000000000000000000001 +---> passed! +0 925 0001000000000010100110001011110010000000000000000000000000000001 +---> passed! +0 927 0001000000000010100110001011110010000000000000000000000000000001 +---> passed! +0 945 0001000000000010100110001011110010000000000000000000000000000001 +---> passed! +0 947 0001000000000010100110001011110010000000000000000000000000000001 +---> passed! +0 949 0001000000000010100110001011110010000000000000000000000000000001 +---> passed! +0 951 0001000000000010100110001011110010000000000000000000000000000001 +---> passed! +0 953 0001000000000010100110001011110010000000000000000000000000000001 +---> passed! +0 955 0001000000000010100110001011110010000000000000000000000000000001 +---> passed! +0 957 0001000000000010100110001011110010000000000000000000000000000001 +---> passed! +0 959 0001000000000010100110001011110010000000000000000000000000000001 +---> passed! diff --git a/test/noc_tb.vhdl b/test/noc_tb.vhdl index a24179b..e6973fc 100644 --- a/test/noc_tb.vhdl +++ b/test/noc_tb.vhdl @@ -153,12 +153,8 @@ begin save_results: process(c_send_reqs, pe_send_reqs, c_send_reqs_prev, pe_send_reqs_prev, data_chip_out, pe_data_out) - variable input_line : line; - variable valid_data : boolean; - variable istwert, sollwert : WORD; - variable is_external : std_logic_vector(0 downto 0); - variable ist_is_external : boolean; - variable istpath, sollpath : integer; + variable istwert : WORD; + variable istpath : integer; begin if c_send_reqs'event or c_send_reqs_prev'event then for i in 0 to num_paths_ext*4-1 loop @@ -167,6 +163,7 @@ begin istwert := data_chip_out(i); istpath := i; log_test_result(i, istwert, '1', istpath); + c_send_ack(i) <= not c_send_ack(i); end if; end loop; elsif pe_send_reqs'event or pe_send_reqs_prev'event then @@ -176,6 +173,7 @@ begin istwert := pe_data_out(i); istpath := i; log_test_result(i, istwert, '0', istpath); + pe_send_ack(i) <= not pe_send_ack(i); end if; end loop; end if; diff --git a/test/scripts/generate_test_files/generate_test_files.py b/test/scripts/generate_test_files/generate_test_files.py index 50fc838..2a67702 100644 --- a/test/scripts/generate_test_files/generate_test_files.py +++ b/test/scripts/generate_test_files/generate_test_files.py @@ -2,10 +2,13 @@ import shutil, sys from utils import * # inputs -sender_paths = [["00100","00110"]] # x,y -#recv_paths = [["00001","00010","00010","00010"]] -recv_paths = [["01011","10000","00001","11010"]] -test_name = "simple_multicast_4_test" +#sender_paths = [["01100","00000"]] # x,y +#recv_paths = [["00010","01110","11110","10011","10011","00000", +# "01101","01001","11011","11011","10101","01100"]] +sender_paths, recv_paths = generate_random_send_recv_paths(2) +test_name = "random_pe_to_pe_test" +print(sender_paths) +print(recv_paths) # constants stimuli = "# is external? | path | data\n" @@ -25,7 +28,7 @@ for p, path in enumerate(sender_paths): else: data_packet, stimuli, reference = gen_ref_for_mult_dir_multicast( path, recv_paths[p], data_packet, stimuli, reference) - + print(len(reference)) data_packet += 1 with open("stimuli.txt", "w") as f: diff --git a/test/scripts/generate_test_files/result.ref b/test/scripts/generate_test_files/result.ref index d339d28..bd889b2 100644 --- a/test/scripts/generate_test_files/result.ref +++ b/test/scripts/generate_test_files/result.ref @@ -1,16 +1,260 @@ -0 765 0001000000000001011100000101001010000000000000000000000000000001 -0 761 0001000000000001011100000101001010000000000000000000000000000001 -0 757 0001000000000001011100000101001010000000000000000000000000000001 -0 753 0001000000000001011100000101001010000000000000000000000000000001 -0 701 0001000000000001011100000101001010000000000000000000000000000001 -0 697 0001000000000001011100000101001010000000000000000000000000000001 -0 693 0001000000000001011100000101001010000000000000000000000000000001 -0 689 0001000000000001011100000101001010000000000000000000000000000001 -0 637 0001000000000001011100000101001010000000000000000000000000000001 -0 633 0001000000000001011100000101001010000000000000000000000000000001 -0 629 0001000000000001011100000101001010000000000000000000000000000001 -0 625 0001000000000001011100000101001010000000000000000000000000000001 -0 573 0001000000000001011100000101001010000000000000000000000000000001 -0 569 0001000000000001011100000101001010000000000000000000000000000001 -0 565 0001000000000001011100000101001010000000000000000000000000000001 -0 561 0001000000000001011100000101001010000000000000000000000000000001 +0 899 0001000000000001110111100100010000000000000000000000000000000001 +0 771 0001000000000001110111100100010000000000000000000000000000000001 +0 643 0001000000000001110111100100010000000000000000000000000000000001 +0 515 0001000000000001110111100100010000000000000000000000000000000001 +0 991 0001000000000010100010111100111111000000000000000000000000000001 +0 990 0001000000000010100010111100111111000000000000000000000000000001 +0 989 0001000000000010100010111100111111000000000000000000000000000001 +0 988 0001000000000010100010111100111111000000000000000000000000000001 +0 987 0001000000000010100010111100111111000000000000000000000000000001 +0 986 0001000000000010100010111100111111000000000000000000000000000001 +0 985 0001000000000010100010111100111111000000000000000000000000000001 +0 984 0001000000000010100010111100111111000000000000000000000000000001 +0 975 0001000000000010100010111100111111000000000000000000000000000001 +0 974 0001000000000010100010111100111111000000000000000000000000000001 +0 973 0001000000000010100010111100111111000000000000000000000000000001 +0 972 0001000000000010100010111100111111000000000000000000000000000001 +0 971 0001000000000010100010111100111111000000000000000000000000000001 +0 970 0001000000000010100010111100111111000000000000000000000000000001 +0 969 0001000000000010100010111100111111000000000000000000000000000001 +0 968 0001000000000010100010111100111111000000000000000000000000000001 +0 927 0001000000000010100010111100111111000000000000000000000000000001 +0 926 0001000000000010100010111100111111000000000000000000000000000001 +0 925 0001000000000010100010111100111111000000000000000000000000000001 +0 924 0001000000000010100010111100111111000000000000000000000000000001 +0 923 0001000000000010100010111100111111000000000000000000000000000001 +0 922 0001000000000010100010111100111111000000000000000000000000000001 +0 921 0001000000000010100010111100111111000000000000000000000000000001 +0 920 0001000000000010100010111100111111000000000000000000000000000001 +0 911 0001000000000010100010111100111111000000000000000000000000000001 +0 910 0001000000000010100010111100111111000000000000000000000000000001 +0 909 0001000000000010100010111100111111000000000000000000000000000001 +0 908 0001000000000010100010111100111111000000000000000000000000000001 +0 907 0001000000000010100010111100111111000000000000000000000000000001 +0 906 0001000000000010100010111100111111000000000000000000000000000001 +0 905 0001000000000010100010111100111111000000000000000000000000000001 +0 904 0001000000000010100010111100111111000000000000000000000000000001 +0 863 0001000000000010100010111100111111000000000000000000000000000001 +0 862 0001000000000010100010111100111111000000000000000000000000000001 +0 861 0001000000000010100010111100111111000000000000000000000000000001 +0 860 0001000000000010100010111100111111000000000000000000000000000001 +0 859 0001000000000010100010111100111111000000000000000000000000000001 +0 858 0001000000000010100010111100111111000000000000000000000000000001 +0 857 0001000000000010100010111100111111000000000000000000000000000001 +0 856 0001000000000010100010111100111111000000000000000000000000000001 +0 847 0001000000000010100010111100111111000000000000000000000000000001 +0 846 0001000000000010100010111100111111000000000000000000000000000001 +0 845 0001000000000010100010111100111111000000000000000000000000000001 +0 844 0001000000000010100010111100111111000000000000000000000000000001 +0 843 0001000000000010100010111100111111000000000000000000000000000001 +0 842 0001000000000010100010111100111111000000000000000000000000000001 +0 841 0001000000000010100010111100111111000000000000000000000000000001 +0 840 0001000000000010100010111100111111000000000000000000000000000001 +0 799 0001000000000010100010111100111111000000000000000000000000000001 +0 798 0001000000000010100010111100111111000000000000000000000000000001 +0 797 0001000000000010100010111100111111000000000000000000000000000001 +0 796 0001000000000010100010111100111111000000000000000000000000000001 +0 795 0001000000000010100010111100111111000000000000000000000000000001 +0 794 0001000000000010100010111100111111000000000000000000000000000001 +0 793 0001000000000010100010111100111111000000000000000000000000000001 +0 792 0001000000000010100010111100111111000000000000000000000000000001 +0 783 0001000000000010100010111100111111000000000000000000000000000001 +0 782 0001000000000010100010111100111111000000000000000000000000000001 +0 781 0001000000000010100010111100111111000000000000000000000000000001 +0 780 0001000000000010100010111100111111000000000000000000000000000001 +0 779 0001000000000010100010111100111111000000000000000000000000000001 +0 778 0001000000000010100010111100111111000000000000000000000000000001 +0 777 0001000000000010100010111100111111000000000000000000000000000001 +0 776 0001000000000010100010111100111111000000000000000000000000000001 +0 735 0001000000000010100010111100111111000000000000000000000000000001 +0 734 0001000000000010100010111100111111000000000000000000000000000001 +0 733 0001000000000010100010111100111111000000000000000000000000000001 +0 732 0001000000000010100010111100111111000000000000000000000000000001 +0 731 0001000000000010100010111100111111000000000000000000000000000001 +0 730 0001000000000010100010111100111111000000000000000000000000000001 +0 729 0001000000000010100010111100111111000000000000000000000000000001 +0 728 0001000000000010100010111100111111000000000000000000000000000001 +0 719 0001000000000010100010111100111111000000000000000000000000000001 +0 718 0001000000000010100010111100111111000000000000000000000000000001 +0 717 0001000000000010100010111100111111000000000000000000000000000001 +0 716 0001000000000010100010111100111111000000000000000000000000000001 +0 715 0001000000000010100010111100111111000000000000000000000000000001 +0 714 0001000000000010100010111100111111000000000000000000000000000001 +0 713 0001000000000010100010111100111111000000000000000000000000000001 +0 712 0001000000000010100010111100111111000000000000000000000000000001 +0 671 0001000000000010100010111100111111000000000000000000000000000001 +0 670 0001000000000010100010111100111111000000000000000000000000000001 +0 669 0001000000000010100010111100111111000000000000000000000000000001 +0 668 0001000000000010100010111100111111000000000000000000000000000001 +0 667 0001000000000010100010111100111111000000000000000000000000000001 +0 666 0001000000000010100010111100111111000000000000000000000000000001 +0 665 0001000000000010100010111100111111000000000000000000000000000001 +0 664 0001000000000010100010111100111111000000000000000000000000000001 +0 655 0001000000000010100010111100111111000000000000000000000000000001 +0 654 0001000000000010100010111100111111000000000000000000000000000001 +0 653 0001000000000010100010111100111111000000000000000000000000000001 +0 652 0001000000000010100010111100111111000000000000000000000000000001 +0 651 0001000000000010100010111100111111000000000000000000000000000001 +0 650 0001000000000010100010111100111111000000000000000000000000000001 +0 649 0001000000000010100010111100111111000000000000000000000000000001 +0 648 0001000000000010100010111100111111000000000000000000000000000001 +0 607 0001000000000010100010111100111111000000000000000000000000000001 +0 606 0001000000000010100010111100111111000000000000000000000000000001 +0 605 0001000000000010100010111100111111000000000000000000000000000001 +0 604 0001000000000010100010111100111111000000000000000000000000000001 +0 603 0001000000000010100010111100111111000000000000000000000000000001 +0 602 0001000000000010100010111100111111000000000000000000000000000001 +0 601 0001000000000010100010111100111111000000000000000000000000000001 +0 600 0001000000000010100010111100111111000000000000000000000000000001 +0 591 0001000000000010100010111100111111000000000000000000000000000001 +0 590 0001000000000010100010111100111111000000000000000000000000000001 +0 589 0001000000000010100010111100111111000000000000000000000000000001 +0 588 0001000000000010100010111100111111000000000000000000000000000001 +0 587 0001000000000010100010111100111111000000000000000000000000000001 +0 586 0001000000000010100010111100111111000000000000000000000000000001 +0 585 0001000000000010100010111100111111000000000000000000000000000001 +0 584 0001000000000010100010111100111111000000000000000000000000000001 +0 543 0001000000000010100010111100111111000000000000000000000000000001 +0 542 0001000000000010100010111100111111000000000000000000000000000001 +0 541 0001000000000010100010111100111111000000000000000000000000000001 +0 540 0001000000000010100010111100111111000000000000000000000000000001 +0 539 0001000000000010100010111100111111000000000000000000000000000001 +0 538 0001000000000010100010111100111111000000000000000000000000000001 +0 537 0001000000000010100010111100111111000000000000000000000000000001 +0 536 0001000000000010100010111100111111000000000000000000000000000001 +0 527 0001000000000010100010111100111111000000000000000000000000000001 +0 526 0001000000000010100010111100111111000000000000000000000000000001 +0 525 0001000000000010100010111100111111000000000000000000000000000001 +0 524 0001000000000010100010111100111111000000000000000000000000000001 +0 523 0001000000000010100010111100111111000000000000000000000000000001 +0 522 0001000000000010100010111100111111000000000000000000000000000001 +0 521 0001000000000010100010111100111111000000000000000000000000000001 +0 520 0001000000000010100010111100111111000000000000000000000000000001 +0 479 0001000000000010100010111100111111000000000000000000000000000001 +0 478 0001000000000010100010111100111111000000000000000000000000000001 +0 477 0001000000000010100010111100111111000000000000000000000000000001 +0 476 0001000000000010100010111100111111000000000000000000000000000001 +0 475 0001000000000010100010111100111111000000000000000000000000000001 +0 474 0001000000000010100010111100111111000000000000000000000000000001 +0 473 0001000000000010100010111100111111000000000000000000000000000001 +0 472 0001000000000010100010111100111111000000000000000000000000000001 +0 463 0001000000000010100010111100111111000000000000000000000000000001 +0 462 0001000000000010100010111100111111000000000000000000000000000001 +0 461 0001000000000010100010111100111111000000000000000000000000000001 +0 460 0001000000000010100010111100111111000000000000000000000000000001 +0 459 0001000000000010100010111100111111000000000000000000000000000001 +0 458 0001000000000010100010111100111111000000000000000000000000000001 +0 457 0001000000000010100010111100111111000000000000000000000000000001 +0 456 0001000000000010100010111100111111000000000000000000000000000001 +0 415 0001000000000010100010111100111111000000000000000000000000000001 +0 414 0001000000000010100010111100111111000000000000000000000000000001 +0 413 0001000000000010100010111100111111000000000000000000000000000001 +0 412 0001000000000010100010111100111111000000000000000000000000000001 +0 411 0001000000000010100010111100111111000000000000000000000000000001 +0 410 0001000000000010100010111100111111000000000000000000000000000001 +0 409 0001000000000010100010111100111111000000000000000000000000000001 +0 408 0001000000000010100010111100111111000000000000000000000000000001 +0 399 0001000000000010100010111100111111000000000000000000000000000001 +0 398 0001000000000010100010111100111111000000000000000000000000000001 +0 397 0001000000000010100010111100111111000000000000000000000000000001 +0 396 0001000000000010100010111100111111000000000000000000000000000001 +0 395 0001000000000010100010111100111111000000000000000000000000000001 +0 394 0001000000000010100010111100111111000000000000000000000000000001 +0 393 0001000000000010100010111100111111000000000000000000000000000001 +0 392 0001000000000010100010111100111111000000000000000000000000000001 +0 351 0001000000000010100010111100111111000000000000000000000000000001 +0 350 0001000000000010100010111100111111000000000000000000000000000001 +0 349 0001000000000010100010111100111111000000000000000000000000000001 +0 348 0001000000000010100010111100111111000000000000000000000000000001 +0 347 0001000000000010100010111100111111000000000000000000000000000001 +0 346 0001000000000010100010111100111111000000000000000000000000000001 +0 345 0001000000000010100010111100111111000000000000000000000000000001 +0 344 0001000000000010100010111100111111000000000000000000000000000001 +0 335 0001000000000010100010111100111111000000000000000000000000000001 +0 334 0001000000000010100010111100111111000000000000000000000000000001 +0 333 0001000000000010100010111100111111000000000000000000000000000001 +0 332 0001000000000010100010111100111111000000000000000000000000000001 +0 331 0001000000000010100010111100111111000000000000000000000000000001 +0 330 0001000000000010100010111100111111000000000000000000000000000001 +0 329 0001000000000010100010111100111111000000000000000000000000000001 +0 328 0001000000000010100010111100111111000000000000000000000000000001 +0 287 0001000000000010100010111100111111000000000000000000000000000001 +0 286 0001000000000010100010111100111111000000000000000000000000000001 +0 285 0001000000000010100010111100111111000000000000000000000000000001 +0 284 0001000000000010100010111100111111000000000000000000000000000001 +0 283 0001000000000010100010111100111111000000000000000000000000000001 +0 282 0001000000000010100010111100111111000000000000000000000000000001 +0 281 0001000000000010100010111100111111000000000000000000000000000001 +0 280 0001000000000010100010111100111111000000000000000000000000000001 +0 271 0001000000000010100010111100111111000000000000000000000000000001 +0 270 0001000000000010100010111100111111000000000000000000000000000001 +0 269 0001000000000010100010111100111111000000000000000000000000000001 +0 268 0001000000000010100010111100111111000000000000000000000000000001 +0 267 0001000000000010100010111100111111000000000000000000000000000001 +0 266 0001000000000010100010111100111111000000000000000000000000000001 +0 265 0001000000000010100010111100111111000000000000000000000000000001 +0 264 0001000000000010100010111100111111000000000000000000000000000001 +0 223 0001000000000010100010111100111111000000000000000000000000000001 +0 222 0001000000000010100010111100111111000000000000000000000000000001 +0 221 0001000000000010100010111100111111000000000000000000000000000001 +0 220 0001000000000010100010111100111111000000000000000000000000000001 +0 219 0001000000000010100010111100111111000000000000000000000000000001 +0 218 0001000000000010100010111100111111000000000000000000000000000001 +0 217 0001000000000010100010111100111111000000000000000000000000000001 +0 216 0001000000000010100010111100111111000000000000000000000000000001 +0 207 0001000000000010100010111100111111000000000000000000000000000001 +0 206 0001000000000010100010111100111111000000000000000000000000000001 +0 205 0001000000000010100010111100111111000000000000000000000000000001 +0 204 0001000000000010100010111100111111000000000000000000000000000001 +0 203 0001000000000010100010111100111111000000000000000000000000000001 +0 202 0001000000000010100010111100111111000000000000000000000000000001 +0 201 0001000000000010100010111100111111000000000000000000000000000001 +0 200 0001000000000010100010111100111111000000000000000000000000000001 +0 159 0001000000000010100010111100111111000000000000000000000000000001 +0 158 0001000000000010100010111100111111000000000000000000000000000001 +0 157 0001000000000010100010111100111111000000000000000000000000000001 +0 156 0001000000000010100010111100111111000000000000000000000000000001 +0 155 0001000000000010100010111100111111000000000000000000000000000001 +0 154 0001000000000010100010111100111111000000000000000000000000000001 +0 153 0001000000000010100010111100111111000000000000000000000000000001 +0 152 0001000000000010100010111100111111000000000000000000000000000001 +0 143 0001000000000010100010111100111111000000000000000000000000000001 +0 142 0001000000000010100010111100111111000000000000000000000000000001 +0 141 0001000000000010100010111100111111000000000000000000000000000001 +0 140 0001000000000010100010111100111111000000000000000000000000000001 +0 139 0001000000000010100010111100111111000000000000000000000000000001 +0 138 0001000000000010100010111100111111000000000000000000000000000001 +0 137 0001000000000010100010111100111111000000000000000000000000000001 +0 136 0001000000000010100010111100111111000000000000000000000000000001 +0 95 0001000000000010100010111100111111000000000000000000000000000001 +0 94 0001000000000010100010111100111111000000000000000000000000000001 +0 93 0001000000000010100010111100111111000000000000000000000000000001 +0 92 0001000000000010100010111100111111000000000000000000000000000001 +0 91 0001000000000010100010111100111111000000000000000000000000000001 +0 90 0001000000000010100010111100111111000000000000000000000000000001 +0 89 0001000000000010100010111100111111000000000000000000000000000001 +0 88 0001000000000010100010111100111111000000000000000000000000000001 +0 79 0001000000000010100010111100111111000000000000000000000000000001 +0 78 0001000000000010100010111100111111000000000000000000000000000001 +0 77 0001000000000010100010111100111111000000000000000000000000000001 +0 76 0001000000000010100010111100111111000000000000000000000000000001 +0 75 0001000000000010100010111100111111000000000000000000000000000001 +0 74 0001000000000010100010111100111111000000000000000000000000000001 +0 73 0001000000000010100010111100111111000000000000000000000000000001 +0 72 0001000000000010100010111100111111000000000000000000000000000001 +0 31 0001000000000010100010111100111111000000000000000000000000000001 +0 30 0001000000000010100010111100111111000000000000000000000000000001 +0 29 0001000000000010100010111100111111000000000000000000000000000001 +0 28 0001000000000010100010111100111111000000000000000000000000000001 +0 27 0001000000000010100010111100111111000000000000000000000000000001 +0 26 0001000000000010100010111100111111000000000000000000000000000001 +0 25 0001000000000010100010111100111111000000000000000000000000000001 +0 24 0001000000000010100010111100111111000000000000000000000000000001 +0 15 0001000000000010100010111100111111000000000000000000000000000001 +0 14 0001000000000010100010111100111111000000000000000000000000000001 +0 13 0001000000000010100010111100111111000000000000000000000000000001 +0 12 0001000000000010100010111100111111000000000000000000000000000001 +0 11 0001000000000010100010111100111111000000000000000000000000000001 +0 10 0001000000000010100010111100111111000000000000000000000000000001 +0 9 0001000000000010100010111100111111000000000000000000000000000001 +0 8 0001000000000010100010111100111111000000000000000000000000000001 diff --git a/test/scripts/generate_test_files/stimuli.txt b/test/scripts/generate_test_files/stimuli.txt index aa1d8a8..03f644a 100644 --- a/test/scripts/generate_test_files/stimuli.txt +++ b/test/scripts/generate_test_files/stimuli.txt @@ -1,2 +1,3 @@ # is external? | path | data -0 971 0001000000000001011100000101001010000000000000000000000000000001 # origin: (00100-00110) --> dest: (01011-10000,00001-11010) +0 272 0001000000000001110111100100010000000000000000000000000000000001 # origin: (11111-01011) --> dest: (01110-11110,00110-01110) +0 863 0001000000000010100010111100111111000000000000000000000000000001 # origin: (01100-00000) --> dest: (10100-01011,00101-00000,10101-00001,11101-10111) diff --git a/test/scripts/generate_test_files/utils.py b/test/scripts/generate_test_files/utils.py index 6074235..3754c0a 100644 --- a/test/scripts/generate_test_files/utils.py +++ b/test/scripts/generate_test_files/utils.py @@ -1,3 +1,5 @@ +import numpy as np + NUM_PE = 1024 HEADER = "0001" CHIP_X = "00000" @@ -52,7 +54,8 @@ def get_multicast_reference(copy_x, copy_y, recv_path, packet): else 0 y_poss_ind = y_poss_ind+1 if y_poss_ind+1 < len(y_poss_paths[i]) \ else 0 - + print(copy_x) + print(copy_y) reference = "" for x_path, y_path in zip(x_paths, y_paths): index_path = get_index_path(x_path, y_path) @@ -141,6 +144,30 @@ def gen_ref_for_mult_dir_multicast(path, recv_path, data_packet, stimuli, refere reference += "0 " + str(index_path) + " " reference += packets[i] + "\n" """ - reference = get_multicast_reference(copy_x, copy_y, recv_path, packet) + reference += get_multicast_reference(copy_x, copy_y, recv_path, packet) return data_packet, stimuli, reference + + +def generate_random_send_recv_paths(num_msgs): + sender_paths = [] + recv_paths = [] + for i in range(num_msgs): + # generate origin + x_path = f'{np.random.randint(32):05b}' + y_path = f'{np.random.randint(32):05b}' + sender_paths.append([x_path, y_path]) + # decide if it is unicast or multicast + msg_type = np.random.randint(2) + if msg_type == 0: # unicast + y_path = f'{np.random.randint(32):05b}' + x_path = f'{np.random.randint(32):05b}' + recv_paths.append([x_path, y_path]) + else: # multicast + num_rcv = np.random.randint(2,7) + recv_path = [] + for i in range(num_rcv): + recv_path.append(f'{np.random.randint(32):05b}') + recv_path.append(f'{np.random.randint(32):05b}') + recv_paths.append(recv_path) + return sender_paths, recv_paths diff --git a/test/scripts/validate_results/result.ref b/test/scripts/validate_results/result.ref index d339d28..5ba5289 100644 --- a/test/scripts/validate_results/result.ref +++ b/test/scripts/validate_results/result.ref @@ -1,16 +1,65 @@ -0 765 0001000000000001011100000101001010000000000000000000000000000001 -0 761 0001000000000001011100000101001010000000000000000000000000000001 -0 757 0001000000000001011100000101001010000000000000000000000000000001 -0 753 0001000000000001011100000101001010000000000000000000000000000001 -0 701 0001000000000001011100000101001010000000000000000000000000000001 -0 697 0001000000000001011100000101001010000000000000000000000000000001 -0 693 0001000000000001011100000101001010000000000000000000000000000001 -0 689 0001000000000001011100000101001010000000000000000000000000000001 -0 637 0001000000000001011100000101001010000000000000000000000000000001 -0 633 0001000000000001011100000101001010000000000000000000000000000001 -0 629 0001000000000001011100000101001010000000000000000000000000000001 -0 625 0001000000000001011100000101001010000000000000000000000000000001 -0 573 0001000000000001011100000101001010000000000000000000000000000001 -0 569 0001000000000001011100000101001010000000000000000000000000000001 -0 565 0001000000000001011100000101001010000000000000000000000000000001 -0 561 0001000000000001011100000101001010000000000000000000000000000001 +0 959 0001000000000010100110001011110010000000000000000000000000000001 +0 957 0001000000000010100110001011110010000000000000000000000000000001 +0 955 0001000000000010100110001011110010000000000000000000000000000001 +0 953 0001000000000010100110001011110010000000000000000000000000000001 +0 951 0001000000000010100110001011110010000000000000000000000000000001 +0 949 0001000000000010100110001011110010000000000000000000000000000001 +0 947 0001000000000010100110001011110010000000000000000000000000000001 +0 945 0001000000000010100110001011110010000000000000000000000000000001 +0 927 0001000000000010100110001011110010000000000000000000000000000001 +0 925 0001000000000010100110001011110010000000000000000000000000000001 +0 923 0001000000000010100110001011110010000000000000000000000000000001 +0 921 0001000000000010100110001011110010000000000000000000000000000001 +0 919 0001000000000010100110001011110010000000000000000000000000000001 +0 917 0001000000000010100110001011110010000000000000000000000000000001 +0 915 0001000000000010100110001011110010000000000000000000000000000001 +0 913 0001000000000010100110001011110010000000000000000000000000000001 +0 703 0001000000000010100110001011110010000000000000000000000000000001 +0 701 0001000000000010100110001011110010000000000000000000000000000001 +0 699 0001000000000010100110001011110010000000000000000000000000000001 +0 697 0001000000000010100110001011110010000000000000000000000000000001 +0 695 0001000000000010100110001011110010000000000000000000000000000001 +0 693 0001000000000010100110001011110010000000000000000000000000000001 +0 691 0001000000000010100110001011110010000000000000000000000000000001 +0 689 0001000000000010100110001011110010000000000000000000000000000001 +0 671 0001000000000010100110001011110010000000000000000000000000000001 +0 669 0001000000000010100110001011110010000000000000000000000000000001 +0 667 0001000000000010100110001011110010000000000000000000000000000001 +0 665 0001000000000010100110001011110010000000000000000000000000000001 +0 663 0001000000000010100110001011110010000000000000000000000000000001 +0 661 0001000000000010100110001011110010000000000000000000000000000001 +0 659 0001000000000010100110001011110010000000000000000000000000000001 +0 657 0001000000000010100110001011110010000000000000000000000000000001 +0 447 0001000000000010100110001011110010000000000000000000000000000001 +0 445 0001000000000010100110001011110010000000000000000000000000000001 +0 443 0001000000000010100110001011110010000000000000000000000000000001 +0 441 0001000000000010100110001011110010000000000000000000000000000001 +0 439 0001000000000010100110001011110010000000000000000000000000000001 +0 437 0001000000000010100110001011110010000000000000000000000000000001 +0 435 0001000000000010100110001011110010000000000000000000000000000001 +0 433 0001000000000010100110001011110010000000000000000000000000000001 +0 415 0001000000000010100110001011110010000000000000000000000000000001 +0 413 0001000000000010100110001011110010000000000000000000000000000001 +0 411 0001000000000010100110001011110010000000000000000000000000000001 +0 409 0001000000000010100110001011110010000000000000000000000000000001 +0 407 0001000000000010100110001011110010000000000000000000000000000001 +0 405 0001000000000010100110001011110010000000000000000000000000000001 +0 403 0001000000000010100110001011110010000000000000000000000000000001 +0 401 0001000000000010100110001011110010000000000000000000000000000001 +0 191 0001000000000010100110001011110010000000000000000000000000000001 +0 189 0001000000000010100110001011110010000000000000000000000000000001 +0 187 0001000000000010100110001011110010000000000000000000000000000001 +0 185 0001000000000010100110001011110010000000000000000000000000000001 +0 183 0001000000000010100110001011110010000000000000000000000000000001 +0 181 0001000000000010100110001011110010000000000000000000000000000001 +0 179 0001000000000010100110001011110010000000000000000000000000000001 +0 177 0001000000000010100110001011110010000000000000000000000000000001 +0 159 0001000000000010100110001011110010000000000000000000000000000001 +0 157 0001000000000010100110001011110010000000000000000000000000000001 +0 155 0001000000000010100110001011110010000000000000000000000000000001 +0 153 0001000000000010100110001011110010000000000000000000000000000001 +0 151 0001000000000010100110001011110010000000000000000000000000000001 +0 149 0001000000000010100110001011110010000000000000000000000000000001 +0 147 0001000000000010100110001011110010000000000000000000000000000001 +0 145 0001000000000010100110001011110010000000000000000000000000000001 +0 221 0001000000000010101100000000000000000000000000000000000000000001 diff --git a/test/scripts/validate_results/simulation.log b/test/scripts/validate_results/simulation.log index 351a0df..e69fb58 100644 --- a/test/scripts/validate_results/simulation.log +++ b/test/scripts/validate_results/simulation.log @@ -1,16 +1,65 @@ -0 561 0001000000000001011100000101001010000000000000000000000000000001 -0 565 0001000000000001011100000101001010000000000000000000000000000001 -0 569 0001000000000001011100000101001010000000000000000000000000000001 -0 573 0001000000000001011100000101001010000000000000000000000000000001 -0 625 0001000000000001011100000101001010000000000000000000000000000001 -0 629 0001000000000001011100000101001010000000000000000000000000000001 -0 633 0001000000000001011100000101001010000000000000000000000000000001 -0 637 0001000000000001011100000101001010000000000000000000000000000001 -0 689 0001000000000001011100000101001010000000000000000000000000000001 -0 693 0001000000000001011100000101001010000000000000000000000000000001 -0 697 0001000000000001011100000101001010000000000000000000000000000001 -0 701 0001000000000001011100000101001010000000000000000000000000000001 -0 753 0001000000000001011100000101001010000000000000000000000000000001 -0 757 0001000000000001011100000101001010000000000000000000000000000001 -0 761 0001000000000001011100000101001010000000000000000000000000000001 -0 765 0001000000000001011100000101001010000000000000000000000000000001 +0 221 0001000000000010101100000000000000000000000000000000000000000001 +0 145 0001000000000010100110001011110010000000000000000000000000000001 +0 147 0001000000000010100110001011110010000000000000000000000000000001 +0 149 0001000000000010100110001011110010000000000000000000000000000001 +0 151 0001000000000010100110001011110010000000000000000000000000000001 +0 153 0001000000000010100110001011110010000000000000000000000000000001 +0 155 0001000000000010100110001011110010000000000000000000000000000001 +0 157 0001000000000010100110001011110010000000000000000000000000000001 +0 159 0001000000000010100110001011110010000000000000000000000000000001 +0 177 0001000000000010100110001011110010000000000000000000000000000001 +0 179 0001000000000010100110001011110010000000000000000000000000000001 +0 181 0001000000000010100110001011110010000000000000000000000000000001 +0 183 0001000000000010100110001011110010000000000000000000000000000001 +0 185 0001000000000010100110001011110010000000000000000000000000000001 +0 187 0001000000000010100110001011110010000000000000000000000000000001 +0 189 0001000000000010100110001011110010000000000000000000000000000001 +0 191 0001000000000010100110001011110010000000000000000000000000000001 +0 401 0001000000000010100110001011110010000000000000000000000000000001 +0 403 0001000000000010100110001011110010000000000000000000000000000001 +0 405 0001000000000010100110001011110010000000000000000000000000000001 +0 407 0001000000000010100110001011110010000000000000000000000000000001 +0 409 0001000000000010100110001011110010000000000000000000000000000001 +0 411 0001000000000010100110001011110010000000000000000000000000000001 +0 413 0001000000000010100110001011110010000000000000000000000000000001 +0 415 0001000000000010100110001011110010000000000000000000000000000001 +0 433 0001000000000010100110001011110010000000000000000000000000000001 +0 435 0001000000000010100110001011110010000000000000000000000000000001 +0 437 0001000000000010100110001011110010000000000000000000000000000001 +0 439 0001000000000010100110001011110010000000000000000000000000000001 +0 441 0001000000000010100110001011110010000000000000000000000000000001 +0 443 0001000000000010100110001011110010000000000000000000000000000001 +0 445 0001000000000010100110001011110010000000000000000000000000000001 +0 447 0001000000000010100110001011110010000000000000000000000000000001 +0 657 0001000000000010100110001011110010000000000000000000000000000001 +0 659 0001000000000010100110001011110010000000000000000000000000000001 +0 661 0001000000000010100110001011110010000000000000000000000000000001 +0 663 0001000000000010100110001011110010000000000000000000000000000001 +0 665 0001000000000010100110001011110010000000000000000000000000000001 +0 667 0001000000000010100110001011110010000000000000000000000000000001 +0 669 0001000000000010100110001011110010000000000000000000000000000001 +0 671 0001000000000010100110001011110010000000000000000000000000000001 +0 689 0001000000000010100110001011110010000000000000000000000000000001 +0 691 0001000000000010100110001011110010000000000000000000000000000001 +0 693 0001000000000010100110001011110010000000000000000000000000000001 +0 695 0001000000000010100110001011110010000000000000000000000000000001 +0 697 0001000000000010100110001011110010000000000000000000000000000001 +0 699 0001000000000010100110001011110010000000000000000000000000000001 +0 701 0001000000000010100110001011110010000000000000000000000000000001 +0 703 0001000000000010100110001011110010000000000000000000000000000001 +0 913 0001000000000010100110001011110010000000000000000000000000000001 +0 915 0001000000000010100110001011110010000000000000000000000000000001 +0 917 0001000000000010100110001011110010000000000000000000000000000001 +0 919 0001000000000010100110001011110010000000000000000000000000000001 +0 921 0001000000000010100110001011110010000000000000000000000000000001 +0 923 0001000000000010100110001011110010000000000000000000000000000001 +0 925 0001000000000010100110001011110010000000000000000000000000000001 +0 927 0001000000000010100110001011110010000000000000000000000000000001 +0 945 0001000000000010100110001011110010000000000000000000000000000001 +0 947 0001000000000010100110001011110010000000000000000000000000000001 +0 949 0001000000000010100110001011110010000000000000000000000000000001 +0 951 0001000000000010100110001011110010000000000000000000000000000001 +0 953 0001000000000010100110001011110010000000000000000000000000000001 +0 955 0001000000000010100110001011110010000000000000000000000000000001 +0 957 0001000000000010100110001011110010000000000000000000000000000001 +0 959 0001000000000010100110001011110010000000000000000000000000000001 diff --git a/test/scripts/validate_results/test.log b/test/scripts/validate_results/test.log index 60d88a7..c7e4d30 100644 --- a/test/scripts/validate_results/test.log +++ b/test/scripts/validate_results/test.log @@ -1,32 +1,130 @@ -0 561 0001000000000001011100000101001010000000000000000000000000000001 +0 221 0001000000000010101100000000000000000000000000000000000000000001 ---> passed! -0 565 0001000000000001011100000101001010000000000000000000000000000001 +0 145 0001000000000010100110001011110010000000000000000000000000000001 ---> passed! -0 569 0001000000000001011100000101001010000000000000000000000000000001 +0 147 0001000000000010100110001011110010000000000000000000000000000001 ---> passed! -0 573 0001000000000001011100000101001010000000000000000000000000000001 +0 149 0001000000000010100110001011110010000000000000000000000000000001 ---> passed! -0 625 0001000000000001011100000101001010000000000000000000000000000001 +0 151 0001000000000010100110001011110010000000000000000000000000000001 ---> passed! -0 629 0001000000000001011100000101001010000000000000000000000000000001 +0 153 0001000000000010100110001011110010000000000000000000000000000001 ---> passed! -0 633 0001000000000001011100000101001010000000000000000000000000000001 +0 155 0001000000000010100110001011110010000000000000000000000000000001 ---> passed! -0 637 0001000000000001011100000101001010000000000000000000000000000001 +0 157 0001000000000010100110001011110010000000000000000000000000000001 ---> passed! -0 689 0001000000000001011100000101001010000000000000000000000000000001 +0 159 0001000000000010100110001011110010000000000000000000000000000001 ---> passed! -0 693 0001000000000001011100000101001010000000000000000000000000000001 +0 177 0001000000000010100110001011110010000000000000000000000000000001 ---> passed! -0 697 0001000000000001011100000101001010000000000000000000000000000001 +0 179 0001000000000010100110001011110010000000000000000000000000000001 ---> passed! -0 701 0001000000000001011100000101001010000000000000000000000000000001 +0 181 0001000000000010100110001011110010000000000000000000000000000001 ---> passed! -0 753 0001000000000001011100000101001010000000000000000000000000000001 +0 183 0001000000000010100110001011110010000000000000000000000000000001 ---> passed! -0 757 0001000000000001011100000101001010000000000000000000000000000001 +0 185 0001000000000010100110001011110010000000000000000000000000000001 ---> passed! -0 761 0001000000000001011100000101001010000000000000000000000000000001 +0 187 0001000000000010100110001011110010000000000000000000000000000001 ---> passed! -0 765 0001000000000001011100000101001010000000000000000000000000000001 +0 189 0001000000000010100110001011110010000000000000000000000000000001 +---> passed! +0 191 0001000000000010100110001011110010000000000000000000000000000001 +---> passed! +0 401 0001000000000010100110001011110010000000000000000000000000000001 +---> passed! +0 403 0001000000000010100110001011110010000000000000000000000000000001 +---> passed! +0 405 0001000000000010100110001011110010000000000000000000000000000001 +---> passed! +0 407 0001000000000010100110001011110010000000000000000000000000000001 +---> passed! +0 409 0001000000000010100110001011110010000000000000000000000000000001 +---> passed! +0 411 0001000000000010100110001011110010000000000000000000000000000001 +---> passed! +0 413 0001000000000010100110001011110010000000000000000000000000000001 +---> passed! +0 415 0001000000000010100110001011110010000000000000000000000000000001 +---> passed! +0 433 0001000000000010100110001011110010000000000000000000000000000001 +---> passed! +0 435 0001000000000010100110001011110010000000000000000000000000000001 +---> passed! +0 437 0001000000000010100110001011110010000000000000000000000000000001 +---> passed! +0 439 0001000000000010100110001011110010000000000000000000000000000001 +---> passed! +0 441 0001000000000010100110001011110010000000000000000000000000000001 +---> passed! +0 443 0001000000000010100110001011110010000000000000000000000000000001 +---> passed! +0 445 0001000000000010100110001011110010000000000000000000000000000001 +---> passed! +0 447 0001000000000010100110001011110010000000000000000000000000000001 +---> passed! +0 657 0001000000000010100110001011110010000000000000000000000000000001 +---> passed! +0 659 0001000000000010100110001011110010000000000000000000000000000001 +---> passed! +0 661 0001000000000010100110001011110010000000000000000000000000000001 +---> passed! +0 663 0001000000000010100110001011110010000000000000000000000000000001 +---> passed! +0 665 0001000000000010100110001011110010000000000000000000000000000001 +---> passed! +0 667 0001000000000010100110001011110010000000000000000000000000000001 +---> passed! +0 669 0001000000000010100110001011110010000000000000000000000000000001 +---> passed! +0 671 0001000000000010100110001011110010000000000000000000000000000001 +---> passed! +0 689 0001000000000010100110001011110010000000000000000000000000000001 +---> passed! +0 691 0001000000000010100110001011110010000000000000000000000000000001 +---> passed! +0 693 0001000000000010100110001011110010000000000000000000000000000001 +---> passed! +0 695 0001000000000010100110001011110010000000000000000000000000000001 +---> passed! +0 697 0001000000000010100110001011110010000000000000000000000000000001 +---> passed! +0 699 0001000000000010100110001011110010000000000000000000000000000001 +---> passed! +0 701 0001000000000010100110001011110010000000000000000000000000000001 +---> passed! +0 703 0001000000000010100110001011110010000000000000000000000000000001 +---> passed! +0 913 0001000000000010100110001011110010000000000000000000000000000001 +---> passed! +0 915 0001000000000010100110001011110010000000000000000000000000000001 +---> passed! +0 917 0001000000000010100110001011110010000000000000000000000000000001 +---> passed! +0 919 0001000000000010100110001011110010000000000000000000000000000001 +---> passed! +0 921 0001000000000010100110001011110010000000000000000000000000000001 +---> passed! +0 923 0001000000000010100110001011110010000000000000000000000000000001 +---> passed! +0 925 0001000000000010100110001011110010000000000000000000000000000001 +---> passed! +0 927 0001000000000010100110001011110010000000000000000000000000000001 +---> passed! +0 945 0001000000000010100110001011110010000000000000000000000000000001 +---> passed! +0 947 0001000000000010100110001011110010000000000000000000000000000001 +---> passed! +0 949 0001000000000010100110001011110010000000000000000000000000000001 +---> passed! +0 951 0001000000000010100110001011110010000000000000000000000000000001 +---> passed! +0 953 0001000000000010100110001011110010000000000000000000000000000001 +---> passed! +0 955 0001000000000010100110001011110010000000000000000000000000000001 +---> passed! +0 957 0001000000000010100110001011110010000000000000000000000000000001 +---> passed! +0 959 0001000000000010100110001011110010000000000000000000000000000001 ---> passed! diff --git a/test/scripts/validate_results/validate_results.py b/test/scripts/validate_results/validate_results.py index 27edeef..9c416af 100644 --- a/test/scripts/validate_results/validate_results.py +++ b/test/scripts/validate_results/validate_results.py @@ -1,12 +1,13 @@ import shutil, sys test_name = "" -if not len(sys.argv) < 1: +if len(sys.argv) > 1: test_name = sys.argv[1] if test_name != "": shutil.copyfile("../../input/noc_tests/"+test_name+"/result.ref", "result.ref") shutil.copyfile("/home/juanmanuel/modelsim/simulation.log", "simulation.log") + shutil.copyfile("/home/juanmanuel/modelsim/simulation.log", "../../input/noc_tests/"+test_name+"/simulation.log") reference = [] with open("result.ref", "r") as f: