Loading hls/lines128_length256/main.cpp +6 −6 Changes for hls/lines128_length256/main.cpp: 6 added lines, 6 removed lines. Original line number Diff line number Diff line Loading @@ -21,7 +21,7 @@ int main(int argc, char *argv[]) { using namespace std; // テストデータ (文字列形式) // テストデータ (文字列形式) // NL_Q00.txt //char boardstr[BOARDSTR_SIZE] = "X10Y05Z3L0000107041L0004107002L0102102021L0900100003"; // NL_Q06.txt Loading @@ -29,9 +29,9 @@ int main(int argc, char *argv[]) { // NL_Q08.txt //char boardstr[BOARDSTR_SIZE] = "X17Y20Z2L0000103022L1603115052L0916107032L0302108012L1104111042L1002100002L0919116162L1616113182L1001115012L0500201182L1603213152L0600210022"; // 指定されてればコマンドラインから問題文字列を読み込む // 指定されてればコマンドラインから問題文字列を読み込む if (1 < argc) { //先頭がXではないならば標準入力から読み込む //先頭がXではないならば標準入力から読み込む if(argv[1][0]!='X') { char* c_p=fgets(boardstr, BOARDSTR_SIZE, stdin); Loading @@ -44,7 +44,7 @@ int main(int argc, char *argv[]) { } } // 指定されてればシード値を読み込む // 指定されてればシード値を読み込む int seed = 12345; if (2 < argc) { seed = atoi(argv[2]); Loading @@ -54,7 +54,7 @@ int main(int argc, char *argv[]) { int size_y = (boardstr[4] - '0') * 10 + (boardstr[5] - '0'); int size_z = (boardstr[7] - '0'); // ソルバ実行 // ソルバ実行 ap_int<32> status; clock_t clock_start, clock_done; clock_start = clock(); Loading @@ -68,7 +68,7 @@ int main(int argc, char *argv[]) { cout << "status = " << (int)status << endl; cout << "elapsed = " << ((double)(clock_done - clock_start) / CLOCKS_PER_SEC) << endl << endl; // 解表示 // 解表示 cout << "SOLUTION" << endl; cout << "========" << endl; cout << "SIZE " << size_x << "X" << size_y << "X" << size_z << endl; Loading hls/lines128_length256/router.cpp +161 −161 File changed.Preview size limit exceeded, changes collapsed. Show changes hls/lines128_length256/router.hpp +12 −12 Changes for hls/lines128_length256/router.hpp: 12 added lines, 12 removed lines. Original line number Diff line number Diff line Loading @@ -13,33 +13,33 @@ #include <ap_int.h> #endif //#define DEBUG_PRINT // いろいろ表示する #define USE_ASTAR // A* 探索を使う #define USE_MOD_CALC // ターゲットラインの選択に剰余演算を用いる //#define DEBUG_PRINT // いろいろ表示する #define USE_ASTAR // A* 探索を使う #define USE_MOD_CALC // ターゲットラインの選択に剰余演算を用いる using namespace std; // 各種設定値 #define MAX_WIDTH 72 // X, Y の最大値 (7ビットで収まる) // 各種設定値 #define MAX_WIDTH 72 // X, Y の最大値 (7ビットで収まる) #define BITWIDTH_XY 13 #define BITMASK_XY 65528 // 1111 1111 1111 1000 #define MAX_LAYER 8 // Z の最大値 (3ビット) #define MAX_LAYER 8 // Z の最大値 (3ビット) #define BITWIDTH_Z 3 #define BITMASK_Z 7 // 0000 0000 0000 0111 #define MAX_CELLS 41472 // セルの総数 =72*72*8 (16ビットで収まる) #define MAX_LINES 128 // ライン数の最大値 (7ビット) #define MAX_PATH 256 // 1つのラインが対応するセル数の最大値 (8ビット) #define MAX_PQ 4096 // 探索時のプライオリティ・キューの最大サイズ (12ビット) 足りないかも? #define MAX_CELLS 41472 // セルの総数 =72*72*8 (16ビットで収まる) #define MAX_LINES 128 // ライン数の最大値 (7ビット) #define MAX_PATH 256 // 1つのラインが対応するセル数の最大値 (8ビット) #define MAX_PQ 4096 // 探索時のプライオリティ・キューの最大サイズ (12ビット) 足りないかも? #define PQ_PRIORITY_WIDTH 16 #define PQ_PRIORITY_MASK 65535 // 0000 0000 0000 0000 1111 1111 1111 1111 #define PQ_DATA_WIDTH 16 #define PQ_DATA_MASK 4294901760 // 1111 1111 1111 1111 0000 0000 0000 0000 #define MAX_WEIGHT 255 // 重みの最大値 (8ビットで収まる) #define BOARDSTR_SIZE 41472 // ボードストリングの最大文字数 (セル数 72*72*8 あれば良い) #define MAX_WEIGHT 255 // 重みの最大値 (8ビットで収まる) #define BOARDSTR_SIZE 41472 // ボードストリングの最大文字数 (セル数 72*72*8 あれば良い) void lfsr_random_init(ap_uint<32> seed); Loading Loading
hls/lines128_length256/main.cpp +6 −6 Changes for hls/lines128_length256/main.cpp: 6 added lines, 6 removed lines. Original line number Diff line number Diff line Loading @@ -21,7 +21,7 @@ int main(int argc, char *argv[]) { using namespace std; // テストデータ (文字列形式) // テストデータ (文字列形式) // NL_Q00.txt //char boardstr[BOARDSTR_SIZE] = "X10Y05Z3L0000107041L0004107002L0102102021L0900100003"; // NL_Q06.txt Loading @@ -29,9 +29,9 @@ int main(int argc, char *argv[]) { // NL_Q08.txt //char boardstr[BOARDSTR_SIZE] = "X17Y20Z2L0000103022L1603115052L0916107032L0302108012L1104111042L1002100002L0919116162L1616113182L1001115012L0500201182L1603213152L0600210022"; // 指定されてればコマンドラインから問題文字列を読み込む // 指定されてればコマンドラインから問題文字列を読み込む if (1 < argc) { //先頭がXではないならば標準入力から読み込む //先頭がXではないならば標準入力から読み込む if(argv[1][0]!='X') { char* c_p=fgets(boardstr, BOARDSTR_SIZE, stdin); Loading @@ -44,7 +44,7 @@ int main(int argc, char *argv[]) { } } // 指定されてればシード値を読み込む // 指定されてればシード値を読み込む int seed = 12345; if (2 < argc) { seed = atoi(argv[2]); Loading @@ -54,7 +54,7 @@ int main(int argc, char *argv[]) { int size_y = (boardstr[4] - '0') * 10 + (boardstr[5] - '0'); int size_z = (boardstr[7] - '0'); // ソルバ実行 // ソルバ実行 ap_int<32> status; clock_t clock_start, clock_done; clock_start = clock(); Loading @@ -68,7 +68,7 @@ int main(int argc, char *argv[]) { cout << "status = " << (int)status << endl; cout << "elapsed = " << ((double)(clock_done - clock_start) / CLOCKS_PER_SEC) << endl << endl; // 解表示 // 解表示 cout << "SOLUTION" << endl; cout << "========" << endl; cout << "SIZE " << size_x << "X" << size_y << "X" << size_z << endl; Loading
hls/lines128_length256/router.cpp +161 −161 File changed.Preview size limit exceeded, changes collapsed. Show changes
hls/lines128_length256/router.hpp +12 −12 Changes for hls/lines128_length256/router.hpp: 12 added lines, 12 removed lines. Original line number Diff line number Diff line Loading @@ -13,33 +13,33 @@ #include <ap_int.h> #endif //#define DEBUG_PRINT // いろいろ表示する #define USE_ASTAR // A* 探索を使う #define USE_MOD_CALC // ターゲットラインの選択に剰余演算を用いる //#define DEBUG_PRINT // いろいろ表示する #define USE_ASTAR // A* 探索を使う #define USE_MOD_CALC // ターゲットラインの選択に剰余演算を用いる using namespace std; // 各種設定値 #define MAX_WIDTH 72 // X, Y の最大値 (7ビットで収まる) // 各種設定値 #define MAX_WIDTH 72 // X, Y の最大値 (7ビットで収まる) #define BITWIDTH_XY 13 #define BITMASK_XY 65528 // 1111 1111 1111 1000 #define MAX_LAYER 8 // Z の最大値 (3ビット) #define MAX_LAYER 8 // Z の最大値 (3ビット) #define BITWIDTH_Z 3 #define BITMASK_Z 7 // 0000 0000 0000 0111 #define MAX_CELLS 41472 // セルの総数 =72*72*8 (16ビットで収まる) #define MAX_LINES 128 // ライン数の最大値 (7ビット) #define MAX_PATH 256 // 1つのラインが対応するセル数の最大値 (8ビット) #define MAX_PQ 4096 // 探索時のプライオリティ・キューの最大サイズ (12ビット) 足りないかも? #define MAX_CELLS 41472 // セルの総数 =72*72*8 (16ビットで収まる) #define MAX_LINES 128 // ライン数の最大値 (7ビット) #define MAX_PATH 256 // 1つのラインが対応するセル数の最大値 (8ビット) #define MAX_PQ 4096 // 探索時のプライオリティ・キューの最大サイズ (12ビット) 足りないかも? #define PQ_PRIORITY_WIDTH 16 #define PQ_PRIORITY_MASK 65535 // 0000 0000 0000 0000 1111 1111 1111 1111 #define PQ_DATA_WIDTH 16 #define PQ_DATA_MASK 4294901760 // 1111 1111 1111 1111 0000 0000 0000 0000 #define MAX_WEIGHT 255 // 重みの最大値 (8ビットで収まる) #define BOARDSTR_SIZE 41472 // ボードストリングの最大文字数 (セル数 72*72*8 あれば良い) #define MAX_WEIGHT 255 // 重みの最大値 (8ビットで収まる) #define BOARDSTR_SIZE 41472 // ボードストリングの最大文字数 (セル数 72*72*8 あれば良い) void lfsr_random_init(ap_uint<32> seed); Loading