embeded/FPGA - ALTERA2018. 1. 3. 23:49

문서를 보다 보니 Active Serial / Passive Serial 이라는 단어가 나와서 검색해보니..

일단 Active/Passive는 FPGA의 기준으로 보면 될 것 같다.

Active Serial은 FPGA가 활성화 되서 master 로서 EPCS나 EPCQ를 쓰는 것이고

Passive Serial은 FPGA가 플래시에 관여하지 않고 별도의 micom이나 다른 장치를 통해 플래시를 굽는 것이다.



[링크 : https://www.altera.com/support/support-resources/support-centers/devices/cfg-index/cfg-compare.html]


The Active Serial (AS) configuration scheme is supported in the 1 bit data width (AS x1) or the 4 bit data width (AS x4). The AS x4 scheme is supported only in Stratix® V devices. AS configuration can be performed using an Altera® serial configuration (EPCS) device or quad-serial configuration (EPCQ) device. During AS configuration, the Altera FPGA acts as the configuration master and the EPCS or EPCQ device acts as the configuration slave. The FPGA outputs the clock on the DCLK pin and receives the configuration data from the EPCS or EPCQ device on the data pin(s).

[링크 : https://www.altera.com/support/support-resources/support-centers/devices/cfg-index/cfg-as.html]


Passive serial (PS) configuration can be performed using an Altera® download cable, an Altera configuration device, or an intelligent host such as a microprocessor. During PS configuration, data is transferred from a configuration device, flash memory, or other storage device to the Altera device on the DATA0 pin. This configuration data is latched into the FPGA on the rising edge of DCLK. Configuration data is transferred at a rate of one bit per clock cycle.

[링크 : https://www.altera.com/support/support-resources/support-centers/devices/cfg-index/cfg-ps.html]


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


To program a device in JTAG or Passive Serial mode:

  1. On the File menu, click Open and select the Chain Description File that contains the JTAG or Passive Serial chain you wish set up.

  2. Plug the download cable into the system that contains the devices or device to program.

  3. If necessary, select the appropriate hardware setup for the chain.

  4. If necessary, in the Mode list, select JTAG or Passive Serial.

  5. If you are using JTAG mode, and you want to automatically add devices in a device chain to the programming list, click Auto Detect.

  6. Make sure the device name(s) displayed in the Device list matches the device(s) installed in the system.

  7. If you want, turn on one or more programming options in the programming list.

  8. To start programming or other optional action, click Start.

[링크 : http://quartushelp.altera.com/15.0/mergedProjects/program/pgm/pgm_pro_prog_single_as_device.htm]

Posted by 구차니
embeded/FPGA - ALTERA2018. 1. 3. 09:10

대부분이 LVTTL(3.3V로 작동해서 가능 한 듯?)


마우스 꽂아서 핑퐁 게임 ㄷㄷ

[링크 : http://www.fpga4fun.com/PongGame.html]


NTSC 콤포짓 영상 만들기

[링크 : http://excamera.com/sphinx/fpga-ntsc.html]


VGA test 패턴

[링크 : http://maximator-fpga.org/examples/]


ADV7123 비디오 DAC 이용한 예제

[링크 : https://eewiki.net/pages/viewpage.action?pageId=15925278]

1600x1200@100Hz 가능한 녀석인 듯

[링크 : https://people.ece.cornell.edu/land/courses/ece5760/DE1_SOC/ADV7123.pdf]

Posted by 구차니
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/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 구차니