PVS (Programmer Visible State)
PC, register file, Instruction memory, Data Memory
자세한 설명은 아니까 패스
Combinational read, synchronous write
- Combinational read: register file 안에 있는 컨텐츠와 read select port에 따라서 읽는 것이기 때문에 combinational하게 처리 가능
- Synchronous write: read output에 영향을 주지 않도록 (race condition이 안 생기도록 한다)
Instruction Processing
- IF (Instruction Fetch): PC에 있는 주소값을 Instruction memory에서 읽어오는 과정
- ID (Instruction Decode): IMEM에서 읽어온 주소값을 Immgen을 통해 쪼개서 Register에 넣어주는 과정
- EX (ALU): 연산
- MEM: Data memory에서 write/read
- WB: write back (읽은 값을 register에 저장, PC를 update)
6. Multi cycle cpu
Single cycle cpu의 문제점
Single cycle implementation에서는
sequential과 atomic한 ISA semantic으로 적당함.
하지만 모든 instruction이 가장 느린 instruction의 clock cycle을 기준으로 돌기 때문에 비효율적이다.
해결 방법?
- 일단 50ps로 클락을 돌려
- 각 instruction의 종류마다 걸리는 시간이 다 다르니까 여러 clock cycle 동안 돌게 하되,
Performance Analysis (그래서 빠르긴 함?)
p.10에 있는 예시
Single cycle clock period: 600ps, multi cycle clock period: 50ps
Multi cycle
IPC
Reducing datapath (ALU) by sequential reuse
(PC ← PC+4) (PC ← PC+imm) (ALU)
IR (Instruction register)
- Memory에서 instruction을 읽기 전에 한 번 keep해둔다
이걸 하기 위해서는 control value가 많이 있어야 됨
Single-cycle에서 썼었던 Control Signal들 (RegWrite, MemRead, MemWrite, MemtoReg)
ex) ADD rd, rs1, rs2
- Cycle 1: Instruction fetch
- Cycle 2: Register read
- Cycle 3: ALU Execution
- Cycle 4: Write Back
RT sequencing
Register transfer의 줄임말. cpu는 한 번에 오직 하나의 resource만 utilize할 수 있으므로 겹치지않도록 sequencing해주는 게 중요하다. 아래 표가 그 generalization

Microsequencer
- 앞서 말한 RT sequencing을 계산하기 위해서는 control signal이 필요하다. Microsequencer는 control signal을 generate하는 하나의 FSM이라고 볼 수 있다.
- Input: 지금 실행하고 있는 instruction의 opcode와 현재 microstate (ex. IF1, IF2, EX….)
- Output: control signals (ex. ALUSrcA, IRWrite, PCWrite…), next microstate

근데 이거는 정말 비효율적이고 문제가 많은 방법인데
- 2^n 비트의 microstate가 실상 다 사용되는 게 아님
Vertical microcode
ROM의 output으로 k개의 micro-operation (다른 말로 RT, Register Transfer)들을 넣어서 다 미리 저장해놓는 방식이다
ex. “PC ← PC+4”, “PC ← ALUOut”, …
이걸 또 다른 ROM에 연결시켜서 control signal로 번역한다.
k<<m인 경우 (micro-op encoding이 control signal 전체보다 적은 경우) 2^n*m보다 크기를 줄일 수 있게 된다.
Horizontal microcode
각 state 자체를 micro program counter로 생각한다.
address table 대신에 uPC ← uPC + 1 (sequential step)을 통해 next address를 계산
2^(state bits + opcode bits) → 2^uPC bits로 ROM 개수
Input: control signal m개
Output:

Microcoding for CISC
새로운 instruction을 implement해야 할 일이 생겼을 때, Microcontroller와 datapath를 연장해서
Millicode: ISA-level subroutines hard-coded into the ROM
Nanocode: Microcoded system 안에 있는 Microcode(?)
'cs > csed311' 카테고리의 다른 글
| 11. Exceptions and Interrupt (0) | 2025.04.14 |
|---|---|
| 10. Pipelined CPU - Branch Prediction (0) | 2025.04.14 |
| 7-10 Pipelined CPU / hazards (0) | 2025.04.14 |
| 4. Performance (0) | 2025.04.14 |
| 2-4 ISA (instruction set architecture) (0) | 2025.04.14 |