This is a piece of code in my Impulse C project :
CODE
co_uint8 imgPix[IMG_WIDTH * IMG_HEIGHT + 2];
double pca = 0.0;
double BaseMatrix[IMG_WIDTH * IMG_HEIGHT][PCA_NUM] = {...};
for (n=0; n<IMG_WIDTH * IMG_HEIGHT; n++)
{
//#pragma CO PIPELINE
pca += imgPix[n] * BaseMatrix[n][m];
}
double pca = 0.0;
double BaseMatrix[IMG_WIDTH * IMG_HEIGHT][PCA_NUM] = {...};
for (n=0; n<IMG_WIDTH * IMG_HEIGHT; n++)
{
//#pragma CO PIPELINE
pca += imgPix[n] * BaseMatrix[n][m];
}
During my hardware simulation(the simulation tool is ModelSim 6.1),I found that if "#pragma CO PIPELINE" is not used , the value of "pca" is totally correct, but if "#pragma CO PIPELINE" is used, the value of "pca" is just wrong!
I doubt that if it is because the different type of "imgPix" and "BaseMatrix", since "imgPix" is co_uint8 type and "BaseMatrix" is double type.
Thank you!
mmw119












