일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
- CSS
- MIPS
- while
- DB
- architecture
- function
- php
- github
- web
- system
- Java
- python
- data structure
- javascript
- for
- react
- instruction
- computer
- Pipelining
- Class
- DS
- DATAPATH
- DoM
- XML
- control
- html
- mysql
- MacOS
- Linux
- Algorithm
- Today
- Total
목록system (66)
YYYEJI

어떤 instruction을 사용하는지에 따라 CPU 디자인이 달라집니다. ↓↓↓ 자세히 살펴봅시다 ↓↓↓ ① Instruction fetch • Instruction memory - Instruction을 fetch하기 위해 필요합니다. • Program counter - PC에 다음 주소를 저장하기 위해 필요합니다. • Adder - 다음 주소(PC + 4)를 계산하기 위해 필요합니다. ② R-format ALU operations • Registers - 필요한 register의 값을 읽기 위해 필요합니다. • ALU - Instruction을 수행하기 위해 필요합니다. ③ sw, lw instruction • Registers - 필요한 register의 값을 읽고 값을 흘려보내기 위해 필요합니다..

Register의 디자인을 하나하나 자세히 살펴보겠습니다. 간단하게 먼저 살펴보면 아래와 같습니다. ① - F.F(state element)에 값이 쓰여지기 위해 ①에서 값들이 대기중입니다. ② - Clock이 1로 띄는 순간 F.F(state element)에 쓰입니다. ③ - F.F(state element)에 저장된 값이 combinational logic을 지나 그대로 흘러갑니다. ④ - 새로운 값들이 업데이트되기 위해 ①에서 대기합니다. 실제로는 Insturction memory와 data memory가 따로 존재합니다. 그 이유는 single clock cycle에서 1 clock cycle에 instruction과 data를 한 번에 읽는 것이 불가능하기 때문입니다. 즉, instructio..

RTL은 Register Transfer Language의 줄임말로써, Register와 register 간에 데이터가 이동하는 흐름 방향을 자세하게 보여줄 수 있는 수준의 언어입니다. 예제를 살펴보겠습니다. ① add operation op code rs rt rd shamt function code add rd, rs, rt ↓↓↓ RTL Description ↓↓↓ IR ← mem[PC]; # Fetch instruction from memory R[rd] ← R[rs] + R[rt]; # ADD operation PC ← PC + 4; # Calculate next address ② sub operation op code rs rt rd shamt function code sub rd, rs, r..

Stored program concept에 의한 intruction 실행 순서 ① Instruction의 주소를 얻기 위해 PC(Program Counter)을 이용한다. ② Instruction을 주소로부터 가져온다. ③ Register로부터 값을 읽는다. ④ 정화기 무엇을 해야할지 정하기 위해 instruction을 이용한다. Fetch&Execute ①, ② - instruction fetch ③, ④ - instruction execute Note) Fetch&Execute는 stored program concept이다. ◡̈

CPU를 제작할 때 instruction이 결정되면 datapath와 control unit이 결정됩니다. 이때 한 instruction이 실행되는 clock의 cycle 횟수를 뜻합니다. ① Single clock cycle → Instruction이 실행되는데 1 clock cycle만 필요 ↑↑↑ Red clock cycle ↑↑↑ ② Multi clock cycle → Instruction이 실행되는데 여러 clock cycle만 필요 ↑↑↑ Yellow clock cycle ↑↑↑ ◡̈

Edge triggered 실행방법 ① State element의 값들이 읽는다. ② Combinational logic을 통해서 값들이 흘러간다. ③ Clock이 1일 때, 새로운 값들이 state element에 업데이트된다. • 어떤 값이 f.f에 쓰여지기 위해 state element(f.f) 전에서 대기하고 있다. • Clock이 1로 바뀌면 값들이 state element에 저장된다. • Combinational logic의 영향을 받은 값들이 그대로 흘러서 f.f 전에 새로운 값들이 대기하고 있다. Cycle time • Cycle time ↓, Frequency ↑, Execute time ↓ • Cycle time ↑, Frequency ↓, Execute time ↑ Note) Cloc..

D-latch란? 2개의 입력만을 가지는 latch입니다. • Clock signal(c)이 1이 될 때 결과가 저장됩니다. • Q'는 Q의 complement된 값입니다. (Q = 1이면 Q' = 0, Q = 0이면 Q' = 1) 예제를 살펴봅시다. D: D-latch C: Clock Q: output • C가 0이면 D의 값이 아무리 바껴도 Q가 값이 바뀌지 않습니다. • C이 1이 되면 Q의 값이 D의 값을 따라갑니다. D-latch는 여러 문제점이 있는데, 그 중 가능 큰 문제점은 제어가 힘들다는 것입니다. 그래서 D-latch를 두 개 연결한 F.F.(flip flops)이 등장합니다. • 첫 번째 D-latch를 지나간 값을 clock이 1일 때, Q(Y)에 저장합니다. (Rising edge..

ALU(Arithmetic Logic Unit)과 같이 데이터 값을 연산하는 elements가 있습니다. ① Combinational circuit 결과(output)가 현재 입력된 input에만 관련되어 있습니다. output = f(input) ② Sequential circuit 결과(output)이 현재 입력된 값(input)과 현재 상태(current state)에 관련되어 있습니다. output = f(input, current state) • Asynchronous - unclocked Clock signal 없이 제어되기 때문에, 분석/디자인이 조금 더 어렵습니다. • Synchronous - clocked Clock signal에 의해 제어가 되기 때문에, clock을 보면 circuit..