'잡동사니'에 해당되는 글 13797건

  1. 2022.10.24 FFT
  2. 2022.10.23 장보기 두렵다
  3. 2022.10.22 피곤 기절
  4. 2022.10.20 ‘F_SETPIPE_SZ’ undeclared
  5. 2022.10.19 fftw 예제 와 복소수 처리
  6. 2022.10.19 tlv
  7. 2022.10.19 fftw 테스트(tests/bench)
  8. 2022.10.19 fftw cross compile
  9. 2022.10.19 RAMS
  10. 2022.10.18 linux fifo

FFT

FFT Size - 몇 번의 샘플을 분석할 것인지

Window - 사용하지 않을때 Rectangular / Flat / Uniform

- Hannning Window(cosine?)

- Blackman 윈도우, Kaiser 윈도우(최근 제안, 사이드 로브가 적은 편)

 

사이드 로브(side libe, leakage) - 중심 주파수 하나가 아니라 주변부 주파수가 나오는 문제

 

대역폭(Bandwidth) - Hz 단위

 

[링크 : https://m.blog.naver.com/suya309/221467948212]

 

[링크 : https://scribblinganything.tistory.com/181]

'프로그램 사용 > fft, fftw' 카테고리의 다른 글

real to complex  (0) 2022.11.04
fftw wisdom  (0) 2022.11.04
fftw 예제 와 복소수 처리  (0) 2022.10.19
fftw 테스트(tests/bench)  (0) 2022.10.19
fftw cross compile  (0) 2022.10.19
Posted by 구차니

가격이 머 조금 집으면 10만원대..

'개소리 왈왈 > 육아관련 주저리' 카테고리의 다른 글

ko  (0) 2022.10.28
질러?  (0) 2022.10.27
피곤 기절  (0) 2022.10.22
기절기절  (0) 2022.10.09
일정 망함  (0) 2022.10.08
Posted by 구차니

자도자도 피곤하네

연혼이 피로한게야..

'개소리 왈왈 > 육아관련 주저리' 카테고리의 다른 글

질러?  (0) 2022.10.27
장보기 두렵다  (0) 2022.10.23
기절기절  (0) 2022.10.09
일정 망함  (0) 2022.10.08
내일 여의도 불꽃축제  (0) 2022.10.07
Posted by 구차니
Linux API/linux2022. 10. 20. 10:50

커널이 5.4.0 이라 그런가

해당 선언을 해주어야 에러가 사라진다.

 

#define _GNU_SOURCE

[링크 : https://stackoverflow.com/questions/25411892/f-setpipe-sz-undeclared]

 

 

Defining _GNU_SOURCE has nothing to do with license and everything to do with writing (non-)portable code. If you define _GNU_SOURCE, you will get:
  1. access to lots of nonstandard GNU/Linux extension functions
  2. access to traditional functions which were omitted from the POSIX standard (often for good reason, such as being replaced with better alternatives, or being tied to particular legacy implementations)
  3. access to low-level functions that cannot be portable, but that you sometimes need for implementing system utilities like mount, ifconfig, etc.
  4. broken behavior for lots of POSIX-specified functions, where the GNU folks disagreed with the standards committee on how the functions should behave and decided to do their own thing.
As long as you're aware of these things, it should not be a problem to define _GNU_SOURCE, but you should avoid defining it and instead define _POSIX_C_SOURCE=200809L or _XOPEN_SOURCE=700 when possible to ensure that your programs are portable.
In particular, the things from _GNU_SOURCE that you should never use are #2 and #4 above.
 

[링크 : https://stackoverflow.com/questions/5582211/what-does-define-gnu-source-imply]

 

호환성 지정 매크로

[링크 : https://m.blog.naver.com/netiz21/150015716721]

 

#include <fcntl.h> 대신

#include <linux/fcntl.h> 하면 _GNU_SOURCE를 해주지 않아도 되긴 한데

다른데서 경고가 뜨니 알아서 써야 할 듯.

/usr/include/linux/fcntl.h:28:#define F_SETPIPE_SZ (F_LINUX_SPECIFIC_BASE + 7)
/usr/include/linux/fcntl.h:29:#define F_GETPIPE_SZ (F_LINUX_SPECIFIC_BASE + 8)

'Linux API > linux' 카테고리의 다른 글

iio(industrial io) 문서  (0) 2022.11.11
mkpipe 와 poll  (0) 2022.10.26
linux fifo  (0) 2022.10.18
SIGPIPE  (0) 2022.10.17
linux ipc 최대 데이터 길이  (0) 2022.10.11
Posted by 구차니

'프로그램 사용 > fft, fftw' 카테고리의 다른 글

fftw wisdom  (0) 2022.11.04
FFT  (0) 2022.10.24
fftw 테스트(tests/bench)  (0) 2022.10.19
fftw cross compile  (0) 2022.10.19
fft  (0) 2020.11.25
Posted by 구차니

tlv

 

http://www.ktword.co.kr/test/view/view.php?m_temp1=3739

'이론 관련 > 컴퓨터 관련' 카테고리의 다른 글

vRAN  (0) 2023.08.23
cordic (coordinate rotation digital computer)  (0) 2023.02.27
DR - Disaster Recovery Plan  (0) 2022.10.17
SLP - Superword Level Parallelism  (0) 2022.06.02
digital twin  (0) 2022.04.13
Posted by 구차니

도대체 저 옵션들은 먼지 모르겠다.

fftw-3.3.4/tests/bench -o nthreads=2 --verbose=1   --verify 'ok10bx6bx6e11x13b' --verify 'ik10bx6bx6e11x13b' --verify 'obrd7x13v16' --verify 'ibrd7x13v16' --verify 'ofrd7x13v16' --verify 'ifrd7x13v16' --verify '//obcd7x13v16' --verify '//ibcd7x13v16' --verify '//ofcd7x13v16' --verify '//ifcd7x13v16' --verify 'obcd7x13v16' --verify 'ibcd7x13v16' --verify 'ofcd7x13v16' --verify 'ifcd7x13v16' --verify 'okd10bv127' --verify 'ikd10bv127' --verify '//obr240' --verify '//ibr240' --verify '//ofr240' --verify '//ifr240' --verify 'obr240' --verify 'ibr240' --verify 'ofr240' --verify 'ifr240' --verify '//obc240' --verify '//ibc240' --verify '//ofc240' --verify '//ifc240' --verify 'obc240' --verify 'ibc240' --verify 'ofc240' --verify 'ifc240' --verify 'ok11760e00' --verify 'ik11760e00' --verify 'obr33v31' --verify 'ibr33v31' --verify 'ofr33v31' --verify 'ifr33v31' --verify '//obc33v31' --verify '//ibc33v31' --verify '//ofc33v31' --verify '//ifc33v31' --verify 'obc33v31' --verify 'ibc33v31'

[링크 : https://unix.stackexchange.com/questions/209753/how-do-i-check-if-fftw-installed-correctly]

 

 

+

[링크 : https://people.sc.fsu.edu/~jburkardt/c_src/fftw_test/]

[링크 : https://people.sc.fsu.edu/~jburkardt/c_src/fftw_test/fftw_test.html]

'프로그램 사용 > fft, fftw' 카테고리의 다른 글

FFT  (0) 2022.10.24
fftw 예제 와 복소수 처리  (0) 2022.10.19
fftw cross compile  (0) 2022.10.19
fft  (0) 2020.11.25
fftw  (0) 2020.11.25
Posted by 구차니

 

[링크 : https://www.fftw.org/download.html]

 

./configure --prefix=/home/zhouxiaoyong/fftw3_test --disable-fortran --with-slow-timer --host=arm-none-linux-gnueabi --enable-single  --enable-neon   --enable-shared CC=arm-none-linux-gnueabi-gcc CFLAGS="-march=armv7-a -mfpu=neon -fPIC -ldl -mfloat-abi=softfp"

[링크 : https://codeantenna.com/a/ztGG77F10Z]

 

 

The basic usage of FFTW is simple. A typical call to FFTW looks like:
#include <fftw.h>
...
{
     fftw_complex in[N], out[N];
     fftw_plan p;
     ...
     p = fftw_create_plan(N, FFTW_FORWARD, FFTW_ESTIMATE);
     ...
     fftw_one(p, in, out);
     ...
     fftw_destroy_plan(p);  
}


For example, code to perform an in-place FFT of a three-dimensional array might look like:
#include <fftw.h>
...
{
     fftw_complex in[L][M][N];
     fftwnd_plan p;
     ...
     p = fftw3d_create_plan(L, M, N, FFTW_FORWARD,
                            FFTW_MEASURE | FFTW_IN_PLACE);
     ...
     fftwnd_one(p, &in[0][0][0], NULL);
     ...
     fftwnd_destroy_plan(p);  
}

The following is a brief example in which the wisdom is read from a file, a plan is created (possibly generating more wisdom), and then the wisdom is exported to a string and printed to stdout.
{
     fftw_plan plan;
     char *wisdom_string;
     FILE *input_file;

     /* open file to read wisdom from */
     input_file = fopen("sample.wisdom", "r");
     if (FFTW_FAILURE == fftw_import_wisdom_from_file(input_file))
          printf("Error reading wisdom!\n");
     fclose(input_file); /* be sure to close the file! */

     /* create a plan for N=64, possibly creating and/or using wisdom */
     plan = fftw_create_plan(64,FFTW_FORWARD,
                             FFTW_MEASURE | FFTW_USE_WISDOM);

     /* ... do some computations with the plan ... */

     /* always destroy plans when you are done */
     fftw_destroy_plan(plan);

     /* write the wisdom to a string */
     wisdom_string = fftw_export_wisdom_to_string();
     if (wisdom_string != NULL) {
          printf("Accumulated wisdom: %s\n",wisdom_string);

          /* Just for fun, destroy and restore the wisdom */
          fftw_forget_wisdom(); /* all gone! */
          fftw_import_wisdom_from_string(wisdom_string);
          /* wisdom is back! */

          fftw_free(wisdom_string); /* deallocate it since we're done */
     }
}

[링크 : http://www.fftw.org/fftw2_doc/fftw_2.html]

'프로그램 사용 > fft, fftw' 카테고리의 다른 글

fftw 예제 와 복소수 처리  (0) 2022.10.19
fftw 테스트(tests/bench)  (0) 2022.10.19
fft  (0) 2020.11.25
fftw  (0) 2020.11.25
ffmpeg fft 분석 예제  (0) 2020.11.25
Posted by 구차니
회사일2022. 10. 19. 12:09

Reliability(신뢰성)

Availability(가용성)

Maintainability(유지보수성)

Safety(안전성)

 

문서를 쓰려면 머리 아플, 테스트로 시간 엄청 들일 녀석이겠구나..

 

[링크 : http://www.daeati.co.kr/sub03_rams.php]

 

유럽 철도분야의 RAMS(Reliability, Availability, Maintainability, and Safety) 표준으로 제정한 EN50126은 시스템의 신뢰성, 가용성, 보전성 및 안전성에 대한 필수적인 요구사항을 규정하고 있다.

[링크 : https://scienceon.kisti.re.kr/srch/selectPORSrchArticle.do?cn=DIKO0010114980&dbt=DIKO]

'회사일' 카테고리의 다른 글

TMP116, TMP117  (0) 2024.09.02
imx8m plus  (0) 2021.08.27
항암제  (0) 2020.01.03
postgresql regexp_matches 로 HGVS g. c. p. 잡아내기  (0) 2020.01.01
compound heterozygosity  (0) 2019.12.21
Posted by 구차니
Linux API/linux2022. 10. 18. 18:20

특이하다면 특이하고, 당연하다면 당연하게

fifo는 쓸 녀석과, 읽을 녀석이 둘다 요청이 들어올때 까지 open() 에서 blocking 된다.

 

strace를 이용해서 확인해보면 각각 실행할 경우

O_RDONLY를 주던 O_WRONLY를 주던 간에 open() 함수에서 block 되어있다

두개 프로그램이 read/write pair가 만들어지면 그제서야 open()을 넘어가게 된다.

open()을 non_block 으로 해서 name pipe의 pair가 만들어지길 기다리는 것도 방법 일 듯.

 

$ strace ./rx
openat(AT_FDCWD, "/tmp/fifo", O_RDONLY
$ strace ./tx 2
openat(AT_FDCWD, "/tmp/fifo", O_WRONLY

[링크 : https://tutorialspoint.dev/computer-science/operating-systems/named-pipe-fifo-example-c-program]

 

걍 이렇게 하고 나서 해보면 되려나?

int fifo_fd = open(fifo_path, O_RDONLY | O_NONBLOCK);
FILE *fp = fdopen(fifo_fd, "r");

[링크 : https://cboard.cprogramming.com/c-programming/89358-nonblocking-fifo.html]

'Linux API > linux' 카테고리의 다른 글

mkpipe 와 poll  (0) 2022.10.26
‘F_SETPIPE_SZ’ undeclared  (0) 2022.10.20
SIGPIPE  (0) 2022.10.17
linux ipc 최대 데이터 길이  (0) 2022.10.11
ipc 성능 비교  (0) 2022.09.21
Posted by 구차니