embeded/FPGA - ALTERA2018. 1. 2. 23:10

왜 빠른가 했더니 FLASH에 한번도 안쓰고

전부 SRAM에 바로 적용해서 빨랐던 거였군.. -_-


quartus 에서 File - Convert Programming Files


Programming file type을 pof나 jic로 설정해주고

아래의 input files to convert 에서 

JIC는 Flash loader에서 Add Device, SOF Data에서 Add File을 해주고


pof는 SOF Data에서 Add File을 해주면 된다.


프로그래머에서는 구울수 있는 곳이 있는데

기본 프로젝트에서는 죄다 EP4CE22 로만 굽도록 되어 있어 구워도 전부 SRAM으로만 들어가

전원을 끊었다 연결하면 이전 작동으로 돌아가도록 되어있다.


아무튼 Auto Detect 눌러서 비슷한게 나오면 Change Device로 제대로 잡아주고


Device에서 우클릭 해서 Attach Flash Deivce로

EPCS64를 추가해준다.


그러면 신기하게도 Factory default enhanced SFL image라는게 생겨나는데

굽고 나서 add file 누르면 저 이미지가 사라지고, 그러면 jtag으로 구울수가 없다..

도대체 쟤는 어떻게 선택하지?

Posted by 구차니
embeded/FPGA - ALTERA2018. 1. 2. 22:05

데이터 시트랑 자료들 보다 보니.. IV 에는 고속 시리얼 버스 없고 PCIe도 없고

다만 LVDS는 있다고 하길래 HDMI 정도는 별도의 트랜시버 칩 없이 가능하지 않으려나?

생각했는데 역시나.. 누군가 해놓은게 있네.. ㄷㄷ


