embeded/FPGA - ALTERA2018. 2. 28. 20:44

AVR 할때도 해봤던 예제인데..

이걸 하면 좀 이해가 될 듯?


FPGA를 통해서 UART를 구현하고 데이터를 내부적으로 받아서 다시 보내주는 역활을 하는데

대충 보니.. 결국은 state machine으로 구현되서 내부적으로

프로그램 로직이 작동을 해야만 하는 듯..

FPGA란게 원래 그런건가..?


[링크 : https://github.com/FPGAwars/FPGA-peripherals/tree/master/uart-rx/examples/echo]


Posted by 구차니
embeded/FPGA - ALTERA2018. 2. 26. 16:26

SOPC Builder는 Qsys로 대체 되고

Qsys가 Platform Designer로 변신?


이미지로 검색해보면

Qsys나 Platform Designer나 거의 동일하고

SOPC Builder는 Qsys와 유사한데 XP 시절 그래픽 느낌?



SOPC Builder Support

Altera recommends using Qsys, the next-generation system integration tool, for new designs.

[링크 : https://www.altera.com/support/support-resources/design-software/sopc-builder.html]


Platform Designer (formerly Qsys) Support

The Qsys system integration tool in Quartus® Prime software saves time and effort in the FPGA design process by enabling faster system development and design reuse.

[링크 : https://www.altera.com/support/support-resources/design-software/qsys.html]

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

de0-nano virtual serial  (0) 2018.02.28
fpga uart echo  (0) 2018.02.28
Nios II / Floating Point Hardware 2  (0) 2018.02.26
quartus 2 Block Diagram/Schematic 으로 설계하기  (4) 2018.02.20
de0-nano communicate pc 로 검색결과  (0) 2018.02.14
Posted by 구차니
embeded/FPGA - ALTERA2018. 2. 26. 15:15

카페 질문이 있어서 찾아보니..

FPU 형태로 별도의 하드웨어로 구성되는 Floating Point Hardware라는 IP가 존재한다.


귀찮아서 custom으로 검색!

Hardware랑 Hardware 2가 있다.


2는 2 답게 +-*/(Arithmetic)과 추가적으로 다른 부동소수점 연산을 지원하는데

도표를 보면 성능이 참.. 자비가 없네 ㄷㄷ


Floating Point Hardware는 +-*는 기본으로 제공되고 /에 대해서는 별도 옵션으로 선택해야 한다.


음. VHDL only 라니.. verilog 프로젝트에서는 못쓰나? (먼가 경고 두개 뜨긴 하던데...)

그리고 2500 4-input LE 라는데 Nios2에 비하면 꽤나 큰 로직의 사용인거 같고,

4-input LE가 적은 시리즈라면 치명적일 수도 있겠다.

결정적으로(!) float 인거지 double은 미지원이다.


The characteristics of the FPH2 are:

  • Supports FPH1 operations (add, sub, multiply, divide) and adds support for square root, comparisons, integer conversions, minimum, maximum, negate, and absolute
  • Single-precision floating point values are stored in the Nios II general purpose registers
  • VHDL only
  • Platform Designer support only
  • Single-precision only
  • Optimized for FPGAs with 4-input LEs and 18-bit multipliers
  • GCC and Nios II SBT (Software Build Tools) software support
  • IEEE 754-2008 compliant except for:
    • Simplified rounding
    • Simplified NaN handling
    • No exceptions
    • No status flags
    • Subnormal supported on a subset of operations
  • Binary-compatibility with FPH1
    • FPH1 implements Round-To-Nearest rounding. Because FPH2 implements different rounding, results might be subtly different between the two generations
  • Resource consumption in a typical system:
    • Approximately 2500 4-input LEs
    • Nine 9-bit multipliers
    • Three M9K memories or larger

성능 테이블 8비트 연산

Specifies the 8 bit fixed custom instruction for the operation. 일 경우가 N인데

연산을 위해 8비트 사용자 명령어로 사용했다는 건가?

아무튼 극단적으로 230여배 성능 향상! 이라고 뻥칠 수 있다 ㅋㅋ

안정적으로는 50배 정도 성능향상이 있을 것으로 보인다.

(물론 별도 하드웨어로 통신을 하고 하면서 순수 연산 속도에는 조금 더 낮게 측정 되겠지만)


Table 15.  FPH2 Operation Summary
OperationNCyclesResultSubnormalRoundingGCC Inference
fdivs25516a/bflush-to-0Nearesta/b
fsubs2545a-bflush-to-0Faithfula-b
fadds2535a+bflush-to-0Faithfula+b
fmuls2524a*bflush-to-0Faithfula*b
fsqrts2518sqrt(a)flush-to-0Faithfulsqrtf()
floatis2504int_to_float(a)Does not applyDoes not applyCasting
fixsi2492float_to_int(a)flush-to-0TruncationCasting
round2482float_to_int(a)flush-to-0Nearestlroundf()11
reserved234 to 247Undefinedundefined   
fmins2331(a<b) ? a : bsupportedNonefminf()11
fmaxs2321(a<b) ? b : asupportedNonefmaxf()11
fcmplts2311(a<b) ? 1 : 0supportedNonea<b
fcmples2301(a≤b) ? 1 : 0supportedNonea<=b
fcmpgts2291(a>b) ? 1 : 0supportedNonea>b
fcmpges2281(a≥b) ? 1 : 0supportedNonea>=b
fcmpeqs2271(a=b) ? 1 : 0supportedNonea==b
fcmpnes2261(a≠b) ? 1 : 0supportedNonea!=b
fnegs2251-asupportedNone-a
fabss2241|a|supportedNonefabsf()

[링크 : https://www.altera.com/documentation/cru1439932898327.html]

[링크 : https://www.altera.com/documentation/cru1439932898327.html#lro1432145764151]

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

fpga uart echo  (0) 2018.02.28
sopc builder -> qsys -> platform designer  (2) 2018.02.26
quartus 2 Block Diagram/Schematic 으로 설계하기  (4) 2018.02.20
de0-nano communicate pc 로 검색결과  (0) 2018.02.14
Nios II 관련 링크  (0) 2018.02.13
Posted by 구차니
embeded/raspberry pi2018. 2. 23. 19:34

예전부터 찾던건데 잊고 있다가 다시 검색

라즈베리 같은거 보면 img 파일로 배포하는데

내가 아는 img 만드는 방법은 SD 메모리에서 dd로 덤프하는 것 -_-

용량 크면 의미도 없고 작게 만들기 힘들어서

시도해봤던게


dd로 가상 파일 만들고

dd로 만든 파일을 파일시스템 만들어서 마운트 하고

거기다 쑤셔 박고 땡~ 하는 거였는데


전에 회사에서 막상 해보니 정상작동하지 않는 문제가 있어서 완료하지 못했는데

배포하는 방법을 찾으면 될 걸 왜 생각을 못했을까..


[링크 : https://raspberrypi.stackexchange.com/.../build-custom-raspbian-jessie-distribution-image-from-source]

[링크 : https://github.com/RPi-Distro/pi-gen]

[링크 : https://github.com/ShorTie8/my_pi_os]

[링크 : https://github.com/TheSin-/rpi-img-builder]

'embeded > raspberry pi' 카테고리의 다른 글

rpi img 생성하기  (0) 2018.04.18
라즈베리 저전력 관련 설정  (0) 2018.04.17
라즈베리 파이 번개모양 아이콘  (2) 2018.02.19
rpi config.txt avoid_safe_mode=1  (0) 2018.02.18
블투 동글이 비싸!  (0) 2018.02.17
Posted by 구차니
embeded/odroid2018. 2. 21. 20:28

ir 수신기 어떻게 달지?!


일단 회로 상으로 U3는 GPIO가 몇개 없고 그나마도 1.8V라

VISHAY IR 수신기를 바로 달 수 있을지 모르겠네...

일단 C1이나 C2가 수신기 기본 장착이라 검색해보면 C1/C2만 나오지 U3 내용은 안나온다 ㅠㅠ


[링크 : https://forum.libreelec.tv/thread/5560-libreelec-odroid-u2-u3-support/]

[링크 : https://forum.odroid.com/viewtopic.php?f=80&t=5436]

'embeded > odroid' 카테고리의 다른 글

odroid u3 소비전력 재측정  (0) 2018.04.17
odroid u3 boot.ini  (0) 2018.04.17
odroid 해상도 설정  (0) 2018.02.21
odroid u3 mame psp  (0) 2018.02.20
odroid U2/U3 USB 전원 사용하도록 개조 + 케이스  (0) 2018.01.16
Posted by 구차니
embeded/odroid2018. 2. 21. 20:23

라즈베리 처럼 간단한거 없나?

있는 것도 대부분 android나 Odroid X나 Odroid desktop 같은 쪽 내용만 나온다..


[링크 : https://forum.odroid.com/viewtopic.php?f=51&t=105]

'embeded > odroid' 카테고리의 다른 글

odroid u3 boot.ini  (0) 2018.04.17
odroid u3 libreelec  (0) 2018.02.21
odroid u3 mame psp  (0) 2018.02.20
odroid U2/U3 USB 전원 사용하도록 개조 + 케이스  (0) 2018.01.16
odroid u3 웹캠 두 채널  (0) 2016.12.25
Posted by 구차니
embeded/odroid2018. 2. 20. 20:17

ODROID GameStation Turbo with XBMC

[링크 : https://forum.odroid.com/viewtopic.php?f=25&t=3145]

[링크 : https://forum.odroid.com/viewtopic.php?f=91&t=17683] lakka


철권6 동영상 기억나서 찾아보니

고성능 모드 / 720p 설정으로 가능하디고 한다

[링크 : https://forum.odroid.com/viewtopic.php?f=51&t=3159]

'embeded > odroid' 카테고리의 다른 글

odroid u3 libreelec  (0) 2018.02.21
odroid 해상도 설정  (0) 2018.02.21
odroid U2/U3 USB 전원 사용하도록 개조 + 케이스  (0) 2018.01.16
odroid u3 웹캠 두 채널  (0) 2016.12.25
odroid u3 전원소비 (경우별)  (0) 2016.12.15
Posted by 구차니
embeded/FPGA - ALTERA2018. 2. 20. 09:06

문득.. 프로젝트들 중에 Schematic으로 된 것을 본 기억이 있어서

New을 해보니 헉... 이렇게 가까운데 있었다니!!


먼가 많이 익숙해 보이는(?) 아이콘들 발견


AND 게이트 아이콘 누르면 심볼이 있는데 아쉽게도(?)

orcad로 설계하듯 막 먼가 멋진 애가 있는건 아니고

ALTERA megafunction과 같이 좀 큰(!) 기본 제공 기능들과

primitives에 아~~~~주 기초적인 and/or/not 등의 녀석들만 존재한다.


모르니 대충대충 눌러서 끄적끄적


저으자아아아앙~


이거 하면 빌드 한다는데

에러도 없이 끝나는거 보면 대충봐서 무언가 한 단계 빼먹은 듯 ㅠㅠ

[링크 : ftp://ftp.altera.com/up/pub/Tutorials/DE2/Digital_Logic/tut_quartus_intro_schem.pdf]


Nios 2 하던 애라 기본으로 설정안되 있어서 그런 듯

아무튼 Files에서 "Set as Top-Level Entity"로 설정해주고 빌드하니 티가 안나서

(무슨무슨 선을 사용하지 않는다고 경고 뿜뿜)


마지막 OR 게이트의 선을 끊고 빌드하니 에러 발생! 되긴 되는거였군!


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

sopc builder -> qsys -> platform designer  (2) 2018.02.26
Nios II / Floating Point Hardware 2  (0) 2018.02.26
de0-nano communicate pc 로 검색결과  (0) 2018.02.14
Nios II 관련 링크  (0) 2018.02.13
Nios II 안된 이유가.. 설마..  (0) 2018.02.04
Posted by 구차니
embeded/raspberry pi2018. 2. 19. 14:09

레트로 파이 돌리다 보니

우측에 번개모양 아이콘이 떠서 찾아 보니 음.. 전력 부족이면 뜨는건가?


배포판 버전 올라가면서 단순하게 무지개 모양(쉐이더?) 에서 아이콘을 변경한건가..

아무튼 해당 부분 표현하는거 어디서 하는지 찾아 봐야겠다.

(보이는게 신경 쓰이기도 하고)


음.. rpi 2B에서 잘못 출력하는건가?

그래도 아이패드용 어댑터에서 5V는 정상적으로 나올텐데 4.63V/+-5% 보다 낮으면 띄운다니.. 머지?

Undervoltage warning

If the power supply to the Raspberry Pi drops below 4.63V (+/-5%), the following icon is displayed. 

[링크 : https://www.raspberrypi.org/documentation/configuration/warning-icons.md]

   [링크 : https://www.raspberrypi.org/forums/viewtopic.php?f=63&t=177477]


아무튼 정석은 어댑터 교체이고 차선책(?)으로는 설정에서 해당 출력을 하지 않도록 해버림

$ sudo nano /boot/config.txt

# Disable under-voltage warning

avoid_warnings=1 

[링크 : https://scribles.net/lightning-bolt-under-voltage-warning-on-raspberry-pi/]

[링크 : https://www.raspberrypi.org/documentation/configuration/config-txt/misc.md]

---

Power: Ensure you have a good power supply which can steadily supply at least 2A at 5V. Many power supplies sag voltage and current under maximum load. If you see a lightning bolt icon or rainbow square in the top right corner during regular operation, this is the under-voltage warning and you are not supplying enough power. If you have USB devices plugged into the USB ports, considering getting a good powered USB hub to reduce power draw on the Pi. 

[링크 : https://www.reddit.com/r/RetroPie/wiki/faq]


aha so power brownout

Probably, although I haven't done an rpi-update and looked myself, and the commit doesn't say.

It would be the most logical one out of under-voltage and over-temp (yellow or red). 

[링크 : https://www.raspberrypi.org/forums/viewtopic.php?t=159679]


Finally on the subject of icons, in the past if your Pi was working particularly hard, you might have noticed some yellow and red squares appearing in the top-right corner of the screen, which were indications of overtemperature or undervoltage. These have now been replaced with some new symbols that make it a bit more obvious what’s actually happening; there’s a lightning bolt for undervoltage, and a thermometer for overtemperature. 

[링크 : https://www.raspberrypi.org/blog/introducing-pixel]

    [링크 : https://raspberrypi.stackexchange.com/questions/57963/what-does-the-lightning-bolt-mean/57998]

[링크 : https://www.element14.com/.../pi3-shows-yellow-lightning-bolt-with-official-power-supply...]


+

어떤 레이어에서 출력하나 궁금하네..

단순한(?) OSD 레이어로 출력하는걸려나?


pi@raspberrypi:~ $ vcgencmd get_throttled

throttled=0x50000 

[링크 : https://www.raspberrypi.org/forums/viewtopic.php?f=63&t=147781&start=50#p972790]


+

모니터 없이 써서 내가 몰랐던 걸려나.. 꽤 오래전 부터 있었네..

(생각해보니까 openELEC에서 계속 뜨는데 걍 뜨나보네.. 하고 무시하고 살았....)

pi@raspberrypi:~ $ sudo apt-get install stress stress-ng

pi@raspberrypi:~ $ stress-ng --cpu 4 --io 1 --vm 1 --vm-bytes 128M --timeout 10s --verbose 

[링크 : http://www.solanara.net/solanara/raspberry#head_raspberry_tip_warnicon]



+

커널받아서 검색중

Search "avoid_warnings" (1 hit in 1 file)

  D:\Download\linux-rpi-4.9.y\drivers\gpu\drm\vc4\Kconfig (1 hit)


config DRM_VC4

tristate "Broadcom VC4 Graphics"

depends on ARCH_BCM2835 || COMPILE_TEST

depends on DRM

depends on SND && SND_SOC

depends on COMMON_CLK

select DRM_KMS_HELPER

select DRM_KMS_CMA_HELPER

select DRM_GEM_CMA_HELPER

select DRM_PANEL

select SND_PCM

select SND_PCM_ELD

select SND_SOC_GENERIC_DMAENGINE_PCM

select DRM_MIPI_DSI

help

  Choose this option if you have a system that has a Broadcom

  VC4 GPU, such as the Raspberry Pi or other BCM2708/BCM2835.


  This driver requires that "avoid_warnings=2" be present in

  the config.txt for the firmware, to keep it from smashing

  our display setup. 



+

두개가 동일한 회로인진 모르겠지만.. 일단 Schematic 상에 2B V1.2 에는 

APX803 칩이 내장되어서 무언가 하긴 하는 듯?

[링크 : https://www.raspberrypi.org/.../schematics/Raspberry-Pi-2B-V1.2-Schematics.pdf]


[링크 : https://www.raspberrypi.org/.../schematics/Raspberry-Pi-3B-V1.2-Schematics.pdf]


외형상으로는 걍.. 3핀 SOT로 레귤레이터인가 보다.. 하고 넘어갔던 녀석중에 하나 인 듯


APX803-46의 리셋 경계값이 4.56V(Min) 4.63V(Typical) 4.70V(Max)

[링크 : http://www.mouser.com/ds/2/115/APX803_D-86185.pdf]


+

커널이 아닌 VideoCore IV Firmware에서 관할하기에

라즈베리 커널에서 이미지나 코드 관련해서 뒤져도 해당 아이콘의 이미지가 안나오는 것으로 예상된다

(즉, 내가 찾기 귀찮으니 이정도로 끝내겠다? ㅋㅋㅋ)

[링크 : https://www.raspberrypi.org/forums/viewtopic.php?t=158777[]



+

끝이 아니라니..

이 놈이.. 온도 관련해서 센서 대신 사용하는 놈인가?

주변 온도에 따라 저항값이 달라지는데 이걸 사용하기에는 저항값 변화가 너무 적고..

용도가 머지?


N-CHANNEL ENHANCEMENT MODE MOSFET 

[링크 : https://www.diodes.com/assets/Datasheets/ds31783.pdf]


+

B+ 에서부터 깜박인다고 하는데 깜박이진 않고, 해당 마크에 대한 이야기가 없네.. 머지?

Red power LED is blinking

A blinking red power LED indicates problems with the power supply. On model A and B, it is hard-wired to the 3.3V power supply rail. If it is blinking, as one user has reported[1] it means the 5V power supply is dropping out. Use a different power supply.

On model B+ (and presumably also the A+), the circuit has been improved to give a much more reliable warning of poor power quality. The red power LED is wired to an APX803 supervisor[2] which kicks in when the 5V power supply drops below 4.63V[3]. If it does, the LED will blink. Check your connections, cable, and power supply.

[링크 : https://elinux.org/R-Pi_Troubleshooting#Red_power_LED_is_blinking]


그나저나.. 아이패드 충전기 5V 1A이고 USB 길이가 일어야 30cm도 안될 녀석인데

그 거리에 전압강하가 될리는 없고.. 실측하기도 빡센데 흐음.. 우짜지?

The Raspberry Pi 2 has a 2.2 amp polyfuse which limits the power which may be supplied via the microUSB socket. This is more than enough to power the Pi and the USB sockets.

Initially the USB sockets can only draw 600 mA. At worst this leaves 1.6 amps for the Pi2 and anything connected to the gpios.

By changing a setting after boot software can configure the USB sockets to draw up to 1.2 amps. At worst this leaves 1 amp for the Pi2 and anything connected to the gpios.

You haven't mentioned connecting anything to the gpios or the USB.

The only meaning to the rainbow square in the top right of the screen is that the 5V line has dropped beneath 4.65V.

If you trust the power supply to be accurate the other cause of low voltage is thin wires in the microUSB cable. 

[링크 : https://raspberrypi.stackexchange.com/questions/34305/undervoltage-rainbow-despite-good-power-supply]

Posted by 구차니
embeded/raspberry pi2018. 2. 18. 19:01

라즈베리 파이에 안전모드로 오버클럭 되어 있거나 할 경우에

해당 설정을 무효화 하고 부팅하도록 특정 핀을 연결할 수 있는데 그걸 무시하도록 하는 것

근데.. recalbox랑 이거랑 무슨 연관이 있길래 무효화 하는거지?


It provides a means of recovering from, e.g.


  • too high an overclock
  • a typo in cmdline.txt
  • an incorrect kernel=<filename> parameter
  • an invalid display mode

without requiring a PC. (Obviously it won't help if you've deleted start.elf...) 


Connect pins 5 & 6 with a jumper or piece of wire.


If you are using these pins for your own purposes and want to avoid ending up in safe mode, add this to config.txt:


avoid_safe_mode=1


[링크 : https://elinux.org/RPI_safe_mode]

'embeded > raspberry pi' 카테고리의 다른 글

라즈베리 파이 배포용 이미지 만들기  (0) 2018.02.23
라즈베리 파이 번개모양 아이콘  (2) 2018.02.19
블투 동글이 비싸!  (0) 2018.02.17
라즈베리 2 시리얼이 안되네...?  (0) 2018.01.11
piwall / yodeck  (0) 2017.11.08
Posted by 구차니