instruction
stringlengths
139
357k
response
stringlengths
36
4.54k
buggy_type
stringclasses
745 values
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void xor_gate ( bool a, bool b, bool& out, bool clk ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=a #pragma HLS INTE...
The wrong part of the code is: for(int i=0; i<4; i++) { xor1_out = a_reg ^ b_reg; xor2_out = a ^ b_reg; a_reg = a; b_reg = b; out = xor1_out; } The right code snippet is: // No suitable code snippet to replace
'BUF'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void xor_gate ( bool a, bool b, bool& out, bool clk ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=a #pragma HLS INTERFACE...
The right code snippet is: // No suitable code snippet to replace
'BUF'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` void xor_gate ( bool a, bool b, bool& out, bool clk ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=a #prag...
The wrong part of the code is: for(int i=0; i<4; i++) { xor1_out = a_reg ^ b_reg; xor2_out = a ^ b_reg; a_reg = a; b_reg = b; out = xor1_out; } The high-level-synthesis bug type of the code is: 'BUF'
'BUF'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ``` void xor_gate ( bool a, bool b, bool& out, bool clk ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragm...
The wrong part of the code is: for(int i=0; i<4; i++) { xor1_out = a_reg ^ b_reg; xor2_out = a ^ b_reg; a_reg = a; b_reg = b; out = xor1_out; } The high-level-synthesis bug type of the code is: 'BUF' The right code snippet is: // No suitable code snippet to replace
'BUF'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void xor_gate ( bool a, bool b, bool& out, bool clk ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=a #pragma HLS INTE...
The wrong part of the code is: #pragma HLS array_partition variable=a complete dim=1 The right code snippet is: // No suitable code snippet to replace
'APT'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void xor_gate ( bool a, bool b, bool& out, bool clk ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=a #pragma HLS INTERFACE...
The right code snippet is: // No suitable code snippet to replace
'APT'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` void xor_gate ( bool a, bool b, bool& out, bool clk ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=a #prag...
The wrong part of the code is: #pragma HLS array_partition variable=a complete dim=1 The high-level-synthesis bug type of the code is: 'APT'
'APT'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ``` void xor_gate ( bool a, bool b, bool& out, bool clk ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragm...
The wrong part of the code is: #pragma HLS array_partition variable=a complete dim=1 The high-level-synthesis bug type of the code is: 'APT' The right code snippet is: // No suitable code snippet to replace
'APT'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void xor_gate ( bool a, bool b, bool& out, bool clk ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=a #pragma HLS INTE...
The wrong part of the code is: #pragma HLS array_partition variable=a complete factor=3 The right code snippet is: // No suitable code snippet to replace
'FND'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void xor_gate ( bool a, bool b, bool& out, bool clk ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=a #pragma HLS INTERFACE...
The right code snippet is: // No suitable code snippet to replace
'FND'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` void xor_gate ( bool a, bool b, bool& out, bool clk ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=a #prag...
The wrong part of the code is: #pragma HLS array_partition variable=a complete factor=3 The high-level-synthesis bug type of the code is: 'FND'
'FND'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ``` void xor_gate ( bool a, bool b, bool& out, bool clk ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragm...
The wrong part of the code is: #pragma HLS array_partition variable=a complete factor=3 The high-level-synthesis bug type of the code is: 'FND' The right code snippet is: // No suitable code snippet to replace
'FND'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void xor_gate ( bool a, bool b, bool& out, bool clk ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=a #pragma HLS INTE...
The wrong part of the code is: #pragma HLS array_partition variable=a complete dim=2 The right code snippet is: // No suitable code snippet to replace
'DID'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void xor_gate ( bool a, bool b, bool& out, bool clk ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=a #pragma HLS INTERFACE...
The right code snippet is: // No suitable code snippet to replace
'DID'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` void xor_gate ( bool a, bool b, bool& out, bool clk ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=a #prag...
The wrong part of the code is: #pragma HLS array_partition variable=a complete dim=2 The high-level-synthesis bug type of the code is: 'DID'
'DID'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ``` void xor_gate ( bool a, bool b, bool& out, bool clk ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragm...
The wrong part of the code is: #pragma HLS array_partition variable=a complete dim=2 The high-level-synthesis bug type of the code is: 'DID' The right code snippet is: // No suitable code snippet to replace
'DID'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void xor_gate ( bool a, bool b, bool& out, bool clk ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=a #pragma HLS INTE...
The wrong part of the code is: #pragma HLS dataflow The right code snippet is: // No suitable code snippet to replace
'DFP'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void xor_gate ( bool a, bool b, bool& out, bool clk ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=a #pragma HLS INTERFACE...
The right code snippet is: // No suitable code snippet to replace
'DFP'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` void xor_gate ( bool a, bool b, bool& out, bool clk ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=a #prag...
The wrong part of the code is: #pragma HLS dataflow The high-level-synthesis bug type of the code is: 'DFP'
'DFP'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ``` void xor_gate ( bool a, bool b, bool& out, bool clk ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragm...
The wrong part of the code is: #pragma HLS dataflow The high-level-synthesis bug type of the code is: 'DFP' The right code snippet is: // No suitable code snippet to replace
'DFP'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void xor_gate ( bool a, bool b, bool& out, bool clk ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=a #pragma HLS INTE...
The wrong part of the code is: #pragma HLS interface ap_vld port=out The right code snippet is: // No suitable code snippet to replace
'IDAP'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void xor_gate ( bool a, bool b, bool& out, bool clk ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=a #pragma HLS INTERFACE...
The right code snippet is: // No suitable code snippet to replace
'IDAP'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` void xor_gate ( bool a, bool b, bool& out, bool clk ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=a #prag...
The wrong part of the code is: #pragma HLS interface ap_vld port=out The high-level-synthesis bug type of the code is: 'IDAP'
'IDAP'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ``` void xor_gate ( bool a, bool b, bool& out, bool clk ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragm...
The wrong part of the code is: #pragma HLS interface ap_vld port=out The high-level-synthesis bug type of the code is: 'IDAP' The right code snippet is: // No suitable code snippet to replace
'IDAP'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void xor_gate ( bool a, bool b, bool& out, bool clk ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=a #pragma HLS INTE...
The wrong part of the code is: #pragma HLS interface m_axi port=out The right code snippet is: // No suitable code snippet to replace
'RAMB'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void xor_gate ( bool a, bool b, bool& out, bool clk ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=a #pragma HLS INTERFACE...
The right code snippet is: // No suitable code snippet to replace
'RAMB'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` void xor_gate ( bool a, bool b, bool& out, bool clk ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=a #prag...
The wrong part of the code is: #pragma HLS interface m_axi port=out The high-level-synthesis bug type of the code is: 'RAMB'
'RAMB'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ``` void xor_gate ( bool a, bool b, bool& out, bool clk ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragm...
The wrong part of the code is: #pragma HLS interface m_axi port=out The high-level-synthesis bug type of the code is: 'RAMB' The right code snippet is: // No suitable code snippet to replace
'RAMB'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void xor_gate ( bool a, bool b, bool& out, bool clk ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=a #pragma HLS INTE...
The wrong part of the code is: #pragma HLS interface bram port=out The right code snippet is: // No suitable code snippet to replace
'SMA'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void xor_gate ( bool a, bool b, bool& out, bool clk ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=a #pragma HLS INTERFACE...
The right code snippet is: // No suitable code snippet to replace
'SMA'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` void xor_gate ( bool a, bool b, bool& out, bool clk ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=a #prag...
The wrong part of the code is: #pragma HLS interface bram port=out The high-level-synthesis bug type of the code is: 'SMA'
'SMA'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ``` void xor_gate ( bool a, bool b, bool& out, bool clk ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragm...
The wrong part of the code is: #pragma HLS interface bram port=out The high-level-synthesis bug type of the code is: 'SMA' The right code snippet is: // No suitable code snippet to replace
'SMA'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void xor_gate ( bool a, bool b, bool& out, bool clk ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=a #pragma HLS INTE...
The wrong part of the code is: #pragma HLS interface ap_none port=a The right code snippet is: // No suitable code snippet to replace
'AMS'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void xor_gate ( bool a, bool b, bool& out, bool clk ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=a #pragma HLS INTERFACE...
The right code snippet is: // No suitable code snippet to replace
'AMS'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` void xor_gate ( bool a, bool b, bool& out, bool clk ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=a #prag...
The wrong part of the code is: #pragma HLS interface ap_none port=a The high-level-synthesis bug type of the code is: 'AMS'
'AMS'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ``` void xor_gate ( bool a, bool b, bool& out, bool clk ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragm...
The wrong part of the code is: #pragma HLS interface ap_none port=a The high-level-synthesis bug type of the code is: 'AMS' The right code snippet is: // No suitable code snippet to replace
'AMS'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void xor_gate ( bool a, bool b, bool& out, bool clk ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=a #pragma HLS INTE...
The wrong part of the code is: #pragma HLS pipeline II=2 The right code snippet is: // No suitable code snippet to replace
'MLP'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void xor_gate ( bool a, bool b, bool& out, bool clk ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=a #pragma HLS INTERFACE...
The right code snippet is: // No suitable code snippet to replace
'MLP'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` void xor_gate ( bool a, bool b, bool& out, bool clk ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=a #prag...
The wrong part of the code is: #pragma HLS pipeline II=2 The high-level-synthesis bug type of the code is: 'MLP'
'MLP'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ``` void xor_gate ( bool a, bool b, bool& out, bool clk ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragm...
The wrong part of the code is: #pragma HLS pipeline II=2 The high-level-synthesis bug type of the code is: 'MLP' The right code snippet is: // No suitable code snippet to replace
'MLP'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void xor_gate ( bool a, bool b, bool& out, bool clk ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=a #pragma HLS INTE...
The wrong part of the code is: #pragma HLS unroll factor=2 inner_loop=1 The right code snippet is: // No suitable code snippet to replace
'ILNU'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void xor_gate ( bool a, bool b, bool& out, bool clk ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=a #pragma HLS INTERFACE...
The right code snippet is: // No suitable code snippet to replace
'ILNU'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` void xor_gate ( bool a, bool b, bool& out, bool clk ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE axis port=a #prag...
The wrong part of the code is: #pragma HLS unroll factor=2 inner_loop=1 The high-level-synthesis bug type of the code is: 'ILNU'
'ILNU'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ``` void xor_gate ( bool a, bool b, bool& out, bool clk ) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragm...
The wrong part of the code is: #pragma HLS unroll factor=2 inner_loop=1 The high-level-synthesis bug type of the code is: 'ILNU' The right code snippet is: // No suitable code snippet to replace
'ILNU'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #include <ap_fixed.h> #include <ap_int.h> typedef ap_uint<64> uint64; typedef ap_int<64> int64; typedef ap_uint<32> uint32; typedef ap_int<32> int32; void distance(uint64 citya, uint...
The wrong part of the code is: static bool sqrt_inp_valid_q, sqrt_inp_valid_d; static int32 sqrt_inp_q; ap_fixed<16, 1> sqrt_out; bool sqrt_out_valid; The right code snippet is: static bool sqrt_inp_valid_q, sqrt_inp_valid_d; static int32 sqrt_inp_q, sqrt_inp_d; ap_fixed<16, 1> sqrt_out; bool sqrt_out_...
'INIT'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include <ap_fixed.h> #include <ap_int.h> typedef ap_uint<64> uint64; typedef ap_int<64> int64; typedef ap_uint<32> uint32; typedef ap_int<32> int32; void distance(uint64 citya, uint64 ci...
The right code snippet is: static bool sqrt_inp_valid_q, sqrt_inp_valid_d; static int32 sqrt_inp_q, sqrt_inp_d; ap_fixed<16, 1> sqrt_out; bool sqrt_out_valid;
'INIT'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #include <ap_fixed.h> #include <ap_int.h> typedef ap_uint<64> uint64; typedef ap_int<64> int64; typedef ap_uint<32> uint32; typedef ap_int<32> int32; void distance(uint64 ...
The wrong part of the code is: static bool sqrt_inp_valid_q, sqrt_inp_valid_d; static int32 sqrt_inp_q; ap_fixed<16, 1> sqrt_out; bool sqrt_out_valid; The high-level-synthesis bug type of the code is: 'INIT'
'INIT'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #include <ap_fixed.h> #include <ap_int.h> typedef ap_uint<64> uint64; typedef ap_int<64> int64; typedef ap_uint<32> uint32; typedef ap_...
The wrong part of the code is: static bool sqrt_inp_valid_q, sqrt_inp_valid_d; static int32 sqrt_inp_q; ap_fixed<16, 1> sqrt_out; bool sqrt_out_valid; The high-level-synthesis bug type of the code is: 'INIT' The right code snippet is: static bool sqrt_inp_valid_q, sqrt_inp_valid_d; static int32 sqr...
'INIT'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #include <ap_fixed.h> #include <ap_int.h> typedef ap_uint<64> uint64; typedef ap_int<64> int64; typedef ap_uint<32> uint32; typedef ap_int<32> int32; void distance(uint64 citya, uint...
The wrong part of the code is: dx_d = dx_q; dy_d = dy_q; sqrt_inp_valid_d = 0; sqrt_inp_d = sqrt_inp_q[100]; dx_valid_d = 0; The right code snippet is: dx_d = dx_q; dy_d = dy_q; sqrt_inp_valid_d = 0; sqrt_inp_d = sqrt_inp_q; dx_valid_d = 0;
'OOB'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include <ap_fixed.h> #include <ap_int.h> typedef ap_uint<64> uint64; typedef ap_int<64> int64; typedef ap_uint<32> uint32; typedef ap_int<32> int32; void distance(uint64 citya, uint64 ci...
The right code snippet is: dx_d = dx_q; dy_d = dy_q; sqrt_inp_valid_d = 0; sqrt_inp_d = sqrt_inp_q; dx_valid_d = 0;
'OOB'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #include <ap_fixed.h> #include <ap_int.h> typedef ap_uint<64> uint64; typedef ap_int<64> int64; typedef ap_uint<32> uint32; typedef ap_int<32> int32; void distance(uint64 ...
The wrong part of the code is: dx_d = dx_q; dy_d = dy_q; sqrt_inp_valid_d = 0; sqrt_inp_d = sqrt_inp_q[100]; dx_valid_d = 0; The high-level-synthesis bug type of the code is: 'OOB'
'OOB'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #include <ap_fixed.h> #include <ap_int.h> typedef ap_uint<64> uint64; typedef ap_int<64> int64; typedef ap_uint<32> uint32; typedef ap_...
The wrong part of the code is: dx_d = dx_q; dy_d = dy_q; sqrt_inp_valid_d = 0; sqrt_inp_d = sqrt_inp_q[100]; dx_valid_d = 0; The high-level-synthesis bug type of the code is: 'OOB' The right code snippet is: dx_d = dx_q; dy_d = dy_q; sqrt_inp_valid_d = 0; sqrt_inp_d = sqrt_inp_q; dx_valid_d = 0;
'OOB'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #include <ap_fixed.h> #include <ap_int.h> typedef ap_uint<64> uint64; typedef ap_int<64> int64; typedef ap_uint<32> uint32; typedef ap_int<32> int32; void distance(uint64 citya, uint...
The wrong part of the code is: if (inp_valid) { dx_d = cityb(31,0)-citya(31,0); dy_d = cityb(63,32)-citya(63,32); while(1){ //infinite loop } dx_valid_d = 1; } The right code snippet is: if (inp_valid) { dx_d = cityb(31,0)-citya(31,0); dy_d = cityb(63,32)-citya(63,32...
'INF'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include <ap_fixed.h> #include <ap_int.h> typedef ap_uint<64> uint64; typedef ap_int<64> int64; typedef ap_uint<32> uint32; typedef ap_int<32> int32; void distance(uint64 citya, uint64 ci...
The right code snippet is: if (inp_valid) { dx_d = cityb(31,0)-citya(31,0); dy_d = cityb(63,32)-citya(63,32); dx_valid_d = 1; }
'INF'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #include <ap_fixed.h> #include <ap_int.h> typedef ap_uint<64> uint64; typedef ap_int<64> int64; typedef ap_uint<32> uint32; typedef ap_int<32> int32; void distance(uint64 ...
The wrong part of the code is: if (inp_valid) { dx_d = cityb(31,0)-citya(31,0); dy_d = cityb(63,32)-citya(63,32); while(1){ //infinite loop } dx_valid_d = 1; } The high-level-synthesis bug type of the code is: 'INF'
'INF'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #include <ap_fixed.h> #include <ap_int.h> typedef ap_uint<64> uint64; typedef ap_int<64> int64; typedef ap_uint<32> uint32; typedef ap_...
The wrong part of the code is: if (inp_valid) { dx_d = cityb(31,0)-citya(31,0); dy_d = cityb(63,32)-citya(63,32); while(1){ //infinite loop } dx_valid_d = 1; } The high-level-synthesis bug type of the code is: 'INF' The right code snippet is: if (inp_valid) { dx_d = ...
'INF'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #include <ap_fixed.h> #include <ap_int.h> typedef ap_uint<64> uint64; typedef ap_int<64> int64; typedef ap_uint<32> uint32; typedef ap_int<32> int32; void distance(uint64 citya, uint...
The wrong part of the code is: static int32 dx_q, dx_d, dy_q, dy_d; static bool dx_valid_q, dx_valid_d; int32 temp = dx_d; dx_d = (temp << 32) >> 32; dx_valid_d = dx_valid_q; The right code snippet is: static int32 dx_q, dx_d, dy_q, dy_d; static bool dx_valid_q, dx_valid_d;
'USE'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include <ap_fixed.h> #include <ap_int.h> typedef ap_uint<64> uint64; typedef ap_int<64> int64; typedef ap_uint<32> uint32; typedef ap_int<32> int32; void distance(uint64 citya, uint64 ci...
The right code snippet is: static int32 dx_q, dx_d, dy_q, dy_d; static bool dx_valid_q, dx_valid_d;
'USE'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #include <ap_fixed.h> #include <ap_int.h> typedef ap_uint<64> uint64; typedef ap_int<64> int64; typedef ap_uint<32> uint32; typedef ap_int<32> int32; void distance(uint64 ...
The wrong part of the code is: static int32 dx_q, dx_d, dy_q, dy_d; static bool dx_valid_q, dx_valid_d; int32 temp = dx_d; dx_d = (temp << 32) >> 32; dx_valid_d = dx_valid_q; The high-level-synthesis bug type of the code is: 'USE'
'USE'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #include <ap_fixed.h> #include <ap_int.h> typedef ap_uint<64> uint64; typedef ap_int<64> int64; typedef ap_uint<32> uint32; typedef ap_...
The wrong part of the code is: static int32 dx_q, dx_d, dy_q, dy_d; static bool dx_valid_q, dx_valid_d; int32 temp = dx_d; dx_d = (temp << 32) >> 32; dx_valid_d = dx_valid_q; The high-level-synthesis bug type of the code is: 'USE' The right code snippet is: static int32 dx_q, dx_d, dy_q, dy_d; stat...
'USE'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #include <ap_fixed.h> #include <ap_int.h> typedef ap_uint<64> uint64; typedef ap_int<64> int64; typedef ap_uint<32> uint32; typedef ap_int<32> int32; void distance(uint64 citya, uint...
The wrong part of the code is: sqrt_inp_d = dx_q*dx_q + dy_q*dy_q << 100; The right code snippet is: sqrt_inp_d = dx_q*dx_q + dy_q*dy_q;
'SHFT'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include <ap_fixed.h> #include <ap_int.h> typedef ap_uint<64> uint64; typedef ap_int<64> int64; typedef ap_uint<32> uint32; typedef ap_int<32> int32; void distance(uint64 citya, uint64 ci...
The right code snippet is: sqrt_inp_d = dx_q*dx_q + dy_q*dy_q;
'SHFT'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #include <ap_fixed.h> #include <ap_int.h> typedef ap_uint<64> uint64; typedef ap_int<64> int64; typedef ap_uint<32> uint32; typedef ap_int<32> int32; void distance(uint64 ...
The wrong part of the code is: sqrt_inp_d = dx_q*dx_q + dy_q*dy_q << 100; The high-level-synthesis bug type of the code is: 'SHFT'
'SHFT'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #include <ap_fixed.h> #include <ap_int.h> typedef ap_uint<64> uint64; typedef ap_int<64> int64; typedef ap_uint<32> uint32; typedef ap_...
The wrong part of the code is: sqrt_inp_d = dx_q*dx_q + dy_q*dy_q << 100; The high-level-synthesis bug type of the code is: 'SHFT' The right code snippet is: sqrt_inp_d = dx_q*dx_q + dy_q*dy_q;
'SHFT'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #include <ap_fixed.h> #include <ap_int.h> typedef ap_uint<64> uint64; typedef ap_int<64> int64; typedef ap_uint<32> uint32; typedef ap_int<32> int32; void distance(uint64 citya, uint...
The wrong part of the code is: dx_q = dx_d; dy_q = dy_d; sqrt_inp_q = sqrt_inp_d; sqrt_inp_valid_q = sqrt_inp_valid_d; dx_valid_q = dx_valid_d + 1; The right code snippet is: dx_q = dx_d; dy_q = dy_d; sqrt_inp_q = sqrt_inp_d; sqrt_inp_valid_q = sqrt_inp_valid_d; dx_valid_q = dx_valid_d;
'BUF'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include <ap_fixed.h> #include <ap_int.h> typedef ap_uint<64> uint64; typedef ap_int<64> int64; typedef ap_uint<32> uint32; typedef ap_int<32> int32; void distance(uint64 citya, uint64 ci...
The right code snippet is: dx_q = dx_d; dy_q = dy_d; sqrt_inp_q = sqrt_inp_d; sqrt_inp_valid_q = sqrt_inp_valid_d; dx_valid_q = dx_valid_d;
'BUF'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #include <ap_fixed.h> #include <ap_int.h> typedef ap_uint<64> uint64; typedef ap_int<64> int64; typedef ap_uint<32> uint32; typedef ap_int<32> int32; void distance(uint64 ...
The wrong part of the code is: dx_q = dx_d; dy_q = dy_d; sqrt_inp_q = sqrt_inp_d; sqrt_inp_valid_q = sqrt_inp_valid_d; dx_valid_q = dx_valid_d + 1; The high-level-synthesis bug type of the code is: 'BUF'
'BUF'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #include <ap_fixed.h> #include <ap_int.h> typedef ap_uint<64> uint64; typedef ap_int<64> int64; typedef ap_uint<32> uint32; typedef ap_...
The wrong part of the code is: dx_q = dx_d; dy_q = dy_d; sqrt_inp_q = sqrt_inp_d; sqrt_inp_valid_q = sqrt_inp_valid_d; dx_valid_q = dx_valid_d + 1; The high-level-synthesis bug type of the code is: 'BUF' The right code snippet is: dx_q = dx_d; dy_q = dy_d; sqrt_inp_q = sqrt_inp_d; sqrt_inp_valid_q ...
'BUF'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #include <ap_fixed.h> #include <ap_int.h> typedef ap_uint<64> uint64; typedef ap_int<64> int64; typedef ap_uint<32> uint32; typedef ap_int<32> int32; void distance(uint64 citya, uint...
The wrong part of the code is: #pragma HLS pipeline II=2 dx_d = dx_q; dy_d = dy_q; sqrt_inp_valid_d = 0; sqrt_inp_d = sqrt_inp_q; dx_valid_d = 0; The right code snippet is: dx_d = dx_q; dy_d = dy_q; sqrt_inp_valid_d = 0; sqrt_inp_d = sqrt_inp_q; dx_valid_d = 0;
'MLP'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include <ap_fixed.h> #include <ap_int.h> typedef ap_uint<64> uint64; typedef ap_int<64> int64; typedef ap_uint<32> uint32; typedef ap_int<32> int32; void distance(uint64 citya, uint64 ci...
The right code snippet is: dx_d = dx_q; dy_d = dy_q; sqrt_inp_valid_d = 0; sqrt_inp_d = sqrt_inp_q; dx_valid_d = 0;
'MLP'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #include <ap_fixed.h> #include <ap_int.h> typedef ap_uint<64> uint64; typedef ap_int<64> int64; typedef ap_uint<32> uint32; typedef ap_int<32> int32; void distance(uint64 ...
The wrong part of the code is: #pragma HLS pipeline II=2 dx_d = dx_q; dy_d = dy_q; sqrt_inp_valid_d = 0; sqrt_inp_d = sqrt_inp_q; dx_valid_d = 0; The high-level-synthesis bug type of the code is: 'MLP'
'MLP'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #include <ap_fixed.h> #include <ap_int.h> typedef ap_uint<64> uint64; typedef ap_int<64> int64; typedef ap_uint<32> uint32; typedef ap_...
The wrong part of the code is: #pragma HLS pipeline II=2 dx_d = dx_q; dy_d = dy_q; sqrt_inp_valid_d = 0; sqrt_inp_d = sqrt_inp_q; dx_valid_d = 0; The high-level-synthesis bug type of the code is: 'MLP' The right code snippet is: dx_d = dx_q; dy_d = dy_q; sqrt_inp_valid_d = 0; sqrt_inp_d = sqrt_inp_...
'MLP'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: #include <ap_fixed.h> #include <ap_int.h> typedef ap_uint<64> uint64; typedef ap_int<64> int64; typedef ap_uint<32> uint32; typedef ap_int<32> int32; void distance(uint64 citya, uint...
The wrong part of the code is: #pragma HLS unroll factor=2 dx_d = dx_q; dy_d = dy_q; sqrt_inp_valid_d = 0; sqrt_inp_d = sqrt_inp_q; dx_valid_d = 0; The right code snippet is: dx_d = dx_q; dy_d = dy_q; sqrt_inp_valid_d = 0; sqrt_inp_d = sqrt_inp_q; dx_valid_d = 0;
'ILNU'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: #include <ap_fixed.h> #include <ap_int.h> typedef ap_uint<64> uint64; typedef ap_int<64> int64; typedef ap_uint<32> uint32; typedef ap_int<32> int32; void distance(uint64 citya, uint64 ci...
The right code snippet is: dx_d = dx_q; dy_d = dy_q; sqrt_inp_valid_d = 0; sqrt_inp_d = sqrt_inp_q; dx_valid_d = 0;
'ILNU'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: #include <ap_fixed.h> #include <ap_int.h> typedef ap_uint<64> uint64; typedef ap_int<64> int64; typedef ap_uint<32> uint32; typedef ap_int<32> int32; void distance(uint64 ...
The wrong part of the code is: #pragma HLS unroll factor=2 dx_d = dx_q; dy_d = dy_q; sqrt_inp_valid_d = 0; sqrt_inp_d = sqrt_inp_q; dx_valid_d = 0; The high-level-synthesis bug type of the code is: 'ILNU'
'ILNU'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: #include <ap_fixed.h> #include <ap_int.h> typedef ap_uint<64> uint64; typedef ap_int<64> int64; typedef ap_uint<32> uint32; typedef ap_...
The wrong part of the code is: #pragma HLS unroll factor=2 dx_d = dx_q; dy_d = dy_q; sqrt_inp_valid_d = 0; sqrt_inp_d = sqrt_inp_q; dx_valid_d = 0; The high-level-synthesis bug type of the code is: 'ILNU' The right code snippet is: dx_d = dx_q; dy_d = dy_q; sqrt_inp_valid_d = 0; sqrt_inp_d = sqrt_i...
'ILNU'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void counter(bool clk, bool reset, bool enable, ap_uint<4>& count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=clk #pragma HLS INTERFACE ap_...
The wrong part of the code is: count_reg[5] = 0; The right code snippet is: count_reg[count_reg] = 0;
'OOB'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void counter(bool clk, bool reset, bool enable, ap_uint<4>& count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=clk #pragma HLS INTERFACE ap_none ...
The right code snippet is: count_reg[count_reg] = 0;
'OOB'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` void counter(bool clk, bool reset, bool enable, ap_uint<4>& count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=clk #pragma HLS IN...
The wrong part of the code is: count_reg[5] = 0; The high-level-synthesis bug type of the code is: 'OOB'
'OOB'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ``` void counter(bool clk, bool reset, bool enable, ap_uint<4>& count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTE...
The wrong part of the code is: count_reg[5] = 0; The high-level-synthesis bug type of the code is: 'OOB' The right code snippet is: count_reg[count_reg] = 0;
'OOB'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void counter(bool clk, bool reset, bool enable, ap_uint<4>& count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=clk #pragma HLS INTERFACE ap_...
The wrong part of the code is: static ap_uint<4> count_reg; The right code snippet is: static ap_uint<4> count_reg = 0;
'INIT'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void counter(bool clk, bool reset, bool enable, ap_uint<4>& count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=clk #pragma HLS INTERFACE ap_none ...
The right code snippet is: static ap_uint<4> count_reg = 0;
'INIT'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` void counter(bool clk, bool reset, bool enable, ap_uint<4>& count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=clk #pragma HLS IN...
The wrong part of the code is: static ap_uint<4> count_reg; The high-level-synthesis bug type of the code is: 'INIT'
'INIT'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ``` void counter(bool clk, bool reset, bool enable, ap_uint<4>& count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTE...
The wrong part of the code is: static ap_uint<4> count_reg; The high-level-synthesis bug type of the code is: 'INIT' The right code snippet is: static ap_uint<4> count_reg = 0;
'INIT'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void counter(bool clk, bool reset, bool enable, ap_uint<4>& count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=clk #pragma HLS INTERFACE ap_...
The wrong part of the code is: count_reg = count_reg << 6; The right code snippet is: count_reg = count_reg << 2;
'SHFT'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void counter(bool clk, bool reset, bool enable, ap_uint<4>& count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=clk #pragma HLS INTERFACE ap_none ...
The right code snippet is: count_reg = count_reg << 2;
'SHFT'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` void counter(bool clk, bool reset, bool enable, ap_uint<4>& count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=clk #pragma HLS IN...
The wrong part of the code is: count_reg = count_reg << 6; The high-level-synthesis bug type of the code is: 'SHFT'
'SHFT'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ``` void counter(bool clk, bool reset, bool enable, ap_uint<4>& count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTE...
The wrong part of the code is: count_reg = count_reg << 6; The high-level-synthesis bug type of the code is: 'SHFT' The right code snippet is: count_reg = count_reg << 2;
'SHFT'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void counter(bool clk, bool reset, bool enable, ap_uint<4>& count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=clk #pragma HLS INTERFACE ap_...
The wrong part of the code is: while(count_reg < 10) { count_reg = count_reg + 1; } The right code snippet is: while(1) { count_reg = count_reg + 1; }
'INF'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void counter(bool clk, bool reset, bool enable, ap_uint<4>& count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=clk #pragma HLS INTERFACE ap_none ...
The right code snippet is: while(1) { count_reg = count_reg + 1; }
'INF'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` void counter(bool clk, bool reset, bool enable, ap_uint<4>& count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=clk #pragma HLS IN...
The wrong part of the code is: while(count_reg < 10) { count_reg = count_reg + 1; } The high-level-synthesis bug type of the code is: 'INF'
'INF'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ``` void counter(bool clk, bool reset, bool enable, ap_uint<4>& count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTE...
The wrong part of the code is: while(count_reg < 10) { count_reg = count_reg + 1; } The high-level-synthesis bug type of the code is: 'INF' The right code snippet is: while(1) { count_reg = count_reg + 1; }
'INF'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void counter(bool clk, bool reset, bool enable, ap_uint<4>& count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=clk #pragma HLS INTERFACE ap_...
The wrong part of the code is: ap_uint<8> temp = 255; bool flag = temp; The right code snippet is: ap_uint<8> temp = 255; bool flag = temp[7];
'USE'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void counter(bool clk, bool reset, bool enable, ap_uint<4>& count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=clk #pragma HLS INTERFACE ap_none ...
The right code snippet is: ap_uint<8> temp = 255; bool flag = temp[7];
'USE'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` void counter(bool clk, bool reset, bool enable, ap_uint<4>& count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=clk #pragma HLS IN...
The wrong part of the code is: ap_uint<8> temp = 255; bool flag = temp; The high-level-synthesis bug type of the code is: 'USE'
'USE'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ``` void counter(bool clk, bool reset, bool enable, ap_uint<4>& count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTE...
The wrong part of the code is: ap_uint<8> temp = 255; bool flag = temp; The high-level-synthesis bug type of the code is: 'USE' The right code snippet is: ap_uint<8> temp = 255; bool flag = temp[7];
'USE'
Given the following buggy code, tell which part of the code is wrong, and tell the right code snippet The buggy code is: ``` void counter(bool clk, bool reset, bool enable, ap_uint<4>& count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=clk #pragma HLS INTERFACE ap_...
The wrong part of the code is: for (int i = 0; i < 3; i++) { #pragma HLS UNROLL count_reg = count_reg + 1; } The right code snippet is: for (int i = 0; i < 4; i++) { #pragma HLS UNROLL count_reg = count_reg + 1; }
'MLU'
Given the following buggy code, and the wrong part of the code, generate the right code snippet: The buggy code is: ``` void counter(bool clk, bool reset, bool enable, ap_uint<4>& count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=clk #pragma HLS INTERFACE ap_none ...
The right code snippet is: for (int i = 0; i < 4; i++) { #pragma HLS UNROLL count_reg = count_reg + 1; }
'MLU'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type The buggy code is: ``` void counter(bool clk, bool reset, bool enable, ap_uint<4>& count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTERFACE ap_none port=clk #pragma HLS IN...
The wrong part of the code is: for (int i = 0; i < 3; i++) { #pragma HLS UNROLL count_reg = count_reg + 1; } The high-level-synthesis bug type of the code is: 'MLU'
'MLU'
Given the following buggy code, tell which part of the code is wrong, and tell the high-level-synthesis bug type, and tell the right code snippet The buggy code is: ``` void counter(bool clk, bool reset, bool enable, ap_uint<4>& count) { #pragma HLS INTERFACE ap_ctrl_none port=return #pragma HLS INTE...
The wrong part of the code is: for (int i = 0; i < 3; i++) { #pragma HLS UNROLL count_reg = count_reg + 1; } The high-level-synthesis bug type of the code is: 'MLU' The right code snippet is: for (int i = 0; i < 4; i++) { #pragma HLS UNROLL count_reg = count_reg + 1; }
'MLU'