Studyroom for RISC-V Computer Architecture
Title | Writer | Publisher | Translate | Development Arch |
---|---|---|---|---|
원리부터 설계까지 쉽고 명확한 컴퓨터구조 |
서태원 | 도서출판 홍릉 |
- | RISC-V |
컴퓨터 구조 및 설계 | David A.Patterson JohnL. Hennessy |
한티미디어 | 박명순 외 3명 |
MIPS |
ALU: Arithmetic Logical Unit ISA: Instruction Set Architecture RISC: Reduced Instruction Set Computer CISC: Complex Instruction Set Computer PC: Program Count (프로세서가 사용할 명령어 address 위치 포인터 레지스터 in RISC) IP: Instruction Point (프로세서가 사용할 명령어 address 위치 포인터 레지스터 in CISC)
- Input
- Output
- Memory
- Data path (Part of Processor)
- Control unit (Part of Processor)
Memory - CPU - Peripheral (I/O Device)
CPU
범용레지스터 (General Purpose Register),
PC (Program Counter, in RISC-V),
ALU (Arithmetic Logical Unit)
으로 구성되어있다.Memory
CPU가 수행할 명령어들을 Load해놓고 대기하는 Table이다.
어셈블리 명령어들이 저장되어있다.
기본 주소 접근단위는 1byte이다.Peripheral (I/O Device)
컴퓨터 주변장치들을 모두 Peripheral이라고 부른다.
GPU, USB, Monitor등등이 있다.
CISC RISC 명령어 Simple to complex instructions Simple instructions 명령어 길이 Variable Fixed 명령어 개수 Many Reduced 메모리 접근 Memory to Memory 연산 지원 load/store 명령어만 접근 가능 컴파일된 프로그램 크기 Small Large 하드웨어 복잡도 High Low 컴퓨터가 한 번에 연산할 수 있는 데이터(register) 크기
비교대상의 자료형태를 Signed-Signed / Unsigned-Unsigned처럼 통일해야만 한다.
뺄셈을 이용해(A - B, Calculated by ALU) 상태레지스터(Flag)를 설정하고, 대/소를 비교한다.
Status Flag (RISC-V) Description Zero Z A - B = 0 즉, A == B Negative N A - B < 0 (Signed/Unsigned 무관) Carry C 1: Unsigned Overflow
0: Unsigned UnderflowOverflow V if V == 1:
Signed Overflow
or Signed Underflow
- 32-bit 개발 플랫폼 설치
ModelSim은 32비트 플랫폼이므로, 32비트 개발 플랫폼을 설치해야함.
(Redhet 계열은 dpkg --> rpm, apt-get --> yum으로 변경해서 실행)user@linux:$ vim install_32bit_lib.sh#install_32bit_lib.sh sudo dpkg --add-architecture i386 sudo apt-get update sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386 lib32ncurses6 libxft2 libxft2:i386 libxext6 libxext6:i386
user@linux:$ chmod 770 install_32bit_lib.sh user@linux:$ ./install_32bit_lib.sh
ModelSim 설치파일 다운로드 (from Intel)
ModelSim for Linux Download Link.run파일 실행
user@linux:$ chmod 777 ModelSimSetup-*.run user@linux:$ ./ModelSimSetup-*
Quartus 설치파일 다운로드(from Intel)
Quartus Prime Lite for Linux Download Linktar 압축 해제 & 설치파일 실행
user@linux:$ tar -xf Quartus-* user@linux:$ ./setup.sh