요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
* Nios II Processor Binding
This binding specifies what properties available in the device tree
representation of a Nios II Processor Core.
Users can use sopc2dts tool for generating device tree sources (dts) from a
Qsys system. See more detail in: http://www.alterawiki.com/wiki/Sopc2dts
Required properties:
- compatible: Compatible property value should be "altr,nios2-1.0".
- reg: Contains CPU index.
- interrupt-controller: Specifies that the node is an interrupt controller
- #interrupt-cells: Specifies the number of cells needed to encode an
interrupt source, should be 1.
- clock-frequency: Contains the clock frequency for CPU, in Hz.
- dcache-line-size: Contains data cache line size.
- icache-line-size: Contains instruction line size.
- dcache-size: Contains data cache size.
- icache-size: Contains instruction cache size.
- altr,pid-num-bits: Specifies the number of bits to use to represent the process
identifier (PID).
- altr,tlb-num-ways: Specifies the number of set-associativity ways in the TLB.
- altr,tlb-num-entries: Specifies the number of entries in the TLB.
- altr,tlb-ptr-sz: Specifies size of TLB pointer.
- altr,has-mul: Specifies CPU hardware multiply support, should be 1.
- altr,has-mmu: Specifies CPU support MMU support, should be 1.
- altr,has-initda: Specifies CPU support initda instruction, should be 1.
- altr,reset-addr: Specifies CPU reset address
- altr,fast-tlb-miss-addr: Specifies CPU fast TLB miss exception address
- altr,exception-addr: Specifies CPU exception address
Optional properties:
- altr,has-div: Specifies CPU hardware divide support
- altr,implementation: Nios II core implementation, this should be "fast";
Example:
cpu@0 {
device_type = "cpu";
compatible = "altr,nios2-1.0";
reg = <0>;
interrupt-controller;
#interrupt-cells = <1>;
clock-frequency = <125000000>;
dcache-line-size = <32>;
icache-line-size = <32>;
dcache-size = <32768>;
icache-size = <32768>;
altr,implementation = "fast";
altr,pid-num-bits = <8>;
altr,tlb-num-ways = <16>;
altr,tlb-num-entries = <128>;
altr,tlb-ptr-sz = <7>;
altr,has-div = <1>;
altr,has-mul = <1>;
altr,reset-addr = <0xc2800000>;
altr,fast-tlb-miss-addr = <0xc7fff400>;
altr,exception-addr = <0xd0000020>;
altr,has-initda = <1>;
altr,has-mmu = <1>;
};
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
Nios II processor binding
1-8이 binding은 Device Tree에서 Nios II Processor Core를 표현할 때 사용할 수 있는 속성을 정의합니다. 사용자는 `sopc2dts` tool로 Qsys system에서 DTS를 생성할 수 있으며 자세한 내용은 `http://www.alterawiki.com/wiki/Sopc2dts`에 있습니다.
Nios II 필수 속성
9-32`compatible`은 `altr,nios2-1.0`, `reg`는 CPU index입니다. `interrupt-controller`는 node가 interrupt controller임을 나타내며 `#interrupt-cells`는 interrupt source encoding에 필요한 cell 수 1입니다. `clock-frequency`는 Hz 단위 CPU clock입니다.
`dcache-line-size`, `icache-line-size`는 data/instruction cache line 크기이고 `dcache-size`, `icache-size`는 각 cache 크기입니다.
`altr,pid-num-bits`는 process identifier(PID) bit 수, `altr,tlb-num-ways`는 TLB set-associativity way 수, `altr,tlb-num-entries`는 TLB entry 수, `altr,tlb-ptr-sz`는 TLB pointer 크기입니다.
`altr,has-mul`, `altr,has-mmu`, `altr,has-initda`는 각각 hardware multiply, MMU, `initda` instruction 지원을 나타내며 값은 1이어야 합니다.
`altr,reset-addr`는 CPU reset address, `altr,fast-tlb-miss-addr`는 fast TLB miss exception address, `altr,exception-addr`는 CPU exception address입니다.
Nios II 선택 속성
33-36선택 `altr,has-div`는 hardware divide 지원을 뜻합니다. `altr,implementation`은 Nios II core implementation이며 `fast`여야 합니다.
Nios II CPU 예제
37-62예제 CPU 0은 125MHz, 32-byte cache line, 32KiB data/instruction cache, 8-bit PID와 16-way 128-entry TLB를 사용합니다. Divide/multiply/MMU/initda를 enable하고 reset, TLB miss, exception 주소를 지정합니다.
cpu@0 {
device_type = "cpu";
compatible = "altr,nios2-1.0";
reg = <0>;
interrupt-controller;
#interrupt-cells = <1>;
clock-frequency = <125000000>;
dcache-line-size = <32>;
icache-line-size = <32>;
dcache-size = <32768>;
icache-size = <32768>;
altr,implementation = "fast";
altr,pid-num-bits = <8>;
altr,tlb-num-ways = <16>;
altr,tlb-num-entries = <128>;
altr,tlb-ptr-sz = <7>;
altr,has-div = <1>;
altr,has-mul = <1>;
altr,reset-addr = <0xc2800000>;
altr,fast-tlb-miss-addr = <0xc7fff400>;
altr,exception-addr = <0xd0000020>;
altr,has-initda = <1>;
altr,has-mmu = <1>;
};
요약과 해설
nios2.txt:1-62Qsys에서 생성되는 CPU topology와 hardware capability를 정리합니다.