5.1.9 · D1 · HinglishInstruction Set Architecture (ISA)

FoundationsLoad - store architecture model

2,025 words9 min read↑ Read in English

5.1.9 · D1 · Hardware › Instruction Set Architecture (ISA) › Load - store architecture model

Pehle aapko parent note confident hokar padh paana chahiye, matlab aapko har wo shabd "dekhna" aana chahiye jo woh aap par fenkta hai. Ye page is topic ko uske sabse chhote tukdon mein tod ke, ek ek picture ke saath wapas jodata hai. Hum maan rahe hain aapne kuch nahi dekha — na "register", na "CPI", aur na hi "instruction". Pehli line zero se shuru hoti hai.


1. Humare kaam ke liye "computer" kya cheez se bana hai?

Screens aur keyboards bhool jao. Is topic ke liye ek computer teen boxes aur unke beech ek wire hai.

Figure — Load - store architecture model

Beech mein wire memory aur shelf ke beech ka akela raasta hai. Jo kuch bhi parent note "load/store" kehta hai, woh ek rule hai ki us wire par kya travel kar sakta hai.


2. Register — worker ki shelf

Picture: ek labelled cubby. MIPS-style code mein inhe R1, R2, R3, … likha jaata hai; ARM mein bhi yahi idea hai. Jab parent note ADD R6, R4, R5 likhta hai, toh padho:

"Worker: cubby R4 mein jo number hai woh lo, cubby R5 mein jo number hai woh lo, unhe add karo, jawab cubby R6 mein rakh do."

Note karo ki teeno naam cubbies hain, kabhi mailboxes nahi. Yahi load/store machine ka poora rule hai, aur ise hum §4 mein pakka karenge.


3. Memory aur address — warehouse aur uske labels

Figure — Load - store architecture model

Notation [R0] ya 0(R1) ka matlab hai "woh mailbox jiska number abhi us register mein baitha hai" — square brackets kehte hain "is number ko khud use mat karo, us mailbox par jao jis par yeh point karta hai."

0(R1) mein 0 ek offset hai — "R1 mein jo address hai wahan se shuru karo, phir 0 mailboxes aage badho." Offsets ek register ko poore array ko point karne deta hai; woh machinery Addressing modes ka topic hai.


4. Load aur Store — wire par allow kiye gaye sirf do kaam

Yahan topic ka dil hai, aur ab iska har shabd pehle se defined hai.

Figure — Load - store architecture model
Recall Memory par seedha arithmetic kyun forbid hai?

Kyunki memory access ek unpredictable number of ticks leta hai (fast agar number paas ho, slow agar door ho — dekho Memory hierarchy). Saari us unpredictability ko sirf do instruction types mein quarantine karke, baaki har instruction fast ho jaati hai aur ek fixed, known time leti hai. ::: Predictable timing hi extra instructions ka inaam hai.


5. Instruction aur Opcode

Parent note instructions ko letter se count karta hai:


6. Clock, cycle, aur frequency

Topic ko frequency kyun chahiye: simpler instructions (§4 ka rule) chip ko har tick ka kaam jaldi khatam karne deta hai, toh chhota hota hai aur badhta hai. Yahi parent ka claim hai "3 GHz vs 2.5 GHz."


7. CPI — cycles per instruction

Parent mein symbol ($\text{CPI}_{\text{ls}} \ll \text{CPI}_{\text{rm}}$) ka matlab sirf "bahut chhota hai" hai.


8. Performance formula ko sath mein jodhna

Ab har letter earn ho chuka hai, toh master equation saaf padhi jaati hai:

Chalte hain parent ke headline numbers ko sirf defined symbols se verify karte hain:


9. "Zyada registers" kyun matter karta hai (register pressure)

Parent ke Example 2 mein (a+b) aur (c+3) ek saath cubbies mein alive rehte hain. Agar cubbies khatam ho jayein toh aapko ek ko wapas memory mein dump karna padta hai (ek spill) aur baad mein reload karna padta hai — extra slow trips. Isliye load/store machines 32 registers rakhti hain, 8 nahi. Kaunsi value kahan rahegi yeh choose karna Register allocation hai.


Foundations topic ko kaise feed karte hain

Memory - big slow mailboxes

Load and Store rule

Registers - tiny fast cubbies

ALU works on registers only

Instruction count I

Clock period Tclk

Execution time T

CPI cycles per instruction

Load-store performance argument


Equipment checklist

Khud ko test karo — har line ka right side dhako aur zyور se jawab do.

Register kya hold karta hai, aur yeh kitna fast hai?
Ek number, instantly reachable (koi memory wait nahi).
[R1] ka matlab kya hai R1 ke mukable?
[R1] = us mailbox ki value jiska address R1 mein hai; R1 = R1 ke andar ki value itself.
Load/store machine mein memory touch karne ki ijazat kaun se instructions ko hai?
Sirf load aur store — kabhi arithmetic ko nahi.
Arithmetic kahan hoti hai?
Poori tarah registers ke beech, ALU ke zariye.
Execution-time formula likho.
.
ko period mein convert karo.
.
CPI ko ek line mein define karo.
Total clock cycles ÷ number of instructions (ek average).
CPI ek single instruction ki latency se kaafi kam kyun ho sakta hai?
Pipelining waiting instructions ko useful kaam ke saath overlap karta hai.
Load/store ISAs mein zyada registers kyun hote hain?
Intermediate values ko slow memory mein spill karne se bachne ke liye.