Notice
Recent Posts
Tags
- dataflow modeling
- interrupt
- MUX
- Set
- ATMEGA128A
- Recursion
- structure
- verilog
- Comparator
- sequential logic circuit
- Method
- half adder
- interface
- timer / counter
- Linked List
- behavior modeling
- behavioral modeling
- java
- atmega 128a
- fast pwm mode
- gpio
- ctc mode
- structural modeling
- full adder
- 8bit timer/counter
- LED
- atmega 128
- Algorithm
- normal mode
- 4bit parallel adder
목록Register variable (1)
거북이처럼 천천히
Register variable
1. 레지스터 변수란 무엇인가?Local variable와 Global variable은 주기억장치인 메모리 공간에 저장한다.Register variable은 CPU내에 있는 임시기억장치인 Register에 저장한다.따라서 이미 연산을 수행하는 ALU (Arithmatic Logic Unit)가 있는 CPU내에 있기 때문에 상대적으로 지역 변수와 전역 변수와 비교했을 때, 데이터를 옮겨지는 과정이 없기 때문에 연산 속도가 빠르다.따라서 자주 사용하는 데이터 및 변수에 대해서 레지스터 변수로 사용하는 것이 일반적이다. 2. 레지스터 변수 주의사항전역 변수를 레지스터 변수로 사용할 수 없다.▶ 전역 변수의 lifetime은 프로그램의 시작과 끝이기 때문에 한정적인 레지스터에 계속해서 데이터를 저장하기 어렵기..
C
2024. 6. 18. 13:51