embeded/FPGA - ALTERA2018. 6. 2. 22:36

카운터 증가 하는데

클럭에 연계해서 작동시키는 부분에서

클럭 엣지 트리거 부분에 여러개 작성하니 에러 발생..


 always @ (posedge clk or negedge rst)

begin

if (~rst)

cnt <= 0;

else

begin

if(cnt < 834000)

cnt <= cnt + 1;

else

cnt <= 0;

end

if(cnt < HSYNC)

hsync <= 1;

else hsync <= 0;

if(cnt < VSYNC)

vsync <= 1;

else vsync <= 0;

end


아래는 해결 한 것

음.. 자세한 내용은 나중에 찾아봐야지.. 이해를 못하고 있음 ㅠㅠ

 always @ (posedge clk or negedge rst)

begin

if (~rst)

cnt <= 0;

else

begin

if(cnt < 834000)

begin

cnt <= cnt + 1;

if(cnt < HSYNC)

hsync <= 1;

else hsync <= 0;

if(cnt < VSYNC)

vsync <= 1;

else vsync <= 0;

end

else

cnt <= 0;

end

end


[링크 : https://www.edaboard.com/showthread.php?326768...-enclosing]

Posted by 구차니
embeded/FPGA - ALTERA2018. 5. 30. 15:14

DE0-nano에 실습중

일단.. module 선언이 아래 있던 위에있던 상관이 없나 보네..

머가 잘못되서 안되었던건지 모르겠지만 아무튼 책 보고 따라 치니 작동은 한다.


//=======================================================

//  This code is generated by Terasic System Builder

//=======================================================

module PwmCtrl(RST_N, CLK, LED0);

input RST_N, CLK;

output LED0;

reg[27:0] counter0;

always @(negedge RST_N or posedge CLK)

begin

if(RST_N == 1'b0)

begin

counter0 <= 0;

end else begin

counter0 <= counter0 + 1;

end

end

assign LED0 = counter0[26];

endmodule


module DE0_NANO(

//////////// CLOCK //////////

CLOCK_50,

//////////// LED //////////

LED,

//////////// KEY //////////

KEY 

);


//=======================================================

//  PARAMETER declarations

//=======================================================



//=======================================================

//  PORT declarations

//=======================================================


//////////// CLOCK //////////

input           CLOCK_50;

//////////// LED //////////

output      [7:0] LED;

//////////// KEY //////////

input      [1:0] KEY;


//=======================================================

//  REG/WIRE declarations

//=======================================================


//=======================================================

//  Structural coding

//=======================================================

PwmCtrl pwm(KEY[0],

CLOCK_50,

LED[0]);

endmodule 


원래는 counter0[27] 인데 너무 느려서 counter0[26]으로 변경


그리고 signalTap 이용해서 데이터 받아봄

(PLL 사용해서 클럭 분주하고 그걸 이용해 샘플링 주기를 변경해 봐야 할 듯)

2018/05/30 - [embeded/FPGA - ALTERA] - signal Tap 2와 talkback?

2018/05/24 - [embeded/FPGA - ALTERA] - altera signalTap <<

Posted by 구차니
embeded/FPGA - ALTERA2018. 5. 30. 10:43

18.0 버전인데 설정 없어도 잘만 된다 -ㅁ-

저번에는 대충한다고 먼가 빼먹은게 있어서 안되었던 듯..


---

읭? 왜 signal tap이 안되나 해보는데

옵션에 안보인다?

혹시 Lite Edition이라 그런가?



To enable the TalkBack feature in Quartus Prime, select Tools > Options. In the Options window, select Internet Connectivity from the menu, and click on TalkBack Options... to open the window shown in Figure 2. If you accept the TalkBack License Agreement, then check the box labelled Enable sending TalkBack data to Intel and click OK. 

[링크 : ftp://ftp.altera.com/up/pub/Intel_Material/17.0/Tutorials/Verilog/SignalTap.pdf]


어디선가 동의하면 된다고는 하는데..

Signal Tap logic analyzer 1

Notes:

1. Available with Talkback feature enabled in the Intel Quartus Prime Lite Edition software.

[링크 : https://www.altera.com/.../pdfs/literature/br/br-quartus-prime-software.pdf]


이거는 설치 폴더에 뒤져봐도 안나오고

Run tb2_install to enable the TalkBack feature.

[링크 : https://www.altera.com/quartushelp/current/index.htm#msgs/msgs/ecpt_talkback_required.htm]


Standard Edition 피쳐로 아래 존재하는 걸 Pro에서는 지원안한다..

Lite에는 그럼 Talkback이 없을수도 있나?

Intel Quartus Prime Pro Edition software does not support the following Intel Quartus Prime Standard Edition features:

— I/O Timing Analysis

— NativeLink third party tool integration

— Video and Image Processing Suite IP Cores

Talkback features

— Various register merging and duplication settings

— Saving a node-level netlist as .vqm

— Compare project revisions 

[링크 : https://www.altera.com/.../pdfs/literature/ug/ug-qpp-getting-started.pdf]


엥?

2016.10.31 16.1.0

Removed all references to Talkback feature.

Changed instances of Altera to Intel FPGA. 

[링크 : https://www.altera.co.jp/documentation/esc1425946071433.html]


※ Quartus Prime Lite Edition の場合は、16.0 以前のバージョンを使用する際 TalkBack 機能を有効にする 必要があります。詳細はこちらの TIPS をご覧ください。 

구글번역

Quartus Prime Lite Edition의 경우 16.0 이전 버전을 사용하는 경우 TalkBack 기능을 활성화해야합니다. 자세한 것은 이쪽의 TIPS를 참조하십시오. 

[링크 : https://service.macnica.co.jp/article_files/126561/ELS1444_Q1710_10__1.pdf]


21분 부터 시연(pro 버전)

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

Posted by 구차니
embeded/FPGA - ALTERA2018. 5. 29. 09:47

OV7670 / HDMI / VGA

일단.. VGA 테스트 패턴 해본 다음

OV7670 따라해보고

그 다음에 천천히 HDMI 테스트 패턴 출력해봐야지..


회로도 받아야 하고..

카페 검색해보니 4bit씩 R/G/B에 되어있다고..



회로도는 구매하신분에게 한하서 공개라고 하신거 봐서는

블로그에 회로도 올리면서 무언가 작업하긴 힘들듯..

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

PWM 발생기 1개 연결하기  (0) 2018.05.30
signal Tap 2와 talkback?  (0) 2018.05.30
altera signalTap  (0) 2018.05.24
quartus device family 삭제하기  (0) 2018.05.23
책 도착!  (2) 2018.05.21
Posted by 구차니
embeded/FPGA - ALTERA2018. 5. 24. 16:34

2018.05.30


이전과 거의 같은데 검색이 잘 안나오면

Filter에서 Design Entry(all names) 해주면 제대로 나오고


모니터링할 노드와 클럭을 정상적으로 추가해주면


아래와 같은 모습이 된다

SOF Manager 우측에는 해당 프로젝트의 SOF를 선택해주면 굳이 Programmer 가지 않아도 되니 편리함.

좌측 상단의 Instance를 누르면 Instance Manager에 버튼이 활성화 되고

Run Analysis - F5 버튼을 누르면 


약간의 시간이 지난뒤 아래와 같이 파형이 나온다

(일단 div/2 로 LED를 점멸하게 소스를 수정함)



//=======================================================

//  This code is generated by Terasic System Builder

//=======================================================

module PwmCtrl(RST_N, CLK, LED0);

input RST_N, CLK;

output LED0;

reg[27:0] counter0;

always @(negedge RST_N or posedge CLK)

begin

if(RST_N == 1'b0)

begin

counter0 <= 0;

end else begin

counter0 <= counter0 + 1;

end

end

assign LED0 = counter0[1];


endmodule


module DE0_NANO(

//////////// CLOCK //////////

CLOCK_50,

//////////// LED //////////

LED,

//////////// KEY //////////

KEY 

);


//=======================================================

//  PARAMETER declarations

//=======================================================


//=======================================================

//  PORT declarations

//=======================================================


//////////// CLOCK //////////

input           CLOCK_50;

//////////// LED //////////

output      [7:0] LED;

//////////// KEY //////////

input      [1:0] KEY;


//=======================================================

//  REG/WIRE declarations

//=======================================================


//=======================================================

//  Structural coding

//=======================================================

PwmCtrl pwm0(KEY[0],CLOCK_50,LED[0]);

endmodule 



---

LE와 M4K 이런거 소모해서

내부적으로 로직을 저장하고 디버깅에 도움을 주는 녀석


Tools - Signal Tap Logic Analyzer


우측 상단의 JTAG Chain Configuration 에서 DE0-nano의 USB-Blaster를 선택하면

자동으로 Device는 검색되는데, 정상적으로 안되면 Scan Chain을 눌러주면 된다.


오른쪽 중앙의 Signal Configuration 에서 Clock을 설정해주고

왼쪽의 auto_signaltap_0 에 "Double-click to add nodes"를 더블클릭해 모니터링할 노드를 추가한다.


그럼 상단에 컴파일 하라고 빨간색으로 뜨고


저장하면 stp 확장자(SignalTaP 약자인듯?)로 설정을 저장하게 하고


프로젝트 연동하도록 도와준다.



[링크 : http://pages.hmc.edu/harris/class/e155/SignalTap.pdf]

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


+

2018.06.05

간단한 녀석으로 해보니 (hsync + vsync + 20bit 카운터 + 4비트 rgb)

8K 까지는 빌드가 되지만, 16K 부터는 아래와 같은 에러가 발생하며 중단된다.

Error (170048): Selected device has 66 RAM location(s) of type M9K.  However, the current design needs more than 66 to successfully fit

Error (171000): Can't fit design in device 


대신 저장할 항목을 줄이고(hsync + vsync) 32K로는 성공


즉, singaltap의 sample depth는 저장할 신호당 용량이기에

저장할 노드 갯수 * sample depth 만큼의 용량을 필요로 하게 된다.


+

2018.06.05

Signal Tap의 Enable을 꺼주면 빌드시 시간이 줄어든다(말그대로 Signal Tap 비활성화)

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

signal Tap 2와 talkback?  (0) 2018.05.30
레몬 라이트 옵션보드 도착  (2) 2018.05.29
quartus device family 삭제하기  (0) 2018.05.23
책 도착!  (2) 2018.05.21
엥.. Quartus II Lite Edition... 라이센스?  (0) 2018.05.18
Posted by 구차니
embeded/FPGA - ALTERA2018. 5. 23. 08:52

device familiy 추가는 했는데 삭제하는법 몰라서 헤메다가

출근하고 검색어 생각나서 찾아보니 띠용~


quartus II를 uninstall 할때 modify 선택해서 하라는데 일단 메뉴가 달라진거 같고

17.1 버전에서는 아래와 같이 uninstall mode에서 개별 컴포넌트 선택해서 진행하면 된다.


[링크 : https://www.altera.com/support/support-resources/knowledge-base/solutions/rd02282005_815.html]

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

레몬 라이트 옵션보드 도착  (2) 2018.05.29
altera signalTap  (0) 2018.05.24
책 도착!  (2) 2018.05.21
엥.. Quartus II Lite Edition... 라이센스?  (0) 2018.05.18
Nios II 컴파일 관련  (0) 2018.05.18
Posted by 구차니
embeded/FPGA - ALTERA2018. 5. 21. 15:13

카페에서 공구해서 저렴하게 획득!

솔찍히 저번주에 사서 산걸 잊고 있었네.. ㅠㅠ

[링크 : http://www.yes24.com/24/goods/60856713]

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

altera signalTap  (0) 2018.05.24
quartus device family 삭제하기  (0) 2018.05.23
엥.. Quartus II Lite Edition... 라이센스?  (0) 2018.05.18
Nios II 컴파일 관련  (0) 2018.05.18
altera conf_done  (0) 2018.05.04
Posted by 구차니
embeded/FPGA - ALTERA2018. 5. 18. 17:22

오늘 오랫만에 켜니까 어라?

라이센스 알림. 만료까지 10일 남았음?


아무튼 메뉴가서 보니.. 라이센스가 없긴 하네..

subscription Expiration 2017.11 ?


Download License를 눌러서 일단 가니..

가장 위에꺼 눌러야 할 거 같은 느낌


로그인 하고 나니 먼가 막 많이 쓰란다.. 망할


근데.. Lite Edition Free, no license required 라며!


아무튼 입력하고 continue하니 12시간 이내에 메일로 쏩니다~

그런데 MAC 했으니.. 집에서도 하려면 또 따로 등록해야 하나?


메일을 확인하니 왔네?


Setting Up MAX+PLUS II Licensing ?

MAX II,V 이런 거 지원하도록 깔아서 그런건가?

[링크 : https://www.altera.com/support/support-resources/software/download/ins-license.html]


의심가는건 이거 뿐인데.. 별다른 라이센스 경고를 못 본거 같은데..

2018/04/17 - [embeded/FPGA - ALTERA] - Device Installer (Quartus Prime 17.1)

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

quartus device family 삭제하기  (0) 2018.05.23
책 도착!  (2) 2018.05.21
Nios II 컴파일 관련  (0) 2018.05.18
altera conf_done  (0) 2018.05.04
quartus 프로젝트 entry point 설정  (0) 2018.04.17
Posted by 구차니
embeded/FPGA - ALTERA2018. 5. 18. 16:56

카페에서 메일로 보내주신 내용 따라해보는 중


예전에 mem_test를 이용해서 프로젝트를 만들었는데

이클립스 쓰다보니.. 그냥 당연히(?) build 하면 되겠지 하고 빌드만 했는데 새로운 메뉴가 있었다 -ㅁ-


평소에 하던건 이 Build Project 였고


아래 보이듯, make all을 통해 빌드를 진행한다.

16:45:28 **** Incremental Build of configuration Nios II for project hello_world_0 ****

make all 

Info: Building ../hello_world_0_bsp/

C:/intelFPGA_lite/17.1/nios2eds/bin/gnu/H-x86_64-mingw32/bin/make --no-print-directory -C ../hello_world_0_bsp/

[BSP build complete]

[hello_world_0 build complete]


16:45:29 Build Finished (took 1s.5ms)


그에 반해 Make Targets - Build에서


mem_init_generate를 선택하고 Build 하면


make mem_init_generate로 다른 방식(?)을 통해 명령어를 수행하게 된다.

16:48:29 **** Build of configuration Nios II for project hello_world_0 ****

make mem_init_generate 

Info: Building ../hello_world_0_bsp/

C:/intelFPGA_lite/17.1/nios2eds/bin/gnu/H-x86_64-mingw32/bin/make --no-print-directory -C ../hello_world_0_bsp/

[BSP build complete]


16:48:30 Build Finished (took 1s.54ms)


아무튼 빌드하고 나니 아래 같은 파일들이 생성/수정(?) 되엇고

qip는 quartus II 프로젝트에 추가하고 아래 파일중에 골라서(?) 넣으면 된다는데

느낌적인 느낌으로는.. unsaved_epcs_flash_controller_0_boot_rom.flash를 넣으면 될거 같긴한데..

의외로 unsaved_onchip_memory2_0.hex 일려나? 파일 뜯어 봐야겠네..


파일 열어 봤는데

unsaved_epcs_flash_controller_0_boot_rom.flash 는.. HEX는 HEX인데 intel HEX 포맷은 아닌 느낌이고

unsaved_onchip_memory2_0.hex 는 데이터 있는 부분까지의 길이는 비슷한데 데이터 내용이 다른 느낌이라...

멀 써야 하려나?


+

qip를 일단 quartus II 에서 추가 하고 빌드 하는데

해당 파일에는 딱 한줄짜리 내용만 있는데 무슨 차이가 생길려나?


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

책 도착!  (2) 2018.05.21
엥.. Quartus II Lite Edition... 라이센스?  (0) 2018.05.18
altera conf_done  (0) 2018.05.04
quartus 프로젝트 entry point 설정  (0) 2018.04.17
Device Installer (Quartus Prime 17.1)  (0) 2018.04.17
Posted by 구차니
embeded/FPGA - ALTERA2018. 5. 4. 08:11

epcs에서 fpga 게이트 설정 읽어들인후

사용이 가능해지는 시점에 핀이 high로 감


[링크 : https://www.altera.com/en_US/pdfs/literature/hb/cfg/cfg_cf51001.pdf]



de0-nano 프로젝트 열어서 보니

핀으로 할당되진 않았지만 FPGA 핀 중에

D - CONF_DONE

F - nCONFIG

S - nSTATUS

등의 핀이 따로 보이긴 한다.


핀 아웃 파일에도 H14에 설정되어 있다.

[링크 : https://www.altera.com/content/dam/altera-www/global/en_US/pdfs/literature/dp/cyclone-iv/ep4ce15.xls]

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

엥.. Quartus II Lite Edition... 라이센스?  (0) 2018.05.18
Nios II 컴파일 관련  (0) 2018.05.18
quartus 프로젝트 entry point 설정  (0) 2018.04.17
Device Installer (Quartus Prime 17.1)  (0) 2018.04.17
Quartus 프로젝트 생성  (0) 2018.04.16
Posted by 구차니