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 구차니
embeded/FPGA - XILINX2018. 1. 30. 23:50

altera와 비교되는 용어를 찾아 보는중


Processing System (PS)

Programmable Logic (PL)

[링크 : https://www.xilinx.com/support/documentation/data_sheets/ds190-Zynq-7000-Overview.pdf]


HPS에 대응하는게 PS 라는것 정도?

PL에 대응하는 용어는 FPGA나 LE 정도?


Cyclone V SoC Hard Processor System

[링크 : https://www.altera.com/products/fpga/features/cyv-soc-hps.html]

[링크 : https://www.altera.com/products/soc/portfolio/arria-10-soc/arria10-soc-hps.html]

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

vivado language template  (0) 2018.03.20
xilinx 고속 시리얼 인터페이스  (0) 2018.03.15
xilinx bitstram ecryption  (0) 2018.01.23
xilinx artix-7 프로젝트 빌드해봄  (0) 2018.01.07
xilinx vivado / ISE 라이센스 관련  (0) 2017.12.19
Posted by 구차니
embeded/ARM2018. 1. 30. 16:04

Advanced Microcontroller Bus Architecture

Advanced eXtensible Interface (AXI)


[링크 : https://en.wikipedia.org/wiki/Advanced_Microcontroller_Bus_Architecture]

'embeded > ARM' 카테고리의 다른 글

keil window 버전별 지원버전  (0) 2018.07.19
ARM MPMC(multiport memory controller)  (0) 2018.03.19
keil build 관련 검색  (0) 2017.12.06
카드크기 컴퓨터 벤치마크  (0) 2016.09.04
JTAG ETM  (0) 2016.09.02
Posted by 구차니
embeded/80512018. 1. 30. 09:08

문득 생각나서 Branch prediction을 8051에서 지원하나 찾아보다가 발견

다르게 보면.. ARM 계열의 성능이 좋긴 좋은거였구나..(Cortex-M3,M4)라는 생각이 든다.


  • A Dhrystone 2.1 performance rating of 0.252 DMIPS/MHz yields an unmatched 26.85 times speed up over the original 80C51 chip operating at the same frequency.
  • Maximum CPU frequency exceeds 500 MHz for a class-leading effective increase of more than 1,000 times over 80C51 chips (40nm G process) 

[링크 : https://www.design-reuse.com/news/33780/8051-microcontroller-ip-core.html]

[링크 : http://www.cast-inc.com/ip-cores/8051s/s8051xc3/index.html]

Posted by 구차니
embeded/FPGA - ALTERA2018. 1. 30. 07:48

ALTERA에서 Nios II 용 바이너리를 변환하는 녀석으로

확장자가 flash가 튀어 나오는데, 내부 포맷은 SREC 라고 한다.

Motorola에서 개발했으니.. 원래는 PowerPC 계열에서 쓰던 걸려나?

아무튼 기본 포맷 유형은 intel HEX와 유사하다.


[링크 : https://en.wikipedia.org/wiki/SREC_(file_format)]


EPCS Controller-Based Boot Copier

EPCS controller-based boot copier supports EPCS memory only. Boot copier is stored in the ROM within

the EPCS flash controller. The boot copier is included during Qsys and Quartus Prime project compila‐

tion time.

The next stage boot image is located in the EPCS memory flash. The EPCS controller-based boot copier is

automatically appended into the SREC image (*.flash) file during the elf2flash utility execution in the

Nios II Flash Programming flow method.

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

Posted by 구차니
embeded/FPGA - ALTERA2018. 1. 29. 20:47

생각을 해보니.. jic는 문제없이 만들어 진건데...

platform designer에서 EPCS Controller를 추가하지 않아서 작동하지 않는게 아닌가? 라는 생각이 든다.

다시 추가해서 시도해봐야겠다.


EPCS Controller-Based Boot Copier

EPCS controller-based boot copier supports EPCS memory only. Boot copier is stored in the ROM within

the EPCS flash controller. The boot copier is included during Qsys and Quartus Prime project compila‐

tion time.

The next stage boot image is located in the EPCS memory flash. The EPCS controller-based boot copier is

automatically appended into the SREC image (*.flash) file during the elf2flash utility execution in the

Nios II Flash Programming flow method. 


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


My first Nios II 문서에 있는거랑 구성이 거의 비슷한데 EPCS와 SDRAM Controller가 추가되어 있다.

My application contains:


1. Clock Source

2. Nios II Processor

3. System ID

4. JTAG UART

5. EPCS Serial Flash Controller

6. PIO

7. SDRAM Controller

[링크 : https://alteraforum.com/forum/archive/index.php/t-49224.html]


음.. 리셋 벡터까지 EPCS Controller로 해주어야 하나?

Make sure the Nios II’s Reset Vector is pointing at EPCS/EPCQ Controller. 

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

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

Nios II BSP 빌드관련  (0) 2018.01.31
SREC - SRECord  (0) 2018.01.30
Nios II / Nios II Classic 차이점  (0) 2018.01.29
elf2flash와 nios2-elf-objcopy 사용하기  (0) 2018.01.29
Nios II 이미지 합치기 (조사)  (0) 2018.01.27
Posted by 구차니
embeded/FPGA - ALTERA2018. 1. 29. 19:07

Nios II Classic에 구분되도록

Nios II Gen2라고 부르는 듯


아무튼.. Nios II Classic의 /e는 Nios II Gen2의 /e와 다른 물건이 되어버린듯 하다.

Nios II Gen2 Processor Feature Enhancements

The Nios II Gen2 processor family consists of /e and /f cores. It offers improvements over the Nios II Classic processor cores:

• Optional full 32-bit address space 

• Optional user-defined Peripheral address region for data cache bypass 

• Improved Qsys interface

The Nios II Gen2 /e core is completely backwards compatible with the Nios II Classic /s core. The Nios II Classic /s core has no direct equivalent in the Nios II Gen 2 family, however the Nios II Gen2 /f processor (as it has a more flexible configuration capability) can be configured to have the same feature set as the Nios II Classic /s core.


The Nios II Gen2 /f core offers the following feature enhancements over the Nios II Classic /f core: 

• Optional full ECC support, including data cache and TCMs (Tightly-coupled Memories) 

• Optional static branch prediction 

• Higher performance multiplier

• Improved and more deterministic divider 

• 64-bit multiply supported on all devices 

• Improved low-cost shifter implementation up to 4 bits/cycle 

• Instruction cache is now optional even when JTAG debug is present 

• New system interface for system trace 

[링크 : https://www.altera.com/en_US/pdfs/literature/an/an748.pdf]

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

SREC - SRECord  (0) 2018.01.30
altera Nios II, epcs controller  (0) 2018.01.29
elf2flash와 nios2-elf-objcopy 사용하기  (0) 2018.01.29
Nios II 이미지 합치기 (조사)  (0) 2018.01.27
Nios II 프로그램 빌드..  (0) 2018.01.27
Posted by 구차니
embeded/openRISC2018. 1. 29. 18:31

'embeded > openRISC' 카테고리의 다른 글

or32 컴파일러.. 삽질  (0) 2015.12.14
openRISC OR1k(1000) OR1200  (0) 2015.12.11
openrisc 어셈블리  (0) 2015.12.10
openRISC chaintool  (0) 2015.11.27
Posted by 구차니
embeded/FPGA - ALTERA2018. 1. 29. 14:09

일단 필요로 하는 녀석은 아래 경로에 존재하는데

path가 설정안되어 있으면 에러가 날테니 적당히~ 사용

C:\intelFPGA_lite\17.1\nios2eds\bin

C:\intelFPGA_lite\17.1\nios2eds\bin\gnu\H-x86_64-mingw32\bin 


D:\>C:\intelFPGA_lite\17.1\nios2eds\bin\elf2flash.exe --input=hello_world_0.elf --output=swimage.flash --epcs

D:\>dir

2018-01-27  오후 01:19               946 hello_world.c

2018-01-27  오후 01:20           319,239 hello_world_0.elf

2018-01-27  오후 01:20            86,021 hello_world_0.map

2018-01-29  오후 01:53            11,824 swimage.flash


D:\>C:\intelFPGA_lite\17.1\nios2eds\bin\gnu\H-x86_64-mingw32\bin\nios2-elf-objcopy.exe -I srec -O ihex swimage.flash  swimage.hex

D:\>dir

2018-01-27  오후 01:19               946 hello_world.c

2018-01-27  오후 01:20           319,239 hello_world_0.elf

2018-01-27  오후 01:20            86,021 hello_world_0.map

2018-01-29  오후 01:53            11,824 swimage.flash

2018-01-29  오후 01:57            13,272 swimage.hex 


도대체 무슨 마법이냐.. 312KB 짜리가 12KB가 되다니.. -_-?

ELF에 이것저것 디버그 정보도 들어가서 커졌을수는 있지만 이해할수 없는 용량 감소네..

아무튼 위는 flash 파일 아래는 hex 파일 내용이다.

flash는 intel HEX 포맷이랑 비슷한거 같네.. 아무튼 덕분에(?) flash에서 hex로의 변환에서

용량 차이는 크게 나타나지 않는다.

S00600002D454C3B

S325000000007C0F00000000010074004000140840083A6800080000000000000000000000008C

S3250000002000000000000000007400C0061400E0DE74008006148CA4D67400800014498510B4

S325000000407400C000144DC5182603C010150000100401801036FDFF10C0251000C03310003B

:100000007C0F00000000010074004000140840084C

:100010003A68000800000000000000000000000036

:1000200000000000000000007400C0061400E0DEC4

:1000300074008006148CA4D67400800014498510C6


아무튼 변경후에는...  SOF 추가하고

HEX도 추가했는데 시작주소가 auto라니 찜찜(?) 해서


Properties 에서 시작주소를 0x0 으로 해주니 정상대로 나온다.


췟.. 플래시 로더 안 넣었다고 못 만드네 아무튼 넣고 만드니 8MB 자리 jic 통~


구워는봤는데 안되네..

귀찮아서.. (!) Nios II 이미지인 sof를 그냥 jic에 넣어서 그런가.. 똑같이 hex로 변환해서 넣어야 하나?


sof는 jic로 변환한 내용 처음에 0xff로 시작한다.

합친건데.. 이미지 순서가 아마 반대로 들어온 듯 하다..


프로그램이 앞에 들어가있고 그 이후에 sof 내용이 들어있다.

(쭈욱 내려보면 sof파일의 내용이 시작하는 부분이 보인다)



---

sof2flash --input=<hwimage>.sof --output=hwimage.flash --epcs --verbose

elf2flash --input=<elf file>.elf --output=swimage.flash --epcs --after=hwimage.flash --verbose


nios2-elf-objcopy -I srec -O ihex hwimage.flash  hwimage.hex

nios2-elf-objcopy -I srec -O ihex swimage.flash  swimage.hex 

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

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

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

altera Nios II, epcs controller  (0) 2018.01.29
Nios II / Nios II Classic 차이점  (0) 2018.01.29
Nios II 이미지 합치기 (조사)  (0) 2018.01.27
Nios II 프로그램 빌드..  (0) 2018.01.27
Nios II 명령어 관련 조사  (0) 2018.01.26
Posted by 구차니
embeded/FPGA - ALTERA2018. 1. 27. 22:36

elf로 뱉어 내는거 같은데

일단.. Add Hex 하면서 Relative로 0x00 이 기본인거 같긴한데

map 파일에서 Page_0의 시작 주소를 확인하라고 되어있네


The method used to create a .jic file with a Nios® II hardware and software image is as follows.

1. Create a flash file from a .sof file: sof2flash --input=<hwimage>.sof --output=hwimage.flash --epcs --verbose

2. Create a flash file from a ,elf file: elf2flash --input=<elf file>.elf --output=swimage.flash --epcs --after=hwimage.flash --verbose

3. Convert the .flash image into a.hex file: nios2-elf-objcopy --input-target srec --output-target ihex mysw.flash mysw.hex

4. In the Quartus® II software, open File > Convert Programming Files > Set the programming file as JTAG Indirect Configuration File (.jic).


6. Select the correct size EPCS device in the Configuration pull-down

7. Name your output .jic file

8. Click Flash Loader below, and select Add Device on the right hand side

9. Select your FPGA device from the list

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]


The method used to create a .jic file with a Nios® II hardware and software image is as follows.

1.      Create a flash file for the hardware and software image
sof2flash --input=<hwimage>.sof --output=hwimage.flash --epcs --verbose
elf2flash --input=<elf file>.elf --output=swimage.flash --epcs --after=hwimage.flash --verbose

Note: When creating the software flash image, there is no need to add a boot srec (this is located in the EPCS Controller), the --after option ensures the software image starts immediately after the hardware image.

2.      Convert the flash images into Hex files

nios2-elf-objcopy -I srec -O ihex hwimage.flash  hwimage.hex
nios2-elf-objcopy -I srec -O ihex swimage.flash  swimage.hex

3.      When creating your jic file using Quartus® II Convert Programming File tool, add the Flash Loader and both hex files with absolute addressing option selected.

Note: You do not need to add the .sof file to the jic image.  This is because you created a hardware hex image.  Using the hardware hex image ensures the software hex image is at the proper offset in the EPCS. 

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


+

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

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

Nios II / Nios II Classic 차이점  (0) 2018.01.29
elf2flash와 nios2-elf-objcopy 사용하기  (0) 2018.01.29
Nios II 프로그램 빌드..  (0) 2018.01.27
Nios II 명령어 관련 조사  (0) 2018.01.26
nios2 /e /f 별 설정  (0) 2018.01.25
Posted by 구차니