See also ebooksgratis.com: no banners, no cookies, totally FREE.

CLASSICISTRANIERI HOME PAGE - YOUTUBE CHANNEL
Privacy Policy Cookie Policy Terms and Conditions
Thanh ghi – Wikipedia tiếng Việt

Thanh ghi

Bách khoa toàn thư mở Wikipedia

Trong kiến trúc máy tính, một thanh ghi là một bộ nhớ dung lượng nhỏ và rất nhanh được sử dụng để tăng tốc độ xử lý của các chương trình máy tính bằng cách cung cấp các truy cập trực tiếp đến các giá trị cần dùng. Hầu hết, nhưng không phải tất cả, các máy tính hiện đại hoạt động theo nguyên lý chuyển dữ liệu từ bộ nhớ chính vào các thanh ghi, tính toán trên chúng, sau đó chuyển kết quả vào bộ nhớ chính.

Các thanh ghi xử lý là phần đầu tiên của phân cấp bộ nhớ, và cung cấp nhanh nhất vào hệ thống để xử lý dữ liệu. Thuật ngữ này thường được dùng để nói đến một tập các thanh ghi có thể được chỉ trực tiếp cho việc nhập hay xuất các câu lệnh, xem thêm ở tập lệnh . Chúng được gọi là " kiến trúc thanh ghi". Ví dụ, Processor registers are the top of the memory hierarchy, and provide the fastest way for the system to access data. The term is often used to refer only to the group of registers that can be directly indexed for input or output of an instruction, as defined by the instruction set. More properly, these are called the "architectural registers". For instance, the x86 instruction set defines a set of eight 32-bit registers, but a CPU that implements the x86 instruction set will contain many more registers than just these eight.

Putting frequently used variables into registers is critical to the program's performance. This action, namely register allocation is usually done by a compiler in the code generation phase.

[sửa] Categories of registers

Thanh ghi thường được đo bằng các bit nó có thể chứa, ví dụ, một thanh ghi "8-bit" hay thanh ghi "32-bit". Các thanh ghi hiện nay thường được xem như file thanh ghi - register file, nhưng chúng cũng được dùng riêng rẽ flip-flops, tốc độ cao core memory, thin film memory, và các cách khác trong nhiều máy móc.

Có một số phân lớp các thanh ghi tùy theo nội dung:

  • Thanh ghi khả hiện - Có hai loại. Thanh ghi dữ liệu và thanh ghi địa chỉ.
  • Thanh ghi dữ liệu được dùng để lưu số nguyên (xem thanh ghi số thực dưới đây). Trong một số bộ CPU hiện nay và trước đây, có một thanh ghi đặc biệt là thanh ghi tích lũy tích lũy, được dùng cho nhiều tính toán.
  • Thanh ghi địa chỉ chứa địa chỉ bộ nhớ và được dùng để truy cập bộ nhớ. Trong một số CPU, có một thanh ghi địa chỉ đặc biệt thanh ghi chỉ mục, although often these hold numbers used to modify addresses rather than holding addresses.
  • Conditional registers hold truth values often used to determine whether some instruction should or should not be executed.
  • General purpose registers (GPRs) can store both data and addresses, i.e., they are combined Data/Address registers.
  • Floating point registers (FPRs) are used to store floating point numbers in many architectures.
  • Constant registers hold read-only values (e.g., zero, one, pi, ...).
  • Vector registers hold data for vector processing done by SIMD instructions (Single Instruction, Multiple Data).
  • Special purpose registers hold program state; they usually include the program counter (aka instruction pointer), stack pointer, and status register (aka processor status word).
    • Instruction registers store the instruction currently being executed.
    • Index registers are used for modifying operand addresses during the run of a program.
  • In some architectures, model-specific registers (also called machine-specific registers) store data and settings related to the processor itself. Because their meanings are attached to the design of a specific processor, they cannot be expected to remain standard between processor generations.
  • Control and status registers-It has three types. Program counter, instruction registers, Program status word(PSW). I (AAQ) will soon explain these three types as well.
  • Registers related to fetching information from random access memory, a collection of storage registers located on separate chips from the CPU (unlike most of the above, these are generally not architectural registers):
    • Memory buffer register
    • Memory data register
    • Memory address register
    • Memory Type Range Registers

Hardware registers are similar, but occur outside CPUs.

[sửa] Some examples

The table below shows the number of registers of several mainstream processors:

Processors Integer registers Double FP registers
Pentium 4 8 8
Athlon MP 8 8
Opteron 240 16 16
Itanium 2 128 128
UltraSPARC IIIi 32 32
Power 3 32 32



aa - ab - af - ak - als - am - an - ang - ar - arc - as - ast - av - ay - az - ba - bar - bat_smg - bcl - be - be_x_old - bg - bh - bi - bm - bn - bo - bpy - br - bs - bug - bxr - ca - cbk_zam - cdo - ce - ceb - ch - cho - chr - chy - co - cr - crh - cs - csb - cu - cv - cy - da - de - diq - dsb - dv - dz - ee - el - eml - en - eo - es - et - eu - ext - fa - ff - fi - fiu_vro - fj - fo - fr - frp - fur - fy - ga - gan - gd - gl - glk - gn - got - gu - gv - ha - hak - haw - he - hi - hif - ho - hr - hsb - ht - hu - hy - hz - ia - id - ie - ig - ii - ik - ilo - io - is - it - iu - ja - jbo - jv - ka - kaa - kab - kg - ki - kj - kk - kl - km - kn - ko - kr - ks - ksh - ku - kv - kw - ky - la - lad - lb - lbe - lg - li - lij - lmo - ln - lo - lt - lv - map_bms - mdf - mg - mh - mi - mk - ml - mn - mo - mr - mt - mus - my - myv - mzn - na - nah - nap - nds - nds_nl - ne - new - ng - nl - nn - no - nov - nrm - nv - ny - oc - om - or - os - pa - pag - pam - pap - pdc - pi - pih - pl - pms - ps - pt - qu - quality - rm - rmy - rn - ro - roa_rup - roa_tara - ru - rw - sa - sah - sc - scn - sco - sd - se - sg - sh - si - simple - sk - sl - sm - sn - so - sr - srn - ss - st - stq - su - sv - sw - szl - ta - te - tet - tg - th - ti - tk - tl - tlh - tn - to - tpi - tr - ts - tt - tum - tw - ty - udm - ug - uk - ur - uz - ve - vec - vi - vls - vo - wa - war - wo - wuu - xal - xh - yi - yo - za - zea - zh - zh_classical - zh_min_nan - zh_yue - zu -