Created
June 25, 2020 13:28
-
-
Save salehjg/9e61c07c567e056528d20d038cf2a505 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void myfunc( | |
int *inputTn1, | |
int *inputTn2, | |
int *outputTn, | |
int len) { | |
#pragma HLS INLINE | |
for(int idx=0; idx<len; idx++){ | |
#pragma HLS PIPELINE II=1 | |
outputTn[idx] = inputTn1[idx] + inputTn2[idx]; | |
} | |
} | |
extern "C" { | |
void topfunc( | |
int *inputTn1, | |
int *inputTn2, | |
int *outputTn, | |
int len) { | |
#pragma HLS INTERFACE m_axi port=inputTn1 offset=slave bundle=gmem1 max_read_burst_length=256 max_write_burst_length=256 | |
#pragma HLS INTERFACE s_axilite port=inputTn1 bundle=control | |
#pragma HLS INTERFACE m_axi port=inputTn2 offset=slave bundle=gmem2 max_read_burst_length=256 | |
#pragma HLS INTERFACE s_axilite port=inputTn2 bundle=control | |
#pragma HLS INTERFACE m_axi port=outputTn offset=slave bundle=gmem1 | |
#pragma HLS INTERFACE s_axilite port=outputTn bundle=control | |
#pragma HLS INTERFACE s_axilite port=len bundle=control | |
#pragma HLS INTERFACE s_axilite port=return bundle=control | |
myfunc(inputTn1, inputTn2, outputTn, len); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment