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 구차니

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

notepad++ for ubuntu?  (0) 2019.12.21
notepad++ 주석 삭제하기  (4) 2018.05.09
notepad++ 따옴표 자동완성 끄기  (0) 2017.12.10
notepad++ 줄순서 뒤바꾸기  (2) 2017.11.22
notepad++ XML 인덴트 적용하기  (0) 2017.07.26
Posted by 구차니

이것저것 테스트 중..

일단 eclipse에서 통합하는 것 보다는

eclipse 에서는 편집하고

cppcheck 독립 GUI 프로그램과

doxygen 독립 GUI 프로그램을 이용하는게 더 간편해 보인다.


eclipse + doxygen 설명 끝판왕 ㄷㄷ

[링크 : https://mcuoneclipse.com/2012/06/25/5-best-eclipse-plugins-1-eclox-with-doxygen-graphviz-and-mscgen/]

[링크 : http://5on7.blogspot.com/2016/01/08-01.html]

[링크 : https://codeyarns.com/2015/06/11/how-to-use-cppcheck-with-eclipse-cdt/]



com(alt+enter) 자동완성으로 comment

/* 엔터 (주석 자동완성)

/// 엔터

[링크 : https://questionfocus.com/change-doxygen-comment-style-in-eclipse.html]


java doxygen Alt-Shift-J

이건.. 다른 단축키와의 충돌로 사라진거 같기도 하고?

[링크 : http://zzznara2.tistory.com/75]


doxygen 문법 - 함수는 이 정도면 되려나?

/*

 * @brief 간략한 설명

@details 상세 설명

@param int a 변수 int a에 대한 설명

@return 반환갑 설명

 */ 

[링크 : http://onecellboy.tistory.com/342]


cppcheck에서 clang을 쓰려면 프로젝트 에서 경고 띄우도록 설정해야 하는 듯?

[링크 : https://sourceforge.net/p/cppcheck/wiki/Home/]


다운로드 링크

[링크 : https://www.eclipse.org/downloads]

[링크 : http://www.stack.nl/~dimitri/doxygen/download.html]

[링크 : https://sourceforge.net/projects/cppcheck/]

[링크 : http://releases.llvm.org/download.html]


2012/02/07 - [프로그램 사용/eclipse CDT & minGW] - eclipse cdt + eclox + doxygen

2015/09/30 - [Programming/C / Win32 / MFC] - Cppcheck

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 구차니

ActiveX 없애면서 상주 프로그램이 바뀌었는데


생각해보면


내가 편의점을 가끔 쓰는데

편의점 회사에서 24시간 우리집 감시하는 직원을 우리집으로 파견하고

우리집에서 먹고 자게 하는데

알고보니 제일도 제대로 못하고 밥만 축내는 놈이라는 넌센스?




아무튼 모 정당 대표 이름이랑 같아서

두배로 더 마음에 안드는데

그냥 겸사겸사 회사명도 좀 바꾸라고 하고 싶고

궁극적으로 은행사 홈페이지에서 보안 솔루션들 좀 없애도록 하면 좋겠다.

Posted by 구차니
Programming/Verilog2018. 1. 1. 09:51

always @ (posedge

이런식으로 많이 쓰이는데

always 자체는 패러럴 구문이지만 @와 결합해서 시퀀셜 하게 쓰이는 듯 하고,

@는 event에 대한 기술이다.


3. PARALLEL STATEMENTS 

always sequential_statement


5. SEQUENTIAL STATEMENTS

@ (event [{or event}]) sequential_statement

[링크 : http://www.ece.uvic.ca/~fayez/courses/ceng465/vlogref.pdf]


다만 =는 블럭킹(sequential, block) 으로

<=는 넌블러킹(parallel, non-blocking)으로 작동하게 되는데

[링크 : https://courses.cs.washington.edu/courses/cse467/03wi/Verilog3.pdf]

[링크 : https://class.ee.washington.edu/371/peckol/doc/Always@.pdf]


always 내에서 블럭킹으로 할 경우 race condition의 위험이 있다고 한다.

[링크 : https://www.nandland.com/vhdl/tutorials/tutorial-process-part1.html]

[링크 : http://aboutmadlife.blogspot.kr/2015/01/verilog-blocking-non-blocking.html]

'Programming > Verilog' 카테고리의 다른 글

베릴로그 순차적 구조적  (2) 2018.01.18
structural vs behavioral verilog  (0) 2018.01.12
verilog vector instance  (0) 2018.01.09
verilog 2001 ** 연산자  (0) 2018.01.01
verilog 코드 분석  (0) 2018.01.01
Posted by 구차니
Programming/Verilog2018. 1. 1. 09:37

VHDL 에서는 기본으로 있었던거 같은데

** 연산자는 지수승에 대한(밑이 2) 연산자로

Verilog 2001 부터 추가되었다고 한다.

지금에 와서는 거의 모든 개발 툴에서 2001을 지원하겠지?


[링크 : http://www.asic-world.com/verilog/verilog2k1.html]

'Programming > Verilog' 카테고리의 다른 글

베릴로그 순차적 구조적  (2) 2018.01.18
structural vs behavioral verilog  (0) 2018.01.12
verilog vector instance  (0) 2018.01.09
verilog always  (0) 2018.01.01
verilog 코드 분석  (0) 2018.01.01
Posted by 구차니
Programming/Verilog2018. 1. 1. 08:24

de0-nano 가속도 센서 예제 

예제가 죄다 verilog네 -_- VHDL을 공부하려는 나의 계획은 이렇게 날아 가는건가!!!


// -------------------------------------------------------------------- // Copyright (c) 2011 by Terasic Technologies Inc. // -------------------------------------------------------------------- // // Permission: // // Terasic grants permission to use and modify this code for use // in synthesis for all Terasic Development Boards and Altera Development // Kits made by Terasic. Other use of this code, including the selling // ,duplication, or modification of any portion is strictly prohibited. // // Disclaimer: // // This VHDL/Verilog or C/C++ source code is intended as a design reference // which illustrates how these types of functions can be implemented. // It is the user's responsibility to verify their design for // consistency and functionality through the use of formal // verification methods. Terasic provides no warranty regarding the use // or functionality of this code. // // -------------------------------------------------------------------- // // Terasic Technologies Inc // 356 Fu-Shin E. Rd Sec. 1. JhuBei City, // HsinChu County, Taiwan // 302 // // web: http://www.terasic.com/ // email: support@terasic.com // // -------------------------------------------------------------------- // // Major Functions: G Sensor utilization // // -------------------------------------------------------------------- // // Revision History : // -------------------------------------------------------------------- // Ver :| Author :| Mod. Date :| Changes Made: // V1.0 :| Rosaline Lin :| 02/16/2011 :| Initial Revision // -------------------------------------------------------------------- //======================================================= // This code is generated by Terasic System Builder //======================================================= module DE0_NANO_G_Sensor( //////////// CLOCK ////////// CLOCK_50, //////////// LED ////////// LED, //////////// KEY ////////// KEY, //////////// Accelerometer and EEPROM ////////// G_SENSOR_CS_N, G_SENSOR_INT, I2C_SCLK, I2C_SDAT ); //======================================================= // PARAMETER declarations //======================================================= //======================================================= // PORT declarations //======================================================= //////////// CLOCK ////////// input CLOCK_50; //////////// LED ////////// output [7:0] LED; //////////// KEY ////////// input [1:0] KEY; //////////// Accelerometer and EEPROM ////////// output G_SENSOR_CS_N; input G_SENSOR_INT; output I2C_SCLK; inout I2C_SDAT; //======================================================= // REG/WIRE declarations //======================================================= wire dly_rst; wire spi_clk, spi_clk_out; wire [15:0] data_x; //======================================================= // Structural coding //======================================================= // Reset reset_delay u_reset_delay ( .iRSTN(KEY[0]), .iCLK(CLOCK_50), .oRST(dly_rst)); // PLL spipll u_spipll ( .areset(dly_rst), .inclk0(CLOCK_50), .c0(spi_clk), // 2MHz .c1(spi_clk_out)); // 2MHz phase shift // Initial Setting and Data Read Back spi_ee_config u_spi_ee_config ( .iRSTN(!dly_rst), .iSPI_CLK(spi_clk), .iSPI_CLK_OUT(spi_clk_out), .iG_INT2(G_SENSOR_INT), .oDATA_L(data_x[7:0]), .oDATA_H(data_x[15:8]), .SPI_SDIO(I2C_SDAT), .oSPI_CSN(G_SENSOR_CS_N), .oSPI_CLK(I2C_SCLK)); // LED led_driver u_led_driver ( .iRSTN(!dly_rst), .iCLK(CLOCK_50), .iDIG(data_x[9:0]), .iG_INT2(G_SENSOR_INT), .oLED(LED));  

endmodule 

D:\de-nano\DE0-Nano_v.1.2.3_SystemCD\Demonstration\DE0_NANO_GSensor\DE0_NANO_G_Sensor.v

D:\de-nano\DE0-Nano_v.1.2.3_SystemCD\Demonstration\DE0_NANO_GSensor\v\led_driver.v


module module_name(module_in_outs);

// 일종의 입출력 변수들 정의(타입은 아직 정의하지 않고 이름만 정의


    // module의 핀(?)에 대한 입출력 방향과 타입을 정의

    input pin_name;

    output pin_name2;

    inout pin_name3;


    // 방향 지시자 없는 내부변수 선언

    wire pin_nam4;

    reg [1:0] count;


    // 행위를 정의함 - structural coding 라고 써있음

    assign out = in;


    // 조사필요

   always@(posedge iCLK or negedge iRSTN)

   submodule sub_module_name

   (

      .sub_module_pin(main_module_pin),

   );

// module의 끝

endmodule 


wire랑 reg도 변수 타입이고 그 외에는 int, real 등의 타입도 있다고..

[링크 : http://wiki.vctec.co.kr/devboard/fpga/spartan-3a-fpga-gaebalbodeu--elbert/module]

'Programming > Verilog' 카테고리의 다른 글

베릴로그 순차적 구조적  (2) 2018.01.18
structural vs behavioral verilog  (0) 2018.01.12
verilog vector instance  (0) 2018.01.09
verilog always  (0) 2018.01.01
verilog 2001 ** 연산자  (0) 2018.01.01
Posted by 구차니