{"action":"created","issue":{"url":"https://api.github.com/repos/projectNe10/Ne10/issues/144","repository_url":"https://api.github.com/repos/projectNe10/Ne10","labels_url":"https://api.github.com/repos/projectNe10/Ne10/issues/144/labels{/name}","comments_url":"https://api.github.com/repos/projectNe10/Ne10/issues/144/comments","events_url":"https://api.github.com/repos/projectNe10/Ne10/issues/144/events","html_url":"https://github.com/projectNe10/Ne10/issues/144","id":191315357,"number":144,"title":"Bus error at FFT sizes other than 16","user":{"login":"twelti","id":1451176,"avatar_url":"https://avatars.githubusercontent.com/u/1451176?v=3","gravatar_id":"","url":"https://api.github.com/users/twelti","html_url":"https://github.com/twelti","followers_url":"https://api.github.com/users/twelti/followers","following_url":"https://api.github.com/users/twelti/following{/other_user}","gists_url":"https://api.github.com/users/twelti/gists{/gist_id}","starred_url":"https://api.github.com/users/twelti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/twelti/subscriptions","organizations_url":"https://api.github.com/users/twelti/orgs","repos_url":"https://api.github.com/users/twelti/repos","events_url":"https://api.github.com/users/twelti/events{/privacy}","received_events_url":"https://api.github.com/users/twelti/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":10,"created_at":"2016-11-23T16:10:04Z","updated_at":"2016-12-07T08:22:20Z","closed_at":null,"body":"Hi,\r\n\r\nI'm testing the NE10 library for an FFT application. I have modified the following line in NE10_sample_complex_fft.c:\r\n\r\n`#define SAMPLES 16`\r\n\r\nby setting SAMPLES to 32. I then build (cross-compile using `NE10_LINUX_TARGET_ARCH \"armv7\"`), upload the static binary to a Cyclone V with dual ARM A9 processor and run it.\r\n\r\nThe output will look like this:\r\n````\r\nroot@socfpga_cyclone5:~# ./NE10_test_static \r\n==== Ne10 Samples ===\r\n\r\n# Introduction\r\ntest_intro[test_add_dynamic]:\r\n\tne10_addc_float:\t4.200939 + 0.987757 = 5.188695\r\n\tne10_addc_float:\t1.971915 + 0.987757 = 2.959671\r\n\tne10_addc_float:\t3.915496 + 0.987757 = 4.903253\r\n\tne10_addc_float:\t3.992200 + 0.987757 = 4.979957\r\n\tne10_addc_float:\t4.558237 + 0.987757 = 5.545994\r\ntest_intro[test_add_static]:\r\n\tne10_addc_float_c:\t1.676114 + 3.144355 = 4.820468\r\n\tne10_addc_float_neon:\t1.676114 + 3.144355 = 4.820468\r\n\tne10_addc_float_c:\t3.841148 + 3.144355 = 6.985502\r\n\tne10_addc_float_neon:\t3.841148 + 3.144355 = 6.985502\r\n\tne10_addc_float_c:\t1.388874 + 3.144355 = 4.533228\r\n\tne10_addc_float_neon:\t1.388874 + 3.144355 = 4.533228\r\n\tne10_addc_float_c:\t2.769850 + 3.144355 = 5.914205\r\n\tne10_addc_float_neon:\t2.769850 + 3.144355 = 5.914205\r\n\tne10_addc_float_c:\t2.386985 + 3.144355 = 5.531340\r\n\tne10_addc_float_neon:\t2.386985 + 3.144355 = 5.531340\r\n\r\n# Matrix Multiply\r\n[  1.82  4.58  0.71     [  1.21  0.78  0.54     [  8.21 11.07 24.65\r\n   2.57  3.18  3.03   *    0.69  2.00  4.99   =   17.50 10.35 20.58\r\n   4.76  3.59  0.08 ]      4.02  0.65  1.09 ]      8.57 10.97 20.59 ]\r\n\r\n[  2.56  1.48  2.47     [  3.86  2.00  1.76     [ 23.29 15.23 21.84\r\n   4.20  3.19  4.86   *    2.63  4.46  4.04   =   43.30 29.50 42.62\r\n   3.06  2.62  1.46 ]      3.85  1.42  4.60 ]     24.35 19.89 22.71 ]\r\n\r\n[  0.35  0.43  4.45     [  0.10  1.19  4.25     [  2.42 22.58 14.07\r\n   4.75  0.96  1.74   *    2.29  4.85  1.33   =    3.22 18.19 26.18\r\n   2.63  3.32  0.32 ]      0.32  4.51  2.70 ]      7.95 20.67 16.48 ]\r\n\r\n\r\n# Complex-to-Complex FFT\r\nBus error\r\nroot@socfpga_cyclone5:~# \r\n````\r\n\r\nI was able to track down the error to somewhere inside `ne10_mixed_radix_fft_forward_float32_neon`.\r\n\r\nIs this a known problem, and are there any work-arounds?\r\n\r\nBest regards,\r\nTobias"},"comment":{"url":"https://api.github.com/repos/projectNe10/Ne10/issues/comments/265385149","html_url":"https://github.com/projectNe10/Ne10/issues/144#issuecomment-265385149","issue_url":"https://api.github.com/repos/projectNe10/Ne10/issues/144","id":265385149,"user":{"login":"twelti","id":1451176,"avatar_url":"https://avatars.githubusercontent.com/u/1451176?v=3","gravatar_id":"","url":"https://api.github.com/users/twelti","html_url":"https://github.com/twelti","followers_url":"https://api.github.com/users/twelti/followers","following_url":"https://api.github.com/users/twelti/following{/other_user}","gists_url":"https://api.github.com/users/twelti/gists{/gist_id}","starred_url":"https://api.github.com/users/twelti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/twelti/subscriptions","organizations_url":"https://api.github.com/users/twelti/orgs","repos_url":"https://api.github.com/users/twelti/repos","events_url":"https://api.github.com/users/twelti/events{/privacy}","received_events_url":"https://api.github.com/users/twelti/received_events","type":"User","site_admin":false},"created_at":"2016-12-07T08:22:20Z","updated_at":"2016-12-07T08:22:20Z","body":"No luck using `layout asm`, the `gdb` on my test system says `TUI mode not supported`. I listed the source code in `gdb`, but I'm not sure it will help a lot. \r\n\r\n```\r\n(gdb) s\r\nne10_mixed_radix_fft_forward_float32_neon () at /XXXXX/Ne10/modules/dsp/NE10_fft_float32.neon.s:471\r\n471\t        ldr             stage_count, [p_factors]   /* get factors[0]---stage_count */\r\n(gdb) list\r\n466\t\r\n467\tne10_mixed_radix_fft_forward_float32_neon:\r\n468\t        push            {r4-r12,lr}\r\n469\t        vpush           {q4-q7}\r\n470\t\r\n471\t        ldr             stage_count, [p_factors]   /* get factors[0]---stage_count */\r\n472\t        ldr             fstride, [p_factors, #4]   /* get factors[1]---fstride */\r\n473\t        add             p_factors, p_factors, stage_count, lsl #3 /* get the address of factors[2*stage_count] */\r\n474\t        ldr             radix, [p_factors]                         /* get factors[2*stage_count]--- the first radix */\r\n475\t        ldr             mstride, [p_factors, #-4]                  /* get factors[2*stage_count-1]--- mstride */\r\n(gdb) s\r\n472\t        ldr             fstride, [p_factors, #4]   /* get factors[1]---fstride */\r\n(gdb) s\r\n473\t        add             p_factors, p_factors, stage_count, lsl #3 /* get the address of factors[2*stage_count] */\r\n(gdb) s\r\n474\t        ldr             radix, [p_factors]                         /* get factors[2*stage_count]--- the first radix */\r\n(gdb) s\r\n475\t        ldr             mstride, [p_factors, #-4]                  /* get factors[2*stage_count-1]--- mstride */\r\n(gdb) s\r\n478\t        mov             p_out_ls, p_fout\r\n(gdb) s\r\n482\t        cmp             radix, #8\r\n(gdb) list\r\n477\t        /* save the output buffer for the last stage  */\r\n478\t        mov             p_out_ls, p_fout\r\n479\t\r\n480\t        /* ---------------the first stage---------------  */\r\n481\t        /* judge the radix is 4 or 8  */\r\n482\t        cmp             radix, #8\r\n483\t        beq             .L_ne10_radix8_butterfly_first_stage\r\n484\t\r\n485\t        /* ---------------first stage: radix 4  */\r\n486\t        mov             count, fstride\r\n(gdb) l\r\n487\t        mov             p_fin0, p_fin\r\n488\t        mov             p_tmp, p_fout\r\n489\t        add             p_fin2, p_fin0, fstride, lsl #4   /* get the address of F[fstride*2] */\r\n490\t        add             p_fin1, p_fin0, fstride, lsl #3   /* get the address of F[fstride] */\r\n491\t        add             p_fin3, p_fin2, fstride, lsl #3   /* get the address of F[fstride*3] */\r\n492\t        vld2.32         {q_in0_01}, [p_fin0:64]!\r\n493\t        vld2.32         {q_in2_01}, [p_fin2:64]!\r\n494\t        vld2.32         {q_in1_01}, [p_fin1:64]!\r\n495\t        vld2.32         {q_in3_01}, [p_fin3:64]!\r\n496\t\r\n(gdb) l\r\n497\t.L_ne10_radix4_butterfly_first_stage_fstride:\r\n498\t        BUTTERFLY4X2_WITHOUT_TWIDDLES \"FALSE\"\r\n499\t\r\n500\t        subs            count, count, #2\r\n501\t        bgt             .L_ne10_radix4_butterfly_first_stage_fstride\r\n502\t\r\n503\t        /* swap input/output buffer  */\r\n504\t        ldr             tmp0, [sp, #104]\r\n505\t        mov             p_fin, p_fout\r\n506\t        mov             p_fout, tmp0\r\n(gdb) s\r\n483\t        beq             .L_ne10_radix8_butterfly_first_stage\r\n(gdb) s\r\n520\t        mov             fstride1, fstride\r\n(gdb) s\r\n521\t        mov             p_in1, p_fin\r\n(gdb) s\r\n522\t        mov             p_out1, p_fout\r\n(gdb) l\r\n517\t\r\n518\t        /* ---------------first stage: radix 8  */\r\n519\t.L_ne10_radix8_butterfly_first_stage:\r\n520\t        mov             fstride1, fstride\r\n521\t        mov             p_in1, p_fin\r\n522\t        mov             p_out1, p_fout\r\n523\t        lsl             fstep, fstride, #3\r\n524\t\r\n525\t.L_ne10_radix8_butterfly_first_stage_fstride1:\r\n526\t        BUTTERFLY8X2_WITHOUT_TWIDDLES \"FALSE\"\r\n(gdb) l\r\n527\t\r\n528\t        subs            fstride1, fstride1, #2\r\n529\t        bgt             .L_ne10_radix8_butterfly_first_stage_fstride1\r\n530\t\r\n531\t        lsl             nstep, fstride, #4\r\n532\t        sub             stage_count, stage_count, #1\r\n533\t        lsr             fstride, fstride, #2\r\n534\t\r\n535\t        /* swap input/output buffer  */\r\n536\t        ldr             tmp0, [sp, #104]\r\n(gdb) s\r\n523\t        lsl             fstep, fstride, #3\r\n(gdb) s\r\n526\t        BUTTERFLY8X2_WITHOUT_TWIDDLES \"FALSE\"\r\n(gdb) s\r\n\r\nProgram received signal SIGBUS, Bus error.\r\n0x00071cae in ne10_mixed_radix_fft_forward_float32_neon ()\r\n    at /XXXXX/Ne10/modules/dsp/NE10_fft_float32.neon.s:526\r\n526\t        BUTTERFLY8X2_WITHOUT_TWIDDLES \"FALSE\"\r\n```\r\n\r\nI have found other hints pointing to a local problem with my building setup, I will try to get this fixed and will get back to you."}}
{"actor":{"display_login":"twelti"}}