Hello,
I am back with my errors and confusions, Well, I have written one matrix to matrix multiplication code, I am trying to run on simulator and While doing this I am having some doubts. Please go through the attachment for my code. My doubts are as follows:
1.
int main()
{
int x, y, i, j, k, tr;
long A[N][N], B[N][N], C[N][N];
In this way, if I define N >15, then on running on individual or group of cores, it hangs, I mean I am not getting any output on console. For N<= 15, it works fine.
But, If i do like this:
long A[N][N], B[N][N], C[N][N];
int main()
{
int x, y, i, j, k, tr;
In this way, it runs for N=1000, and for N>1000 it gives me some error about size of L2SRAM, which makes sense.
I am wondering why this is actually happens? What I think is may be under function main, it goes on some stack whose size may be small, which is not the case while defining it
above the main function.
2. Now, I was trying to optimize my code by changing compiler options , like optimization level I have selected 3, I have checked program mode compilation and I have also
disable software pipelining, but on building, I am getting something like this error:
**** Build of configuration Debug for project matmul ****
D:\ti\ccsv5\utils\bin\gmake -k all
'Invoking: C6000 Compiler'
"D:/ti/ccsv5/tools/compiler/c6000/bin/cl6x" -mv6600 -g -O3 -ms3 --program_level_compile --include_path="D:/ti/ccsv5/tools/compiler/c6000/include" --display_error_number --diag_warning=225 --big_endian --disable_software_pipeline --profile:power --abi=eabi --opt_for_speed=5 --cmd_file="./configPkg/compiler.opt" "../2d.c"
"../2d.c", line 15: warning #179-D: variable "tr" was declared but never referenced
<Optimizing>
<Generating>
<Assembling>
'Finished building: 2d.obj'
' '
'Building target: matmul.out'
'Invoking: C6000 Linker'
"D:/ti/ccsv5/tools/compiler/c6000/bin/cl6x" -mv6600 -g -O3 -ms3 --program_level_compile --display_error_number --diag_warning=225 --big_endian --disable_software_pipeline --profile:power --abi=eabi --opt_for_speed=5 -z -m"matmul.map" --warn_sections -i"D:/ti/ccsv5/tools/compiler/c6000/lib" -i"D:/ti/ccsv5/tools/compiler/c6000/include" --reread_libs --rom_model -o "matmul.out" -l"./configPkg/linker.cmd" "2d.obj" -l"libc.a"
<Linking>
fatal error #16001: object files have incompatible byte orderings ("2d.obj" =
big endian, "D:\Arun Mishra\workspace\matmul\Debug\configPkg\package\cfg\matmul_pe66.oe66" =little endian)
>> Compilation failure
gmake: *** [matmul.out] Error 1
gmake: Target `all' not remade because of errors.
**** Build Finished ****
What I am missing, Kindly help.
7180.matmul.pdf