Microsoft/Office2018. 2. 1. 18:23

조건부 서식으로는 #N/A는 에러로 간주한다.


[링크 : http://ttend.tistory.com/403]

Posted by 구차니
embeded/FPGA - ALTERA2018. 2. 1. 11:43

eclipse 에서 Nios II - Flash Programmer 혹은 Ctrl-7 단축키로 하면 아래 녀석이 실행되는데

File - New에서 요구하는 파일을 열어준다.


BSP는 hello_world_0_bsp 아래에 있는 파일이고

sopc야 적당히 찾으면 될꺼고..


아무튼 부르면 저렇게 UI가 바뀌는데, 중간에 Add에서 빌드한 elf를 넣어주면


이렇게 바뀐다. 가장 아래 Start 누르면 변환하고 알아서 굽는데


머가 문제라 안될까...

Info: 2018. 2. 1 오전 11:40:05 - (정보) elf2flash: args = --input=D:/Download/DE0_NANO/software/hello_world_0/hello_world_0.elf --output=D:/Download/DE0_NANO/software/hello_world_0_bsp/flash/hello_world_0_epcs_flash_controller_0.flash --epcs --verbose

Info: 2018. 2. 1 오전 11:40:05 - (미세) elf2flash: Starting

Info: 2018. 2. 1 오전 11:40:05 - (보다 미세) elf2flash: Program Record: 3964 bytes destined for 0x8000

Info: 2018. 2. 1 오전 11:40:05 - (보다 미세) elf2flash: Program Record: 724 bytes destined for 0x9250

Info: 2018. 2. 1 오전 11:40:05 - (보다 미세) elf2flash: Start Record: 8020

Info: 2018. 2. 1 오전 11:40:05 - (미세) elf2flash: Done

Info: Using cable "USB-Blaster [USB-0]", device 1, instance 0x00

Info: Resetting and pausing target processor: 

Info: OK

Info: Reading System ID at address 0x00012030: 

Info: verified

Info: Processor data bus width is 32 bits

Info: Looking for EPCS registers at address 0x00011000 (with 32bit alignment)

Info:   Initial values: 0001703A 04C00074 9801483A 9CFFF804 983FFD1E 0000203A

Info:   Not here: reserved fields are non-zero

Info: Looking for EPCS registers at address 0x00011100 (with 32bit alignment)

Info:   Initial values: 93000237 6300080C 603FFD26 90000335 A8000C26 03010004

Info:   Not here: reserved fields are non-zero

Info: Looking for EPCS registers at address 0x00011200 (with 32bit alignment)

Info:   Initial values: 02C02004 002EE03A 00000F06 90000335 4000683A 0017883A

Info:   Not here: reserved fields are non-zero

Info: Looking for EPCS registers at address 0x00011300 (with 32bit alignment)

Info:   Initial values: 003FD006 5280040C 501496FA 701CD07A 729CB03A 843FFFC4

Info:   Not here: reserved fields are non-zero

Info: Looking for EPCS registers at address 0x00011400 (with 32bit alignment)

Info:   Initial values: 00000000 00000000 00000260 00000000 00000000 00000001

Info:   Valid registers found

Info: EPCS signature is 0x00

Info: EPCS identifier is 0x000000

Info: Leaving target processor paused

Error: No EPCS layout data - looking for section [EPCS-000000]

Error: Unable to use EPCS device

Error: Error code: 8 for command: nios2-flash-programmer "D:/Download/DE0_NANO/software/hello_world_0_bsp/flash/hello_world_0_epcs_flash_controller_0.flash" --base=0x11000 --epcs --sidp=0x12030 --id=0x0 --timestamp=1517370555 --device=1 --instance=0 '--cable=USB-Blaster on localhost [USB-0]' --program --verbose  



+

요건 이미 초기에 조치한 내용이고..

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


흐음.. 이 설정이 문제인가?

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


qsys예제에는 아래처럼 되어 있어서 별 문제 없을거 같은데..


음.. 리셋벡터가 문제인가?

[링크 : http://www.heijin.org/forum.php?mod=viewthread&tid=30351]


일단.. qsys 예제 열어 보는데, 전부 선을 연결안하는 식으로 구성고...

epcs 라는 이름에 epcs_external 이라고 변수명 붙여줘야 하나?

epcs의 주소는 0x000으로 고정했고.. 

cpu 리셋벡터는 sdram으로 되어있어서 문제 될 건 없어 보이는데..



생각해보니 epcs를 net로 연결안해줘서 발생하는 문제인듯 하다

[링크 : https://www.emb4fun.de/fpga/nutos1/]

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

Nios II 조금 감 잡은듯  (0) 2018.02.02
xilinx easypath / Altera hardcopy  (0) 2018.02.02
de0-nano SDRAM with Nios II  (0) 2018.01.31
EPCS Controller 추가 및 jic 통합하기.. 실패중  (0) 2018.01.31
Nios II BSP 빌드관련  (0) 2018.01.31
Posted by 구차니
개소리 왈왈/독서2018. 2. 1. 10:07

솔찍히 다 읽고 나서도 무엇을 말하고 싶었나? 이런 생각이 드는

내 기억도 사라지는 책


일단.. 인상 깊었던 것은

기술의 발달로 기록 자체의 판독성과 장기 보존성 자체는 더욱 떨어지고 있지만

기록능력과 생산능력들의 싸움에서 기록능력이 지진 않고 있기 때문에 더 많은 것들을 기록하고 있지만

정말 중요한건 무엇을 기록할 것인가? 라는 점이 아닐까 라는 내용이다.

(SD 메모리 하나에 어마어마한 용량이 저장되었지만, 이 플래시 메모리가 저장을 안정적으로 할 수 있는 기간은

동굴벽화만도 못하고 컴퓨터라는 또 다른 기기가 없으면 내용을 볼수가 없다. 

만약 인류가 멸망하고 다음 세대의 생명체가

화석으로 남은 SD 메모리를 고온 고압에 변형된 컴퓨터 복원하여 그 안에 데이터를 볼 수 있을까?)


나도 NAS를 가지고 이것저것 축적해 나가고 있지만

개인적으로 필요한 정보들이지, 인류라는 면에서 과연 이게 보존되어야 할 내용인가 싶기도 하고

결국은 사람이 인식하고 인지하며 유지가능한 기억의 범위가 외부 장치에 의해서 늘어난다고 한들, 

개인이 지닌 처리 능력에는 한계가 있기에,

망각이라는 선물이 존재하는게 아닐까. 그러기에 그러한 기록 자체가 시간이 지나면

왜 이걸 가졌지? 라는 추억으로 환원되는게 아닌가 생각된다.


내용은 그냥 그렇고.. (아주 흥미를 끌만한 내용까지 전개되진 않음)

하나의 내용 자체가 너무 짧아서 조금 읽을만하면 끝나고 그런 구조라 더 집중이 안되었던 듯 하다.


[링크 : http://www.kyobobook.co.kr/product/detailViewKor.laf?barcode=9791186665343]

Posted by 구차니

NAS 하드 하나가 골골 대길래 하드 지름 4T

그나저나 10T 까지 나오다니..

세상에 저장할 야동이 넘쳐나는 건가!!! (응?)




+

시게이트 CEO 발언

"솔직해집시다. 우리는 세상을 바꾸는 것이 아닙니다. 우리는 단지 소비자들이 쓰잘데기 없는 소프트웨어를 더 많이 사고, 야동을 더 많이 볼 수 있도록 도와주는 물건을 만드는 것 뿐입니다." (Let's face it, we're not changing the world. We're building a product that helps people buy more crap - and watch porn.)

Posted by 구차니

먼가 무진장 자극적인 제목인가?


머.. 비트코인을 좋게(?) 보는 사람은 기회라고 보겠지만

나쁘게 보는 사람은 도박이고 폰지사기라듯 하듯 평가가 갈릴수도 있겠지만


어마어마한 전기와 컴퓨팅 파워를 쳐먹쳐먹 하면서(시간과 노력, 관심)

실제 현실에 하나도 도움이 되지 않는 연산을 하며(커뮤니티 내에서)

인정되지 않는 가치를 창출한다고 자기들 끼리 미래를 위해 한다는 사명감에(설교, 강요)

움직이는 모습 자체가 참 비슷한것 같다.



유입경로 따라서 글들을 보는데 키워드가 아무래도 부정적이다 다시 한번 검색을 해봐야 하려나?

페미니즘의 한계 반박 이라던가?

[링크 : https://search.naver.com/search.naver?sm=mtb_hty.top&where=m_fsn&query=페미니즘의+한계...]

Posted by 구차니
embeded/FPGA - ALTERA2018. 1. 31. 19:27

32MB 짜리 SDRAM이 달려있는데

Nios II 여러개 생성할 때 분할해서 쓸 수 있을려나?


It is organized as 4M x 16 bits x 4 banks.

[링크 : ftp://ftp.altera.com/up/pub/Altera_Material/11.0/Tutorials/Verilog/DE0-Nano/Using_the_SDRAM.pdf]


on-chip memory로 부족한 메모리라 못했던걸, 이걸 이용하면 가능할거 같네?


메모리 관리문제로 hw mutex도 추가하라네?

[링크 : http://jjackson.eng.ua.edu/courses/ece680/lectures/Creating Multiprocessor Nios II Systems Tutorial.pdf]

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

xilinx easypath / Altera hardcopy  (0) 2018.02.02
Nios II Flash Programmer  (0) 2018.02.01
EPCS Controller 추가 및 jic 통합하기.. 실패중  (0) 2018.01.31
Nios II BSP 빌드관련  (0) 2018.01.31
SREC - SRECord  (0) 2018.01.30
Posted by 구차니
embeded/FPGA - ALTERA2018. 1. 31. 13:23

그래도 안되네 ㅠㅠ


설정 가능한 내용으로는 딱히 눈에 띄는건 없네


심심해서 SDRAM은 어떻게 추가하나했는데.. university program에 DE 보드 관련 SDRAM PLL은 존재하고

SDRAM은 별도로 추가를 해주어야 한다. (ISSI 칩 기본 프리셋 존재하지 않음)


이제 남은건.. sof 파일을 hex로 바꾸는건가...


sof를 시작주소 줄 수 있었군..

최소한 이렇게 하면, Nios II 자체는 구동하는걸로 보인다(LED 불 전부 꺼짐)

eclipse에서 테스트 해보니 장치 인식을 하는 것 봐서 정상적으로 Nios II는 들어간 듯


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


10. Click SOF Data, and select Add File, and select your .sof file

11. Click Add Hex data, select Relative addressing, and select your .hex file created above

12. Now push generate. You should verify that the generated .map file has Page_0 at a start address of 0x0, and the hex file at a start address 1 after the end address of Page_0

13. Now in the Quartus II Programmer, select Add File and select your .jic file. Check the Program box next to the .jic file, and push Start

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


Creating the .jic file:


In Quartus, open the Convert "Programming File..." utility

Set the "Programming file type:" to "JTAG Indirect Configuration File (.jic)"

In "Input files to convert" select "Flash Loader", click "Add Device..." and choose your target FPGA device

If you are configuring the FPGA from the serial flash:

In "Input files to convert" select "SOF Data", click "Add File..." and select your FPGA .sof file

-With "SOF Data" selected, click "Properties", in the "SOF Data Properies dialogue box:

-Set "Address mode for selected pages to" to "Start"

Set "Start address (32-bit hexidecimal:) to 0x0.

In "Input files to convert" click "Add Hex Data", in the "Add Hex Data" dialogue box:

Set "Addressing mode" to "Absolute addressing"

Select your hex file using the "..." button next to the "Hex file" field

Click "OK"

Check "Create Memory Map File". This is useful for debugging.

Generate the .jic file and program it into the serial flash with the Quartus Programmer 

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


그나저나 빌드 메시지를 보니..

13:50:21 **** 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]

Post-processing to create mem_init/hdl_sim/unsaved_epcs_flash_controller_0_boot_rom.hex...

elf2hex hello_world_0.elf 0x00011000 0x000117ff --width=32 --little-endian-mem --create-lanes=0 --no-zero-fill mem_init/hdl_sim/unsaved_epcs_flash_controller_0_boot_rom.hex

Post-processing to create mem_init/unsaved_onchip_memory2_0.hex...

elf2hex hello_world_0.elf 0x00008000 0x0000ffff --width=32 --little-endian-mem --create-lanes=0 mem_init/unsaved_onchip_memory2_0.hex

Post-processing to create mem_init/hdl_sim/unsaved_epcs_flash_controller_0_boot_rom.dat...

elf2dat --infile=hello_world_0.elf --outfile=mem_init/hdl_sim/unsaved_epcs_flash_controller_0_boot_rom.dat \

--base=0x00011000 --end=0x000117ff --width=32 \

--little-endian-mem --create-lanes=0 

Post-processing to create mem_init/hdl_sim/unsaved_onchip_memory2_0.dat...

elf2dat --infile=hello_world_0.elf --outfile=mem_init/hdl_sim/unsaved_onchip_memory2_0.dat \

--base=0x00008000 --end=0x0000ffff --width=32 \

--little-endian-mem --create-lanes=0 

Post-processing to create mem_init/hdl_sim/unsaved_epcs_flash_controller_0_boot_rom.sym...

nios2-elf-nm -n hello_world_0.elf > mem_init/hdl_sim/unsaved_epcs_flash_controller_0_boot_rom.sym

Post-processing to create mem_init/hdl_sim/unsaved_onchip_memory2_0.sym...

nios2-elf-nm -n hello_world_0.elf > mem_init/hdl_sim/unsaved_onchip_memory2_0.sym

Post-processing to create unsaved_epcs_flash_controller_0_boot_rom.flash...

elf2flash --input=hello_world_0.elf --outfile=unsaved_epcs_flash_controller_0_boot_rom.flash --sim_optimize=0 --little-endian-mem \

 --epcs 

Post-processing to create mem_init/meminit.spd...

Post-processing to create mem_init/meminit.qip...


13:50:26 Build Finished (took 4s.961ms) 



+

귀찮아서(!) 안하려고 했던 sof2flash를 꼭 거쳐야 하나보다.. 나처럼 EPCS에 구우려면..

3.3.1.3 EPCS Parameters

3.3.2 Programming Both Hardware and Software into an EPCS/EPCQ

Device

The --base parameter is not available for EPCS/EPCQ devices, because in EPCS/EPCQ devices, FPGA configuration data must start at address 0x0. However, if you are programming both an FPGA configuration and a Nios II software executable in the EPCS/EPCQ device, the --after parameter lets you position the software executable directly after the FPGA configuration data.

Convert the FPGA configuration file first using sof2flash. When converting the Nios II software executable, use the --after parameter, and specify the FPGA configuration S-record file. The S-record output for the software executable starts at the first address unused by the FPGA configuration. Refer to the second example under the “elf2flash Command-Line Examples” chapter.

Note: elf2flash does not insert the FPGA configuration into the output file. It simply leaves space, starting at offset 0x0, that is large enough for the configuration data.

Note: In Intel Quartus Prime software version 13.1 and onwards, the -epcs/--epcq option in sof2flash generates .flash file with a SOF header, which contains the SOF length.

This change is required for V-series devices and above for new SOF format, and to allow for future SOF format variations. The Nios II bootcopier loads the Nios II software executable from EPCS/EPCQ devices based on the SOF length. For more information about how to program EPCS/EPCQ devices, refer to the "KDB Solution rd11192013_118" webpage.

Related Links

• elf2flash Command-Line Examples on page 25

• KDB Solution rd11192013_118 

[링크 : https://www.altera.com/en_US/pdfs/literature/ug/ug_nios2_flash_programmer.pdf]



+

카페 자료 뒤지다 보니,

Eclipse에 Flash Programmer가 있대서 보니 오.. 이런게 있네..

그런데 프로젝트도 안 부르고 그냥 실했더니 먼가 에러뿜뿜


아무튼 이걸 이용하면 굳이 jic 안만들어도 EPCS controller가 있으면 EPCS에 쓸 수 있다고 한다. 

[링크 : https://www.altera.com/en_US/pdfs/literature/ug/ug_nios2_flash_programmer.pdf]

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

Nios II Flash Programmer  (0) 2018.02.01
de0-nano SDRAM with Nios II  (0) 2018.01.31
Nios II BSP 빌드관련  (0) 2018.01.31
SREC - SRECord  (0) 2018.01.30
altera Nios II, epcs controller  (0) 2018.01.29
Posted by 구차니
embeded/FPGA - ALTERA2018. 1. 31. 13:04

아무생각 없이(!) 전체 프로젝트를 Clean 했더니 아래와 같은 에러를 뱉어 주신다.

별거 없고 bsp 프로젝트 우클릭후 Nios II 에서 Generate BSP 해준다음

전체 프로젝트 빌드 하면된다.

13:01:21 **** Incremental Build of configuration Nios II for project hello_world_0_bsp ****

make all 

Makefile not up to date.

../../unsaved.sopcinfo has been modified since the BSP was generated.


Generate the BSP to update the Makefile, and then build again.


To generate from Eclipse:

 1. Right-click the BSP project.

 2. In the Nios II Menu, click Generate BSP.


To generate from the command line:

 nios2-bsp-generate-files --settings=<settings file> --bsp-dir=<target bsp files directory>


make: *** [public.mk] Error 1


13:01:22 Build Finished (took 946ms)


Run Configuration 에서

Download에 Start Processor와 Reset the selected target system을 해주면

다운로드 후 리셋을 걸고 시작하도록 하여 작동되는걸 바로 볼 수 있다

(먼가 이상하게 늦게 실행되는 느낌이 들어서 그거 없애는 용도)


이전글을 비교해보니.. 실수로 Start Processor의 체크를 꺼서 그런 듯

2018/01/27 - [embeded/FPGA] - Nios II 프로그램 빌드..


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

de0-nano SDRAM with Nios II  (0) 2018.01.31
EPCS Controller 추가 및 jic 통합하기.. 실패중  (0) 2018.01.31
SREC - SRECord  (0) 2018.01.30
altera Nios II, epcs controller  (0) 2018.01.29
Nios II / Nios II Classic 차이점  (0) 2018.01.29
Posted by 구차니
Programming/C Win32 MFC2018. 1. 31. 12:12

간단하게

const char*는 const char 를 가르키는 포인터 이고

포인터가 가리키는 변수를 다른걸로 바꿀 수 있지만

포인터가 가리키는 변수의 내용은 바꿀 수 없다.


char * const는 char를 가리키는 const 포인터 이고

포인터가 가리키는 변수를 다른걸로 바꿀 수 없지만

포인터가 가리키는 변수의 내용을 바꿀순 있다.


근데.. const 포인터를 어따 써먹지?

링크드 리스트 이런거 구현하거나 범용적으로 쓰이려면 쓸데도 없고

C++의 레퍼런스 처럼 특정 변수를 지정해서 쓰는 용도라면..

커널내에서 정도 밖에 떠오르지 않네?


char * const a;

means that the pointer is constant and immutable but the pointed data is not.

You could use const_cast(in C++) or c-style cast to cast away the constness in this case as data itself is not constant.


const char * a;

means that the pointed data cannot be written to using the pointer a. Using a const_cast(C++) or c-style cast to cast away the constness in this case causes Undefined Behavior. 

[링크 : https://stackoverflow.com/questions/10091825/constant-pointer-vs-pointer-on-a-constant-value4]

[링크 : http://ra2kstar.tistory.com/143]

'Programming > C Win32 MFC' 카테고리의 다른 글

uuid in c  (0) 2018.10.22
엔디안 급 멘붕..  (0) 2018.05.29
소스 코드 포맷 적용하기  (0) 2018.01.08
win32 시리얼 통신 LPCTSTR / LPCSTR  (0) 2017.12.07
MFC CList 선택항목 인덱스 얻기  (0) 2017.11.28
Posted by 구차니
Microsoft/Windows2018. 1. 31. 09:41

지인의 요청으로 검색을 하는데

윈7 처럼 하단에 이미지 클릭시 해상도가 출력 안되서 불편하다는데


윈10 순수 해결책으로는 

"내용"로 해서 썸네일 적게 하면서 보던가

"자세히"로 한다음 보기 내용에 해상도를 추가하던가

"세부 정보 창"을 켜고 보던가 정도

[링크 : http://mainia.tistory.com/3956]

[링크 : https://superuser.com/questions/481462/show-image-dimensions-in-status-bar-in-windows-8-file-explorer]


외부해결로는 확장기능 이용해서 사용하기.. 귀찮네 -_-

[링크 : https://www.howtogeek.com/...-windows-10s-file-explorer-look-like-windows-7s-windows-explorer/]

'Microsoft > Windows' 카테고리의 다른 글

명령줄에서 이미지 프린트하기  (0) 2018.02.23
32비트 드라이버 64bit OS에서 강제로 깔기  (2) 2018.02.09
windows monthly rollup  (0) 2018.01.05
윈도우 단축키  (0) 2017.12.23
win10 UEFI fastboot 설치  (0) 2017.12.06
Posted by 구차니