Kernel Recipes 2017 - Understanding the Linux kernel via ftrace - Steven RostedtAnne Nicolas
Ftrace is the official tracer of the Linux kernel. It has been apart of Linux since 2.6.31, and has grown tremendously ever since. Ftrace’s name comes from its most powerful feature: function tracing. But the ftrace infrastructure is much more than that. It also encompasses the trace events that are used by perf, as well as kprobes that can dynamically add trace events that the user defines.
This talk will focus on learning how the kernel works by using the ftrace infrastructure. It will show how to see what happens within the kernel during a system call; learn how interrupts work; see how ones processes are being scheduled, and more. A quick introduction to some tools like trace-cmd and KernelShark will also be demonstrated.
Steven Rostedt, VMware
Introduction to Civil Infrastructure PlatformSZ Lin
CIP is target to establish an open source base layer of industrial grade software to enable the use and implementation of software. This slide will introduce the current status and road map in CIP
Linux power management: are you doing it right?Chris Simmonds
Devices operating on battery power need effective power management: anything you can do to reduce power usage will increase battery life. Even for devices running on mains power, better power managements has benefits in reducing the need for cooling and lower energy costs. This presentation describes the four principles of power management: don't rush if you don't have to; don't be ashamed of being idle; turn off things you are not using; and sleep when there is nothing else to do. Each of these has a counterpart in the Linux kernel.
Основные темы, затронутые на семинаре:
Задачи и компоненты подсистемы управления памятью;
Аппаратные возможности платформы x86_64;
Как описывается в ядре физическая и виртуальная память;
API подсистемы управления памятью;
Высвобождение ранее занятой памяти;
Инструменты мониторинга;
Memory Cgroups;
Compaction — дефрагментация физической памяти.
Vision is our most developed sense and one upon which we rely to make many decisions, conscious or otherwise. Many of our everyday interactions, such as driving a car, greeting familiar faces on the street, or deciding which dish to order at a restaurant, are guided by our visual sense. For the most part, this works well. But sometimes we are reminded of our visual system’s limitations and surprising behavior through optical illusions that exploit misjudgments in size, distance, depth, color and brightness, among many others. This lecture presents and explains a diverse collection of visual perception phenomena that challenge our common knowledge of how well we detect, recognize, compare, measure, interpret, and make decisions upon the information that arrives at our brain through our eyes. It also explains the relationships between the latest developments in human vision research and emerging technologies, such as: self-driving cars, face recognition and other forms of biometrics, and virtual reality. After seeing a large number of examples of optical illusions and other visual phenomena, this talk will make you wonder: can you really trust what you see?
Annuaire des managers de Centre-Ville et de Territoire en Auvergne-Rhône-AlpesJulie Druguet
La CCI de région, le Conseil Régional, la DIRECCTE, la CRMA et la Banque des Territoires ont souhaité mettre en œuvre une démarche d’expérimentation de management de centre-ville et territoire qui s’articule autour de la création d’un Centre de ressources régional en Auvergne-Rhône-Alpes qui assure une fonction de veille, d’accompagnement opérationnel et de professionnalisation des projets émergents ou en voie de consolidation. Celui-ci assure également le partage des bonnes pratiques entre les acteurs du management de centre-ville.
L’ambition portée par ce projet intitulé MG2T est d’amener des éléments de méthode aux acteurs concernés par les problématiques d’attractivité des centralités commerçantes et de faciliter l’acquisition d’outils nécessaires aux démarches de management de centre-ville et de territoires.
M = Management
G = Gestion
2 = Public et Privé, Partenariat
T = Territoire, Transversalité
De nombreuses collectivités se posent la question de la mise en place d’un management de centre-ville sur leur territoire.
Dans le cadre de ses missions le MG2T accompagne les territoires dans leur réflexion de mise en œuvre d’une démarche de management de centre-ville et de territoire.
모두를 위한 기계번역 (박찬준)
○ 개요
2014년 본격적으로 NMT에 대한 연구가 진행되었으며 현재는 Transformer 기반의 다양한 NMT 시스템들이 연구되고 있습니다.
더 나아가 최근 NLP에서 가장 뜨거운 연구분야인 Language Representation 분야에서도 Transformer를 기반으로 한 BERT, GPT-2, XLNET 등의 모델이 개발되고 있습니다.
본 테크톡에서는 먼저 RBMT와 SMT에 대해서 간략하게 살펴보고 RNN기반 NMT 부터 Transformer를 기반으로 하는 NMT까지 자세히 살펴볼 예정입니다.
더 나아가 최근 WMT에서 매년 Shared Task로 열리고 있는 Automatic Post Editing System과 Parallel Corpus Filtering, Quality Estimation 분야에 대해서 설명하며 NMT를 이용한 다양한 응용 연구분야를 소개해드리겠습니다. (ex. 실시간 강연통역 시스템, 문법교정 시스템) , 기계번역에 대해서 아무것도 모르시는 분, 궁금하시분들도 이해할 수 있는 수준으로 쉽게 설명을 진행할 예정입니다.
○ 목차
1)기계번역이란
2)RBMT에 대한 간략한 소개
3)SMT에 대한 간략한 소개
4)RNN기반 딥러닝부터 Transformer까지
5)NMT를 이용한 다양한 응용 연구 소개
a. Automatic Post Editing
b. Quality Estimation
c. Parallel Corpus Filtering
d. Grammar Error Correction
e. 실시간 강연통역 시스템
6)OpenNMT 소개
Kernel Recipes 2017 - Understanding the Linux kernel via ftrace - Steven RostedtAnne Nicolas
Ftrace is the official tracer of the Linux kernel. It has been apart of Linux since 2.6.31, and has grown tremendously ever since. Ftrace’s name comes from its most powerful feature: function tracing. But the ftrace infrastructure is much more than that. It also encompasses the trace events that are used by perf, as well as kprobes that can dynamically add trace events that the user defines.
This talk will focus on learning how the kernel works by using the ftrace infrastructure. It will show how to see what happens within the kernel during a system call; learn how interrupts work; see how ones processes are being scheduled, and more. A quick introduction to some tools like trace-cmd and KernelShark will also be demonstrated.
Steven Rostedt, VMware
Introduction to Civil Infrastructure PlatformSZ Lin
CIP is target to establish an open source base layer of industrial grade software to enable the use and implementation of software. This slide will introduce the current status and road map in CIP
Linux power management: are you doing it right?Chris Simmonds
Devices operating on battery power need effective power management: anything you can do to reduce power usage will increase battery life. Even for devices running on mains power, better power managements has benefits in reducing the need for cooling and lower energy costs. This presentation describes the four principles of power management: don't rush if you don't have to; don't be ashamed of being idle; turn off things you are not using; and sleep when there is nothing else to do. Each of these has a counterpart in the Linux kernel.
Основные темы, затронутые на семинаре:
Задачи и компоненты подсистемы управления памятью;
Аппаратные возможности платформы x86_64;
Как описывается в ядре физическая и виртуальная память;
API подсистемы управления памятью;
Высвобождение ранее занятой памяти;
Инструменты мониторинга;
Memory Cgroups;
Compaction — дефрагментация физической памяти.
Vision is our most developed sense and one upon which we rely to make many decisions, conscious or otherwise. Many of our everyday interactions, such as driving a car, greeting familiar faces on the street, or deciding which dish to order at a restaurant, are guided by our visual sense. For the most part, this works well. But sometimes we are reminded of our visual system’s limitations and surprising behavior through optical illusions that exploit misjudgments in size, distance, depth, color and brightness, among many others. This lecture presents and explains a diverse collection of visual perception phenomena that challenge our common knowledge of how well we detect, recognize, compare, measure, interpret, and make decisions upon the information that arrives at our brain through our eyes. It also explains the relationships between the latest developments in human vision research and emerging technologies, such as: self-driving cars, face recognition and other forms of biometrics, and virtual reality. After seeing a large number of examples of optical illusions and other visual phenomena, this talk will make you wonder: can you really trust what you see?
Annuaire des managers de Centre-Ville et de Territoire en Auvergne-Rhône-AlpesJulie Druguet
La CCI de région, le Conseil Régional, la DIRECCTE, la CRMA et la Banque des Territoires ont souhaité mettre en œuvre une démarche d’expérimentation de management de centre-ville et territoire qui s’articule autour de la création d’un Centre de ressources régional en Auvergne-Rhône-Alpes qui assure une fonction de veille, d’accompagnement opérationnel et de professionnalisation des projets émergents ou en voie de consolidation. Celui-ci assure également le partage des bonnes pratiques entre les acteurs du management de centre-ville.
L’ambition portée par ce projet intitulé MG2T est d’amener des éléments de méthode aux acteurs concernés par les problématiques d’attractivité des centralités commerçantes et de faciliter l’acquisition d’outils nécessaires aux démarches de management de centre-ville et de territoires.
M = Management
G = Gestion
2 = Public et Privé, Partenariat
T = Territoire, Transversalité
De nombreuses collectivités se posent la question de la mise en place d’un management de centre-ville sur leur territoire.
Dans le cadre de ses missions le MG2T accompagne les territoires dans leur réflexion de mise en œuvre d’une démarche de management de centre-ville et de territoire.
모두를 위한 기계번역 (박찬준)
○ 개요
2014년 본격적으로 NMT에 대한 연구가 진행되었으며 현재는 Transformer 기반의 다양한 NMT 시스템들이 연구되고 있습니다.
더 나아가 최근 NLP에서 가장 뜨거운 연구분야인 Language Representation 분야에서도 Transformer를 기반으로 한 BERT, GPT-2, XLNET 등의 모델이 개발되고 있습니다.
본 테크톡에서는 먼저 RBMT와 SMT에 대해서 간략하게 살펴보고 RNN기반 NMT 부터 Transformer를 기반으로 하는 NMT까지 자세히 살펴볼 예정입니다.
더 나아가 최근 WMT에서 매년 Shared Task로 열리고 있는 Automatic Post Editing System과 Parallel Corpus Filtering, Quality Estimation 분야에 대해서 설명하며 NMT를 이용한 다양한 응용 연구분야를 소개해드리겠습니다. (ex. 실시간 강연통역 시스템, 문법교정 시스템) , 기계번역에 대해서 아무것도 모르시는 분, 궁금하시분들도 이해할 수 있는 수준으로 쉽게 설명을 진행할 예정입니다.
○ 목차
1)기계번역이란
2)RBMT에 대한 간략한 소개
3)SMT에 대한 간략한 소개
4)RNN기반 딥러닝부터 Transformer까지
5)NMT를 이용한 다양한 응용 연구 소개
a. Automatic Post Editing
b. Quality Estimation
c. Parallel Corpus Filtering
d. Grammar Error Correction
e. 실시간 강연통역 시스템
6)OpenNMT 소개
2017 tensor flow dev summit (Sequence Models and the RNN API)
작성된 자료로 2017년 2월 22일 오후 8시 부터 Maru180에서
GDG Seoul 에서 주최한 2017 Tensorflow Dev Summit Extended Seou에서
발표를 진행
Sequence Models and the RNN API 정리 내역 공유
## 4. Python을 서브언어로 편하게 PS해보자!
PS의 주류는 C++이고, 문제의 제한 또한 보통 C++ 기준으로 만들어지기 때문에, Python 등의 C++이 아닌 기타 언어가 PS의 세계에서 주인공이 되기는 힘듭니다. 저 또한 대부분의 PS 문제를 C++로 풉니다.
하지만 Python 은 간결한 코드에서 나오는 강력한 생산성과 특정 편의 기능들을 바탕으로 PS의 특수한 상황에서는 굉장히 빠르게 코드를 짤 수 있어 쓸 만한 가치가 있기도 합니다.
이번 발표에서는 특수한 상황의 PS에서 Python을 유용하게 해 주는 다음과 같은 몇 가지 특징들을 소개하며, Python을 서브언어로 쓰기 좋은 문제들을 알아 볼 것입니다:
1. int: 내장된 integer 임의 정밀도 큰 수 연산의 편리함
2. Decimal, Fraction: floating number의 임의 정밀도를 처리하기 편한 모듈
3. itertools: C++의 next_permutation의 강화판, 다양한 순열과 조합을 구하는 함수들이 들어있는 모듈
4. 기타: operator 모듈의 itemgetter를 이용한 sort의 key 정하기, pow(n,mod-2,mod)를 통해 modular inverse 편하게 하기, list comprehension[ f(a) for a in lis ]등
### 슥삭 (BOJ ban4861)
Python과 PS를 향유하는 것을 좋아하는 PS 향유회의 코포 블루/솔브드 다이아 PS러입니다.
[2011 CodeEngn Conference 05] ashine - 안드로이드 리눅스에서의 시스템 해킹GangSeok Lee
2011 CodeEngn Conference 05
안드로이드 리눅스 상에서 bof 공격을 해본다. 임의로 제작한 취약한 어플리케이션을 대상으로 공격코드를 작성하여 쉘을 획득하는 과정을 보여주며설명한다. x86 환경에서와 ARM 환경에서의 공격코드 작성시 차이점에 대해 설명한다.
http://codeengn.com/conference/05
파이썬 데이터과학 1일차 - 초보자를 위한 데이터분석, 데이터시각화 (이태영)Tae Young Lee
파이썬 데이터과학 - 기초 과정(1일차)
- 데이터분석, 데이터시각화
- jupyter notebook, numpy, pandas, matplotlib, seaborn
2차 과정은 따로 올리겠습니다.
문의 및 제안 : se2n@naver.com
데이터 소스 : https://github.com/sh2orc/datascience
Angular 2는 HTML 5 웹 컴포넌트 기술을 포함합니다. 이 기술은 Angular 2 컴포넌트를 존재케한 기반기술입니다. 본 슬라이드는 이와 관련하여 2가지 흐름을 가지고 있습니다.
- 전반부는 웹 컴포넌트가 Angular 2 컴포넌트가 되기까지의 과정을 설명합니다.
- 후반부는 컴포넌트 트리 구조를 기반으로한 컴포넌트 상호작용에 대해 설명합니다.
필요하신 분에게 조금이라도 도움이 되었으면 좋겠습니다. 감사합니다.
CHANGE LOG
2016-06-27 : @input 데코레이터 설명교정
2016-06-26 : 쉐도우 돔 / 쉐도우 호스트관련 보다 정확한 문장으로 수정
2016-06-25 : 업로드
Angular2는 컴포넌트 중심의 개발 접근 방식에 대한 내용을 가집니다. 따라서 본 슬라이드도 컴포넌트 중심의 개발 접근 방식으로 Angular2를 바라보았습니다.
대략적인 내용은 다음과 같습니다.
- Angular2 History
- Angular2 핵심구성요소
- 컴포넌트 중심의 개발
- Angular2 주요개념
- Type Script에대한 설명
- 기타
필요하신 분에게 도움이 되었으면 좋겠습니다. 관련 코드는 다음 주소에 공유하였습니다.
https://github.com/DaeguDevGroup/angular2-bootstrap
- 내용이 업데이트되거나, 추가되면 설명에 이력을 남기겠습니다.
- 본 슬라이드에 오류가 있다면 코멘트 바랍니다.
*Change Log*
- 2016-05-14 : 슬라이드 첫 버전을 업로드
본 슬라이드는 Windows환경에서 NginX구동을 실습하기 위해, PHP를 예로 들어 진행하고 있습니다. NginX는 PHP 동적웹페이지에 대한 처리보다, 정적 HTTP 서버에 적합 합니다.
본 슬라이드는 시작과 구동에 초점을 맞추고 있습니다. 설정관련 내용은 아래 공식 문서를 참조할 수 있습니다.
http://nginx.org/en/docs/beginners_guide.html
2. Index
n MIPS 명령어
n beq, bne
n 순환문
n 대소비교..
n MIPS 관련용어
n Register, ALU
n Word, ALU
n Control Unit, Register Set
n PC, Mux ..
n MIPS 개괄적 이해
n 핵심명령어
n CPU Overview, 피연산자, 레지스터 사용관례
n MIPS 구현, R형식, I형식
n MIPS의 데이터패스 예
3. MIPS 명령어 – beq, bne
n Conditional Branch
n beq register, register2, L1
n register, register2가 같으면 L1로 이동
n beq = branch if equal
n bne register, register2, L1
n register, register2가 다르면 L1로 이동
n bne = branch not equal
4. MIPS 명령어 - 순환문
n while(save[i]==k) i+=1;의 MIPS 어셈블리 코드 작성
n 주소계산후, 임시 레지스터에 t1의 값을 넣은후, 조건검사후, != 으면 1을 더한후,
처음으로 다시 돌아간다.
Loop : sll $t1, $t3, 2
# sll은 shift left logical의 약자로, 왼쪽자리이동을 말함
# $t3를 좌측으로 2비트 이동하면 4를 곱한것과 같음 이를 직관적으로
표현하면, $t1 = i * 4 와 같음
add $t1, $t1, $s6
# $s6의 베이스 주소값을 더함.
lw $t0, 0($t1)
# 임시 레지스터에 저장
bne $t0, $s5, Exit
# save[i]!=k이면 순환문을 빠져 나감
ADDI $S3, 3, 1
# I에 1을 더함 I=I+1
J Loop
Exit:
# 순환문의 끝에서 맨 앞의 Loop로 되돌아감.
5. MIPS 명령어 – 두 변수간 대소비교
n slt (set on less than)
n slt $t0, $s3, $s4
n $t0=1 if $s3 < $s4
6. MIPS 명령어 – 프로시저 지원
n 프로시저
n procedure에 제공되는 인수에 따라 특정 작업을 수행하는
서브루틴
n jar (jump and link instruction)
n jal ProcerdureAddress
n 지정된 주소로 점프후 다음 명렁어의 주소를 ra register에
저장
n jr (jump register)
n jr $ra
n 저장된 주소로 무조건 점프
n $a0-$a3 인수레지스터에 전달할 인수값을 저장후, jal X
명령어를 이용해, 프로시저 X로 점프후, 계산결과를 $V0-
$V1(반환되는 값을 가지는 레지스터2개)에 저장후 jr
$ra(호출한곳의 복귀주소)명령으로 복귀
7. MIPS 명령어 - 산술명령어
n MIPS의 산술명령어는 add 연산을 말하며 다음 형식을 가짐
n add a, b, c #주석
n b + c를 a에 저장하는 명령어
n 피연산자를 3개로 제안함으로서 간단한 설계를 유지함
n 여기서, instruction(연산자)는 add이며, operand(피연산자)는 a,b,c를 말함
8. MIPS 관련용어
n 레지스터
n 레지스터는 순차회로이다. CPU 명령어는 레지스터 기반으로 동작.
n 32Bit로 이루어짐
n $0, $1 .. $31 으로 이름지어 있음
n 순차회로는, 플립플롭이라는 메모리 소자가 있으며, 클럭 펄스가
들어오기 전에는 출력단에 변화가 없다. (이런 이유로, 메모리소자라함)
n 레지스터(클럭필요)는 입력값 3이 바뀌더라도, 출력값 1이 변하지 않음
9. MIPS 관련용어
n Word
n 각 기억 장소에 저장되는 데이터 단위로서, CPU에 의해 한 번에
처리될 수 있는 비트들의 그룹
n ALU
n 조합회로이다. 클럭이 필요없으며, 입력값이 바뀌면, 그 값이 바로
반영됨. 다음 클럭이 인가되어야만, 1의 값이 변하게됨.
n 각종 산술 연산들과 논리 연산들을 수행하는 회로들로 이루어진
하드웨어 모듈로, 산술연산(+, -, ×, ÷)과 논리연산(AND, OR,
NOT, XOR 등) 수행
n Control Unit
n ALU에서 수행할 동작지시
n 레지스터간의 데이터 전송 감시
n 명령어를 해석하고 실행하기 위한 제어 신호들(control
signals)를 순차적으로 발생하는 H/W 모듈
10. MIPS 관련용어
n Register Set
n 명령어 수행 동안 발생하는 임시 데이터 저장
n PC (Program Counter)
n 현재 명령어의 주소나 다음에 인출할 명령어를 가짐
n 명령어를 저장하고 주소가 주어지면 해당 명령어를 목적지 주소로 갱신
n PC를 다음 명령어 주소로 증가
n ALU를 통해 다음 명령어 주소로 증가하는 덧셈기 구현가능
12. MIPS 관련용어
n 인스트럭션
n CPU가 해야할 작업을 지시하는 정형화된 언어
n C프로그램은 컴파일을 거쳐 Intruction 형태로 바뀜
n CPU는 일련의 매커니즘에 의해 메모리에서 순서대로 Instruction을
읽어오며, 이 과정을 Instruction Patch라고 함
n Instruction은 연산종류를 의미하는 Operation 입력값과 대상이 되는
값인 Operand를 지정하며, Operation 입력은 Operation Code (OP
Code, 연산자)라고 부름
n I-타입 Instruction
n 연산결과가 레지스터에 저장되며, 연산의 입력값인 두 Operand는
Instruction에 직접 상수형태로 기록될 수 있다.
n R-타입 Instruction
n Operand값이 임의의 레지스터에 저장되고 Instruction에는 이
Register를 지정하는 값이 들어갈 수 있다.
13. MIPS - 개요
n MIPS
n Microprocessor without Interlocked Pipeline Stages
n 밉스 테크놀로지에서 개발한 RISC ISA
n RISC : Reduced Instruction Set Computer
n RISC는 CPU 명령어수를 줄여 H/W구조를 간단히 만드는 방식이다.
n ISA : Instruction Set Architecture)
n 컴퓨터 프로그램과 H/W간 인터페이스에 대한 완전한 명세
도시바에서 생산한
MIPS R4400 프로세서.
14. n 여러 기능 유닛과 그들 사이의 연결에 초점
n multiplexor 추가 필요 (근원지중 하나를 선택하여 목적지로 보내는
구성요소)
MIPS - CPU Overview
15. MIPS - 핵심 명령어
n Memory reference: lw, sw
n Arithmetic/logical: add, sub, and, or, slt
n Control transfer: beq, j
16. MIPS - 피연산자
n MIPS에서 Register
n 32 bit를 word단위로 처리
n 산술명령어는 32bit register중 하나여야함
n 레지스터 개수는 32개로 제한함으로서,전 전기 신호 거리를 짧게
함으로서, 클럭 사이클 시간을 단축시키기 위함
n 레지스터 사용예
n C 코드로, f = (g + h) - (i + j); 을 하는 프로그램이 있을때,
n f,g,h,i,j가 레지스터 $s0, $s1, $s2, $s3, $s4 에 할당되었다는 전제하에
MIPS code로 다음과 같이 나타낼 수 있음
n add $t0, $s1, $s2 #g + h을 t0에 저장
add $t1, $s3, $s4 #i + j을 t1에 저장
sub $s0, $t0, $t1 #t0 t1을 합해 s0에 저장
17. MIPS - 피연산자
n LW (Load)
n 메모리를 레지스터에 적재
n SW (Store word)
n 레지스터에서 메모리로 데이터를 보내는 명령
n SW의 예
n lw $t0, 32($s3)
n lw $t0, 32($s3)는, 시작주소 S3에 32를 더하고 그 값을 t0에 할당
n add $t0, $s2, $t0
n sw $t0, 48($s3)
n 상수지원
n lw $t0, AddConstant4($s1) #$t0=constant 4
n add $s3, $s3, $t0 #$s3 = $s3 + $t0
19. MIPS - 구현
n MIPS에서의 명령어 실행
n 클럭이 뛴후 레지스터를 읽음, ALU는 바로 출력
n PC를 메모리로 보내고, Memory로부터 명령어 가져온 후,
명령어 필드를 보고, 두개의 레지스터를 읽음
n 레지스터 읽은후, 명령어가 ALU를 사용하는 이유
n 주소계산 : 참조명령어는 주소계산위해 ALU 사용
n 연산 : 산술/논리 명령어는 연산을 위해 ALU 사용
n 비교 : 분기명령어는 비교하기 위해 ALU 사용
n ALU 사용후 명령어 실행을 끝내기 위한 행동
n 참조명령어 : 메모리에 접근한후
n 저장명령어 : 메모리에 접근한후 (데이터저장)
n 적재명령어 : 메모리에 접근한후 (데이터읽기)
n 산술논리 명령어 / 적재명령어 : ALU나 메모리에 온 데이터를
레지스터에 쓰고난후
n 분기명령어 : 다음 명령어의 주소를 갖게한후
20. MIPS 구현
종류 명령어 예 의미 설명
산술
add add $s1, $s2, $s3 $s1 = $s2 + $s3
피연산자 3개;
오버플로우 탐지
subtract sub $s1, $s2, $s3 $s1 = $s2 - $s3
add immediate addi $s1, $s2, 100 $s1 = $s2 + 100
+ 상수; 오버플로우
탐지
add unsigned addu $s1, $s2, $s3 $s1 = $s2 +$s3
피연산자 3개;
오버플로우 무시
subtract unsigned subu $s1, $s2, $s3 $s1 = $s2 - $s3
add immediate
unsigned
addiu $s1, $s2, 100 $s1 = $s2 + 100
+ 상수; 오버플로우
무시
move from
coprocessor register
mfc0 $s1, $epc $s1 = $epc
예외 PC와 다른 특수
레지스터의 복사
논리연산
and and $s1, $s2, $s3 $1 = $2 & $3
피연사자 3개; bitwise-
AND
or or $s1, $s2, $s3 $1 = $2 | $3
피연산자 3개; bitwise-
OR
and immediate andi $s1, $s2, 100 $1 = $2 & 100 상수와 bitwise-AND
or immediate ori $s1, $s2, 100 $1 = $2 | 100 상수와 bitwise-OR
shift left logical sll $s1, $s2, 10 $1 = $2 << 10 상수만큼 좌측이동
shift right logical srl $s1, $s2, 10 $1 = $2 >> 10 상수만큼 우측이동
21. MIPS - R형식
n R형식 특징
n 명령어의 길이를 같게 하되, 명령어 종류에 따라 형식을 다르게 함
n 명령어 필드
n op : 연산자(opcode)
n rs : 첫번째 근원지(source) 레지스터
n rs : 두번째 근원지 피연산자 레지스터
n rd : 목적지 레지스터
n shamt : 자리이동량
n funct : 기능, op 필드에서 연산 종류를 구체적으로 지정함
op rs rt rd shamt funct
6 bits 6 bits5 bits 5 bits 5 bits 5 bits
MIPS의
명령어필드
23. MIPS - I형식
n I 형식 추가
n R형식만으로 명령어를 표현하기 어려워서 I형식이 추가됨
n 수치연산과 데이터 전송명령어에 사용됨
n 16비트 주소를 사용하므로, rs
op rs rt constant or address
6 bits 5 bits 5 bits 16 bits
24. MIPS – 데이터패스 요소
n 조합소자(조합회로)
n 입력에 대한 출력을 냄
n 예 : ALU
n 상태소자(순차회로)
n 2개의 입력과 1개의 출력을 가짐.
n 상태(state)를 갖는다.
n 예: 메모리, 데이터 메모리 및 레지스터
25. MIPS - R형식 명령의 데이터패스 동작
add $t1, $t2, $t3 명령어후 활성화된 제어선의 모습
26. MIPS - R형식 명령의 데이터패스 설명
n 명령어 실행은 한클럭 사이클에 일어나며, 4단계로 나눌 수 있음
n 예 : add $t1, $t2, $t3의 R형식 명령어의 데이터패스 동작
n 1. Instruction을 Instruction Memory에서 가져오고 PC값을 증가시킨다.
n 2. 두 레지스터 $t2, $t3를, Register file(접근할 레지스터 번호를
지정함으로서 읽고 쓸 수 있는 레지스터들의 집합)로 부터 읽는다.
n 3. ALU가 연산을 하게 되는데, 연산된 결과를 저장하기 위한 $t1 선택을
위한 과정으로, 명령어의 funct 필드(비트 5:0)의 기능코드를 참조해 ALU
의 제어신호를 만든다.
n 4. Control의 ALUOp 제어유닛의 입력 유닛인 OPCODE(31:26)를 보고
RegDst라고 하는, 멀티플렉스 제어 신호를 출력으로 보낸다. RegDst를
보고, 명령어 비트 15:11인 (ALU의 결과 값이 레지스터 파일에
기록되는데) 목적지 레지스터에 해당되는 $t1를 선택하고 $t2, $t3의
결과값을 $ t1에 저장함