← Documents Documentation/devicetree/bindings/nios2/nios2.txt GitHub 원문 ↗

Linux 6.18.37 · Devicetree Bindings

Nios II Processor

Nios II CPU의 cache, TLB, MMU와 exception address binding입니다.

Source pathDocumentation/devicetree/bindings/nios2/nios2.txt
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.

1. 요약·해설

원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.

요약과 해설

nios2.txt:1-62

Qsys에서 생성되는 CPU topology와 hardware capability를 정리합니다.

2. 영어 원문 전체

번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.

원문 전체 펼치기
1 * Nios II Processor Binding
2
3 This binding specifies what properties available in the device tree
4 representation of a Nios II Processor Core.
5
6 Users can use sopc2dts tool for generating device tree sources (dts) from a
7 Qsys system. See more detail in: http://www.alterawiki.com/wiki/Sopc2dts
8
9 Required properties:
10
11 - compatible: Compatible property value should be "altr,nios2-1.0".
12 - reg: Contains CPU index.
13 - interrupt-controller: Specifies that the node is an interrupt controller
14 - #interrupt-cells: Specifies the number of cells needed to encode an
15 interrupt source, should be 1.
16 - clock-frequency: Contains the clock frequency for CPU, in Hz.
17 - dcache-line-size: Contains data cache line size.
18 - icache-line-size: Contains instruction line size.
19 - dcache-size: Contains data cache size.
20 - icache-size: Contains instruction cache size.
21 - altr,pid-num-bits: Specifies the number of bits to use to represent the process
22 identifier (PID).
23 - altr,tlb-num-ways: Specifies the number of set-associativity ways in the TLB.
24 - altr,tlb-num-entries: Specifies the number of entries in the TLB.
25 - altr,tlb-ptr-sz: Specifies size of TLB pointer.
26 - altr,has-mul: Specifies CPU hardware multiply support, should be 1.
27 - altr,has-mmu: Specifies CPU support MMU support, should be 1.
28 - altr,has-initda: Specifies CPU support initda instruction, should be 1.
29 - altr,reset-addr: Specifies CPU reset address
30 - altr,fast-tlb-miss-addr: Specifies CPU fast TLB miss exception address
31 - altr,exception-addr: Specifies CPU exception address
32
33 Optional properties:
34 - altr,has-div: Specifies CPU hardware divide support
35 - altr,implementation: Nios II core implementation, this should be "fast";
36
37 Example:
38
39 cpu@0 {
40 device_type = "cpu";
41 compatible = "altr,nios2-1.0";
42 reg = <0>;
43 interrupt-controller;
44 #interrupt-cells = <1>;
45 clock-frequency = <125000000>;
46 dcache-line-size = <32>;
47 icache-line-size = <32>;
48 dcache-size = <32768>;
49 icache-size = <32768>;
50 altr,implementation = "fast";
51 altr,pid-num-bits = <8>;
52 altr,tlb-num-ways = <16>;
53 altr,tlb-num-entries = <128>;
54 altr,tlb-ptr-sz = <7>;
55 altr,has-div = <1>;
56 altr,has-mul = <1>;
57 altr,reset-addr = <0xc2800000>;
58 altr,fast-tlb-miss-addr = <0xc7fff400>;
59 altr,exception-addr = <0xd0000020>;
60 altr,has-initda = <1>;
61 altr,has-mmu = <1>;
62 };
63

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>;
};