Computer Architecture
[컴퓨터 구조] Processor: Single-Cycle Implementation(2)
단순한놈
2020. 12. 6. 17:21
2. ALU (Arithmetic Logic Unit) 설계
우리가 사용할 ALU는 다음과같은 operation 들을 지원해야한다.
- AND OR NOR
- ADD SUB
- SLT
- Carry ( unsigned overflow )
- Overflow detection( signed overflow )
- Zero detection
1) 1bit ALU for AND,OR and ADD
2) 1bit ALU for SUB
Sub 는 Add 를 기반으로 하되 2의 보수를 더해주면 된다.
3) NOR
4)SLT
SLT 는 LSB 의 값 ( 0 or 1) 에 의해서만 result가 결정되므로, 상위 31bit에 대해 0 으로 설정해주고,
LSB 만 비교하면 된다.
5) Zero detection