'2021/04'에 해당되는 글 74건

  1. 2021.04.07 git 특정 디렉토리만 clone 하기
  2. 2021.04.07 microzed..
  3. 2021.04.07 python yield
  4. 2021.04.06 representative_dataset
  5. 2021.04.06 oneAPI Quartus pro 필요?
  6. 2021.04.06 git lfs
  7. 2021.04.06 cunit test mode - auto / basic / console / ncurse
  8. 2021.04.06 ubuntu에서 cunit
  9. 2021.04.05 알뜰교통카드 2
  10. 2021.04.05 Floating point exception

아직 해보진 않음..

 

$ git init proj

$ cd proj

$ git remote add -f origin <<remote_url>>

$ git config core.sparseCheckout true

$ echo "directory" >> .git/info/sparse-checkout

$ git pull origin master

[링크 : https://www.lesstif.com/gitbook/git-clone-20776761.html]

[링크 : https://unix.stackexchange.com/questions/233327]

'프로그램 사용 > Version Control' 카테고리의 다른 글

git stash  (0) 2021.05.09
git 저장소 합치기 해보았으나..  (0) 2021.04.07
git lfs  (0) 2021.04.06
git submodule  (0) 2021.04.05
git reset revert  (0) 2021.03.31
Posted by 구차니
embeded/FPGA - XILINX2021. 4. 7. 14:18

를 예전부터 하나 가지고 싶긴했는데..

생겨서 정작 회로드를 보니 PMOD 외에는 죄다 B2B 커넥터를 통해 뽑아내야 하는지라

해당 보드는 또 추가로 싼게 59$ 비싼건 199$ 까지..

 

[링크 : https://www.avnet.com/.../aes-mbcc-brk-g-3074457345635221620] 만능기판 59$

[링크 : https://www.avnet.com/.../aes-arduino-cc-g-3074457345635221613] 아두이노 89$

FPGA Mezzanine Connector

[링크 : https://www.avnet.com/.../aes-mbcc-io-g-3074457345635221584]  PMOD? 149$ 

[링크 : https://www.avnet.com/.../aes-mbcc-fmc-g-3074457345635221592] FMC 199$

 

 

Z7020 213$

Z7010 178$

[링크 : https://www.avnet.com/wps/portal/us/products/avnet-boards/avnet-board-families/microzed/]

 

얘네는 가격 써있는걸 보기 힘든것 같냐 -_-

[링크 : https://www.inipro.net/goods/goods_view.php?goodsNo=1000617811]

'embeded > FPGA - XILINX' 카테고리의 다른 글

흐음.. 끌리네?  (0) 2022.11.02
xvc - xilinx virtual cable  (0) 2021.08.24
pmod pinout  (0) 2021.04.02
xilinx vitis  (0) 2021.03.31
xilinx fpga bank  (0) 2021.03.29
Posted by 구차니

generator 라는 문법을 위한 키워드?

python 3.3 이후 부터 지원한다고 한다.

 

근데 봐도 이해가 쉽지 않네..

 

[링크 : https://wikidocs.net/16069]

[링크 : https://kkamikoon.tistory.com/90]

'Programming > python(파이썬)' 카테고리의 다른 글

python op overload magic method  (0) 2021.06.14
pythonpath  (0) 2021.04.16
python 공부  (0) 2020.01.14
python 반복문 for in range()  (0) 2020.01.11
python print 와 while 문  (0) 2020.01.11
Posted by 구차니

이미지를 다 불러와서 때려박으나 ramdom 값을 때려박으나 차이가 없네..

도대체 멀까?

 

import cv2
import glob
import numpy as np
import tensorflow as tf

NORM_H=300
NORM_W=300
filename = glob.glob("/home/minimonk/src/SSD-MobileNet-TF/images/train/*.jpg")
images = []

for i in filename:
	img = cv2.imread(i)
	img = cv2.resize(img, (NORM_H, NORM_W))
	img = img / 255.0
	img = img.astype(np.float32)
	images.append(img)
	
for data in tf.data.Dataset.from_tensor_slices((images)).batch(1).take(len(filename)):
    yield [data.astype(tf.float32)]

[링크 : https://stackoverflow.com/questions/3207219/] path

[링크 : https://stackoverflow.com/questions/57877959/] example

 

[링크 : https://tech.ssut.me/what-does-the-yield-keyword-do-in-python/]

[링크 : https://engineer-mole.tistory.com/85]

 

+

[링크 : https://www.tensorflow.org/api_docs/python/tf/data/Dataset]

 

+

2021.04.07

[링크 : https://stackoverflow.com/questions/64795017/]

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

ssd mobilnetv2 to tflite warnings  (0) 2021.04.07
ssd mobilenetv2 python load pb, tflite  (0) 2021.04.07
tflite run  (0) 2021.04.02
tensorflow image input  (0) 2021.04.02
ssd model pb to tflite with quantization  (0) 2021.04.02
Posted by 구차니
embeded/FPGA - ALTERA2021. 4. 6. 17:06

Q: DE10-Nano에서 oneAPI 하려는데 안되요~

A: Quartus Pro 사세요

As of now OneAPI addon is supported in Quartus Pro only.

[링크 : https://community.intel.com/.../Local-OneAPI-FPGA-synthesis-with-Altera-Cyclone-5/td-p/1204639]

 

근데.. pro는 비싸지 않나...

그리고 addon 이라고 하면.. addon이 아닌 상태로는 lite로도 가능하다는 건가?

 

지원되는 하드웨어에... Arria 10GX / Stratix 10SX 가 포함된 PC 카드 타입..

Supported Hardware
FPGA Cards
Intel® Programmable Acceleration Card (PAC) with Intel® Arria® 10 GX FPGA with Intel® Acceleration Stack for Intel® Xeon® CPU with FPGAs Version 1.2.1
Intel® FPGA Programmable Acceleration Card D5005 (previously known as Intel® PAC with Intel® Stratix® 10 SX FPGA) with Intel® Acceleration Stack for Intel® Xeon® CPU with FPGAs Version 2.0.1
Custom Platforms (Ported from Intel® Arria® 10 GX and Intel® Stratix® 10 GX reference platforms)
Intel® Custom Platforms with Intel® Quartus® Prime software version 20.4
Intel® Custom Platforms with Intel® Quartus® Prime software version 20.3
Intel® Custom Platforms with Intel® Quartus® Prime software version 20.2
Intel® Custom Platforms with Intel® Quartus® Prime software version 19.4

[링크 : https://software.intel.com/.../intel-oneapi-dpcpp-fpga-add-on-release-notes.html]

 

혹시나 저렴한(!) DE10-Nano로는 안되나 찾아봐야 하는데.. 위에 링크에서 일단 좌절중!

 

그래도 모르니 Standard와 Nano를 비교해보니 cyclone V SE와 SX의 차이라..

DE10-Standard Cyclone V SX SoC—5CSXFC6D6F31C6N (110K LEs, 41509 ALMs

[링크 : https://www.terasic.com.tw/cgi-bin/page/archive.pl?Language=English&CategoryNo=165&No=1081&PartNo=2]

DE10-Nano Intel Cyclone® V SE 5CSEBA6U23I7  device (110K LEs)

[링크 : https://www.terasic.com.tw/cgi-bin/page/archive.pl?Language=English&CategoryNo=167&No=1046&PartNo=2]

'embeded > FPGA - ALTERA' 카테고리의 다른 글

Nios V  (0) 2021.11.01
IOFS - Intel Open FPGA Stack  (0) 2021.07.06
cyclone V openCL?  (0) 2021.03.26
risc v on fpga  (0) 2021.03.09
quartus II 9.0이 아니야? 4.2 설치!  (0) 2020.06.23
Posted by 구차니

github에서 대용량 파일(100M 이상)은 지원하지 않고

50~100MB는 경고를 띄운다고 하는데

그 이상의 용량을 git에서 관리하려면 git lfs를 설치해주어야 한다고 한다.

 

[링크 : https://newsight.tistory.com/330]

'프로그램 사용 > Version Control' 카테고리의 다른 글

git 저장소 합치기 해보았으나..  (0) 2021.04.07
git 특정 디렉토리만 clone 하기  (0) 2021.04.07
git submodule  (0) 2021.04.05
git reset revert  (0) 2021.03.31
git error: RPC failed; curl ... remote end hung up  (0) 2021.01.11
Posted by 구차니
프로그램 사용/cunit2021. 4. 6. 11:31

테스트에 따른 include 파일

#include <CUnit/Automated.h>
void         CU_automated_run_tests(void)

#include <CUnit/Basic.h>
CU_ErrorCode    CU_basic_run_tests(void)

#include <CUnit/Console.h>
void CU_console_run_tests(void)

#include <CUnit/CUCurses.h>
void CU_curses_run_tests(void)

[링크 : http://cunit.sourceforge.net/doc/running_tests.html]

[링크 : https://sharpis0826.blogspot.com/2013/11/cunit-cunit_17.html]

 

ncurse로 멋지게 나오는걸 기대했는데 현실은 에러! 빌드도 안됨 ㅋ

/usr/bin/ld: /tmp/ccIbfUYB.o: in function `main':
cunit.c:(.text+0x314): undefined reference to `CU_curses_run_tests'
collect2: error: ld returned 1 exit status

 

아무튼.. ncurse는 다른 패키지로 분리되어 있고.. include도 다른걸로 해주어야 하니 급 귀찮..

$ apt-cache search cunit
libcunit1 - Unit Testing Library for C
libcunit1-dev - Unit Testing Library for C -- development files
libcunit1-doc - Unit Testing Library for C -- documentation
libcunit1-ncurses - Unit Testing Library for C (ncurses)
libcunit1-ncurses-dev - Unit Testing Library for C (ncurses) -- development files

 

CU_basic_run_tests()

결과를 화면으로 출력함

$ ./a.out


     CUnit - A unit testing framework for C - Version 2.1-3
     http://cunit.sourceforge.net/


Suite: Suite_1
  Test: test of fprintf() ...passed
  Test: test of fread() ...passed

Run Summary:    Type  Total    Ran Passed Failed Inactive
              suites      1      1    n/a      0        0
               tests      2      2      2      0        0
             asserts      5      5      5      0      n/a

Elapsed time =    0.001 seconds

 

CU_automated_run_tests()

결과를 XML로 출력함

$ ls -al
합계 36
drwxrwxr-x  2 minimonk minimonk  4096  4월  6 11:37 .
drwxrwxr-x 13 minimonk minimonk  4096  4월  6 11:01 ..
-rwxrwxr-x  1 minimonk minimonk 17488  4월  6 11:37 a.out
-rw-rw-r--  1 minimonk minimonk  3734  4월  6 11:37 cunit.c
-rw-rw-r--  1 minimonk minimonk     9  4월  6 11:37 temp.txt

$ ./a.out

$ ls -al
합계 40
drwxrwxr-x  2 minimonk minimonk  4096  4월  6 11:37 ./
drwxrwxr-x 13 minimonk minimonk  4096  4월  6 11:01 ../
-rw-rw-r--  1 minimonk minimonk  1670  4월  6 11:37 CUnitAutomated-Results.xml
-rwxrwxr-x  1 minimonk minimonk 17488  4월  6 11:37 a.out*
-rw-rw-r--  1 minimonk minimonk  3734  4월  6 11:37 cunit.c
-rw-rw-r--  1 minimonk minimonk     9  4월  6 11:37 temp.txt

$ cat CUnitAutomated-Results.xml
<?xml version="1.0" ?>
<?xml-stylesheet type="text/xsl" href="CUnit-Run.xsl" ?>
<!DOCTYPE CUNIT_TEST_RUN_REPORT SYSTEM "CUnit-Run.dtd">
<CUNIT_TEST_RUN_REPORT>
  <CUNIT_HEADER/>
  <CUNIT_RESULT_LISTING>
    <CUNIT_RUN_SUITE>
      <CUNIT_RUN_SUITE_SUCCESS>
        <SUITE_NAME> Suite_1 </SUITE_NAME>
        <CUNIT_RUN_TEST_RECORD>
          <CUNIT_RUN_TEST_SUCCESS>
            <TEST_NAME> test of fprintf() </TEST_NAME>
          </CUNIT_RUN_TEST_SUCCESS>
        </CUNIT_RUN_TEST_RECORD>
        <CUNIT_RUN_TEST_RECORD>
          <CUNIT_RUN_TEST_SUCCESS>
            <TEST_NAME> test of fread() </TEST_NAME>
          </CUNIT_RUN_TEST_SUCCESS>
        </CUNIT_RUN_TEST_RECORD>
      </CUNIT_RUN_SUITE_SUCCESS>
    </CUNIT_RUN_SUITE>
  </CUNIT_RESULT_LISTING>
  <CUNIT_RUN_SUMMARY>
    <CUNIT_RUN_SUMMARY_RECORD>
      <TYPE> Suites </TYPE>
      <TOTAL> 1 </TOTAL>
      <RUN> 1 </RUN>
      <SUCCEEDED> - NA - </SUCCEEDED>
      <FAILED> 0 </FAILED>
      <INACTIVE> 0 </INACTIVE>
    </CUNIT_RUN_SUMMARY_RECORD>
    <CUNIT_RUN_SUMMARY_RECORD>
      <TYPE> Test Cases </TYPE>
      <TOTAL> 2 </TOTAL>
      <RUN> 2 </RUN>
      <SUCCEEDED> 2 </SUCCEEDED>
      <FAILED> 0 </FAILED>
      <INACTIVE> 0 </INACTIVE>
    </CUNIT_RUN_SUMMARY_RECORD>
    <CUNIT_RUN_SUMMARY_RECORD>
      <TYPE> Assertions </TYPE>
      <TOTAL> 5 </TOTAL>
      <RUN> 5 </RUN>
      <SUCCEEDED> 5 </SUCCEEDED>
      <FAILED> 0 </FAILED>
      <INACTIVE> n/a </INACTIVE>
    </CUNIT_RUN_SUMMARY_RECORD>
  </CUNIT_RUN_SUMMARY>
  <CUNIT_FOOTER> File Generated By CUnit v2.1-3 - Tue Apr  6 11:37:15 2021
 </CUNIT_FOOTER>
</CUNIT_TEST_RUN_REPORT>

 

CU_console_run_tests()

R 누르면 CU_basic_run_tests()와 차이는 없지만 테스트 항목을 하나하나 on/off 가능하다.

$ ./a.out


     CUnit - A Unit testing framework for C - Version 2.1-3
             http://cunit.sourceforge.net/


***************** CUNIT CONSOLE - MAIN MENU ******************************
(R)un  (S)elect  (L)ist  (A)ctivate  (F)ailures  (O)ptions  (H)elp  (Q)uit
Enter command: S

--------------------- Registered Suites -----------------------------
 #  Suite Name                         Init? Cleanup? #Tests Active?

 1. Suite_1                             Yes      Yes      2     Yes
---------------------------------------------------------------------
Total Number of Suites : 1

Enter number of suite to select (1-1) : 1
Suite 'Suite_1' selected.

***************** CUNIT CONSOLE - SUITE MENU ***************************
(R)un (S)elect (L)ist (A)ctivate (F)ailures (U)p (O)ptions (H)elp (Q)uit
Enter command: L

----------------- Test List ------------------------------
Suite: Suite_1

 #  Test Name                          Active?

 1. test of fprintf()                     Yes
 2. test of fread()                       Yes
----------------------------------------------------------
Total Number of Tests : 2

***************** CUNIT CONSOLE - SUITE MENU ***************************
(R)un (S)elect (L)ist (A)ctivate (F)ailures (U)p (O)ptions (H)elp (Q)uit
Enter command: R

Running Suite : Suite_1
     Running Test : test of fprintf()
     Running Test : test of fread()

Run Summary:    Type  Total    Ran Passed Failed Inactive
              suites      1      1    n/a      0        0
               tests      2      2      2      0        0
             asserts      5      5      5      0      n/a

Elapsed time =    0.001 seconds

 

CU_curses_run_tests();

CU_console_run_tests의 ncurse 버전

               CUnit - A Unit testing framework for C - Version 2.1-3
                            http://cunit.sourceforge.net/

 Progress

 Tests Run :      0   Success :      0   Failed :      0

┌───────────────────────────────── Details Window ──────────────────────────────────┐
│Welcome to CUnit.  Press the indicated key to run the command.                     │
│                                                                                   │
│                                                                                   │
│                                                                                   │
│                                                                                   │
│                                                                                   │
│                                                                                   │
│                                                                                   │
│                                                                                   │
│                                                                                   │
│                                                                                   │
│                                                                                   │
│                                                                                   │
│                                                                                   │
└───────────────────────────────────────────────────────────────────────────────────┘
 (R)un  (S)elect  (L)ist  (A)ctivate  (F)ailures  (O)ptions  (H)elp  (Q)uit

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

ubuntu에서 cunit  (0) 2021.04.06
CI/CD - Continuous integration continuous delivery  (0) 2021.04.05
cunit  (0) 2021.04.05
CUnit  (0) 2014.03.11
Posted by 구차니
프로그램 사용/cunit2021. 4. 6. 11:04

일단 돌려보는게 목적이니 대충 해볼까..

$ sudo apt-get install libcunit1-dev
$ gcc cunit.c -lcunit

 

실행하면 아래와 같이 결과가 나온다.

$ ./a.out


     CUnit - A unit testing framework for C - Version 2.1-3
     http://cunit.sourceforge.net/


Suite: Suite_1
  Test: test of fprintf() ...passed
  Test: test of fread() ...passed

Run Summary:    Type  Total    Ran Passed Failed Inactive
              suites      1      1    n/a      0        0
               tests      2      2      2      0        0
             asserts      5      5      5      0      n/a

Elapsed time =    0.000 seconds

[링크 : http://cunit.sourceforge.net/example.html]

[링크 : https://sharpis0826.blogspot.com/2013/11/cunit-cunit_17.html]

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

cunit test mode - auto / basic / console / ncurse  (0) 2021.04.06
CI/CD - Continuous integration continuous delivery  (0) 2021.04.05
cunit  (0) 2021.04.05
CUnit  (0) 2014.03.11
Posted by 구차니

국민은 없네 ㅠ

신한 20만원~30만원 실적 / 20만원 대중교통 2천원 할인

우리신용 30만 실적 / 월 1만원 한도 할인(할인 매출은 실적 제외)

우리체크 20~50만 / 1만 최대 캐시백

하나신용 50만 실적 / 1.5만 20% 교통 할인

하나체크 25만 실적 / 15% 캐시백, 3만 이상 이용시 5천

 

아따 조건 까다롭다 -_-

[링크 : http://www.alcard.kr/]

[링크 : http://1boon.daum.net/weekly/210305_1]

 

 

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

내가 운전을 이상하게 하는건가?  (0) 2021.04.18
구리 롯데마트 3월 말 영업종료  (0) 2021.04.17
공기 청정기 구매  (0) 2021.04.04
밥솥 압력패킹 교체  (0) 2021.04.03
4월 지름의 시작  (0) 2021.04.01
Posted by 구차니
Linux API/linux2021. 4. 5. 16:44

이런 에러 처음 겪네 -_-

 

runtime DIV/0 에러에 가깝다고 해야하나..

(문제는 전부 char 형인데 뜬금없이 float point..)

[링크 : https://stackoverflow.com/questions/4236853/floating-point-exception-c-why-and-what-is-it]

[링크 : https://kldp.org/node/122753]

[링크 : https://www.acmicpc.net/board/view/21892]

 

혹시나 해서 gdb 물려서 실행해보니

Program received signal SIGFPE, Arithmetic exception.

 

이름은 Floating Point Exception 에서 유래하긴 했는데

"0으로 나누기와 오버플로우를 포함한 모든 산술에러"에서 발생한다고 한다.

Macro: int SIGFPE

The SIGFPE signal reports a fatal arithmetic error. Although the name is derived from “floating-point exception”, this signal actually covers all arithmetic errors, including division by zero and overflow. If a program stores integer data in a location which is then used in a floating-point operation, this often causes an “invalid operation” exception, because the processor cannot recognize the data as a floating-point number.

Actual floating-point exceptions are a complicated subject because there are many types of exceptions with subtly different meanings, and the SIGFPE signal doesn’t distinguish between them. The IEEE Standard for Binary Floating-Point Arithmetic (ANSI/IEEE Std 754-1985 and ANSI/IEEE Std 854-1987) defines various floating-point exceptions and requires conforming computer systems to report their occurrences. However, this standard does not specify how the exceptions are reported, or what kinds of handling and control the operating system can offer to the programmer.

[링크 : https://www.gnu.org/software/libc/manual/html_node/Program-Error-Signals.html]

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

Stopped (tty input)  (0) 2021.05.21
linux gpio interrupt poll?  (0) 2021.05.04
실행파일 not fount, FATAL: kernel too old  (0) 2021.04.05
spi 통신 예제(linux)  (0) 2021.01.28
linux USB bulk 통신  (0) 2020.10.21
Posted by 구차니