[링크 : http://sa89a.net/mp.cgi/ele/fpga_hdmi.htm]

[링크 : https://www.youtube.com/watch?v=Y9g6vpcd9ik]

[링크 : https://www.youtube.com/watch?v=hkOZifLUp8s]


+

카페자료

[링크 : http://cafe.naver.com/xinadist/21]

[링크 : http://cafe.naver.com/xinadist/22]

Posted by 구차니
embeded/FPGA - ALTERA2018. 1. 2. 20:33

sof - sram object file

rbf - raw binary file

pof - program object file

[링크 : https://www.altera.com/content/dam/altera-www/global/en_US/pdfs/literature/hb/cyclone-iv/cyiv-51008.pdf]


jic - JTAG Indirect Configuation file

[링크 : http://quartushelp.altera.com/14.1/mergedProjects/reference/glossary/def_jic.htm]


A SOF file programs the FPGA fabric directly (The FPGA's SRAM cells). 

The POF file is used to program an external configuration (A FLASH/EEPROM device - not the actual FPGA). 

[링크 : http://www.alteraforum.com/forum/showthread.php?t=53811]


progammer에서는 jic로 플래시에 굽네.. pof는 어디서 쓸려나?

Posted by 구차니
embeded/FPGA - ALTERA2018. 1. 2. 19:34

DE0-nano의 Altera Cyclone IV에 달린

EPCS64 는 8MB 인데.. 실제로 sof 파일들 보면 688KB로 나온다.

아무튼 NIOS2 예제들을 보면 용량이 조금 더 크게 나온다.

아무튼.. SOF 파일 자체에 FPGA 설정 부분과 NIOS 2 용량으로 구성이 되는것 같고

NIOS 2에서 EPCS Controller를 통해서 MICOM 내부 flash 쓰듯 쓸수 있다는 것을 봐서는

EPCS Controller 에서는 물리 주소와 논리주소로 구분하여 

NIOS 2에서 접근하도록 해주는 역활을 하는 것으로 추측된다.




0xE400이면 58368 인데.. 단위가 머냐...


[링크 : https://www.altera.com/content/dam/altera-www/global/en_US/pdfs/literature/ug/ug_embedded_ip.pdf]


SOPC Builder includes the EPCS device controller core, which is an interface core designed specifically to work with the EPCS device. 

[링크 :https://www.altera.com/content/dam/altera-www/global/en_US/pdfs/literature/hb/cfg/cyc_c51014.pdf]

[링크 : http://www.alterawiki.com/wiki/EPCS_Guide]

Posted by 구차니
embeded/FPGA - ALTERA2018. 1. 2. 10:41

FPGA를 이용해서 MIPS나 RISC-V를 구현해서 SW CPU로

AVR 이나 STM32 대신 쓰도록 하는 프로젝트 인 듯?


[링크 : http://www.nxlab.fer.hr/fpgarduino/]

Posted by 구차니
embeded/FPGA - ALTERA2018. 1. 1. 18:02

NOR 플래시의 경우에는 256byte당 5ms 쉬어 주어야 하는 것 때문에 느릴 수 밖에 없다. 

라는데..일단 artix-7 에서 8분 정도 걸린다고 하고..

[링크 : https://forums.xilinx.com/t5/7-Series-FPGAs/Artix-7-configuration-flash-programming-time/td-p/817714]


이번에 구매한 altera Cyclone IV, DE0-Nano는 프로그램이 크지 않겠지만

sof 파일 자체는 700KB로 거의 동일한데

플래시 자체는 8MB 짜리이고 회사에서 쓴느건 16MB 짜리인데

굽는 시간이 너무 차이난다.


de0-nano를 구울때 길어야 2초?

회사에서 artix-7은 한 체감 10분은 걸린거 같은데..


도대체 무슨 차이일까?


일단..DE0-Nano에 것도 NOR 플래시인데...

도대체 왜이렇게 굽는 속도가 심하게 차이가 날까?

[링크 : http://www.macronix.com/...Flash%20Cross%20Reference%20Guide.pdf]

[링크 : http://www.cypress.com/file/196856/download]


Micron Serial NOR Flash Memory 3V, Multiple I/O, 4KB, 32KB, 64KB, Sector Erase MT25QL128ABA

[링크 : https://www.micron.com/.../mt25q/die-rev-a/mt25q_qlhs_l_128_aba_0.pdf]


+

2018.01.02

지금까지 sof로 쓴거라 SRAM에 후다닥... -_-

즉 플래시에 써본적이 한번도 없었네? 라는 반전 두둥!

어찌어찌 플래시에 쓰는데 그래도 빠르다?

일단 artix-7이 더 클거 같긴한데.. cyclone 4는 한 30초 이내로 700KB가 써지는 느낌이라 빠르긴 빠른 듯

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

altera EPCS controller  (0) 2018.01.02
de0-nano arduino...?  (0) 2018.01.02
terasic DE0-Nano Control Panel 실행오류  (0) 2017.12.31
de0-nano + W5100 Ethernet Shield(arduino)  (0) 2017.12.29
de0-nano + rpi = 채굴머신..  (0) 2017.12.29
Posted by 구차니
embeded/FPGA - ALTERA2017. 12. 31. 20:17

control panel 이라는거 한번 실행해보려니 에러가 뿜뿜

검색하다 보니.. 일단은 내가 신버전을 설치해서 문제가 생긴거 같고

jtag_client.dll은 아래 경로에 존재는 하는데 복사해서 control panel 과 동일한 경로에 복사해도 안된다.

C:\intelFPGA_lite\17.1\quartus\bin64 


해결 방법은.. 아마도(?)

64bit 신버전 quartus 설치한 것이 원인으로 보이는데

dll 을 다운로드 받아 보면 bin32에 압축을 풀라고 되어있고

이거 하나 quartus 아래에 복사해주면 아무런 문제없이 실행이 된다.


Running Control Panel under Quartus II 15.0 or later version

[링크 : http://www.terasic.com.tw/cgi-bin/page/archive.pl?Language=English&No=293

    [링크 : https://www.alteraforum.com/forum/showthread.php?t=5299]

[링크 : http://mail.terasic.com.cn/~wyzhou/bin32.zip] dll 다운로드


프로그램이 이상한건진 모르겠지만 한 0.5초 정도에서 1초 정도의 딜레이 이후에

변경사항이 적용된다.(LED도 늦게 바뀌고, 스위치도 늦게 인식하고)


올리고 나서 켜보니 신기한거 발견

FPGA의 EPCS에 쓰는게 아니라

전원을 차단했다가 켜니 이전 상태로 돌아온다.

내부 램(?)에 바로 써서 그런 듯?

Posted by 구차니
embeded/DSP C2000 Ti2017. 12. 29. 15:54

TMS320 하나 생겨서 찾아보게 됨


간단하게 요약하면.. DSP는 MMX/SSE/AVX 등이 특화된 프로세서라고 하면 되려나?


cortex-m3는 MCU라면

cortex-m4는 DSP 기능을 일부 포함

[링크 : http://www.e4ds.com/sub_view.asp?best=1&ch=3178&t=1&idx=3178]

[링크 : http://www.mcublog.co.kr/7]



[링크 : http://innosian.tistory.com/163]

[링크 : http://innosian.tistory.com/165]


Microcontrollers and DSP are oriented for different target apps.


1) DSP often don't have a flash programm memory, they need the software to be 'loaded' into them. Microcontrollers do have a non power off eraseble program memory inside, with and some have eeprom store capabilites.


2) DSP are much faster for integer maths operations. many microcontrollers even dont have them in hardware this has to be achieved in software (multiplication and division)


3) DSP are hundreds of times faster for floating point operations. In microcontrollers this has to be done in software.


4) DSP are oriented to be an input/output device with 'fast calculating machine'. Microcontrollers are a multifeature device with several ways of interfacing the world but they are not the fastest in none of them.


5) DSP are not designed to be a 'robust' device. By 'not robust' I mean that they require a more well designed board to let the work correctly. Microcontrollers can work on a Test Board! 

[링크 : http://www.microchip.com/forums/m115630.aspx]

[링크 : https://electronics.stackexchange.com/...-difference-between-a-dsp-and-a-standard-microcontroller]

'embeded > DSP C2000 Ti' 카테고리의 다른 글

CCSv6 설치 시도... 실패 ㅠㅠ  (0) 2018.02.09
Code Composer Studio - CCS  (0) 2018.02.09
xds510usb xds510pp  (0) 2018.02.09
TMS320F2808 JTAG 검색..  (0) 2017.12.28
TI TMS320DM368용 JTAG  (0) 2013.07.03
Posted by 구차니
embeded/FPGA - ALTERA2017. 12. 29. 13:04

de0-nano 지르면서 덤으로 준 항목에

W5100 칩셋 사용하는 아두이노 이더넷 실드가 있는데

이거랑 FPGA에 nios2를 연동하는 예제를 발견!


[링크 : http://www.fpgalover.com/ip-cores/wiznet-5100-core]


아두이노 에서 이더넷 실드 사용법

일단.. W5100이 SPI 통신인가 보네.. 순수하게 FPGA로 SPI IP 이용해서 통신이 가능하려나?

[링크 : http://www.instructables.com/id/Arduino-Ethernet-Shield-Tutorial/]

[링크 : https://blog.naver.com/rnc_ohm/220021888182]

[링크 : https://kocoafab.cc/tutorial/view/291]

Posted by 구차니
embeded/FPGA - ALTERA2017. 12. 29. 12:46

FPGA로 채굴하는 이야기는 들었는데

막상 장비가 다 갖춰지니 시험삼아 어떻게 돌아가는지 정도 호기심에

해볼까? 라는 생각이 드네


비트코인 채굴하는건 UART로 통신 하는걸로 보이고..

In the mining rig described here an FPGA does all the hard work (SHA-256 hashing) and communicates over a serial link with a Raspberry Pi

[링크 : https://www.rs-online.com/designspark/bitcoin-mining-with-a-raspberry-pi-and-de0-nano]

[링크 : https://github.com/progranism/Open-Source-FPGA-Bitcoin-Miner]


시리얼

Plug GPIO03 on the DE0-Nano into GPIO 15 on the Raspberry Pi.

Plug GPIO05 on the DE0-Nano into GPIO 14 on the Raspberry Pi.

-> 요건 보니.. RS-232/UART로 연결하는거 같고


패러럴

Plug GPIO 133 on the DE0-Nano into GPIO 8 on the Raspberry Pi

Plug GPIO 131 on the DE0-Nano into GPIO 10 on the Raspberry Pi

Plug GPIO 129 on the DE0-Nano into GPIO 24 on the Raspberry Pi

Plug GPIO 127 on the DE0-Nano into GPIO 4 on the Raspberry Pi

Plug GPIO 125 on the DE0-Nano into GPIO 17 on the Raspberry Pi

Plug GPIO 132 on the DE0-Nano into GPIO 22 on the Raspberry Pi

Plug GPIO 130 on the DE0-Nano into GPIO 9 on the Raspberry Pi

Plug GPIO 128 on the DE0-Nano into GPIO 25 on the Raspberry Pi

Plug GPIO 126 on the DE0-Nano into GPIO 18 on the Raspberry Pi

Plug GPIO 124 on the DE0-Nano into GPIO 23 on the Raspberry Pi

-> 요건.. 8비트 병렬 전송+2비트 제어로 순수 GPIO 제어인듯..

[링크 : http://catherineh.github.io/programming/2016/11/15/raspberry-pi-to-fpga-communication-example]


+

전반적으로 라즈베리와 통신하는게 딱히 이렇다할 고속 인터페이스가 없다 보니 어쩔수 없는 건가...

Posted by 구차니