ããã«ã¡ã¯äžçïŒ ä»æ¥ãç§ãã¡ã¯ãããã»ããµã¢ãŒããã¯ãã£ïŒç§ã®ã¹ãã«ãã§ãã«ãŒã¯ããã¢ãŒããã¯ãã£/ã¢ãŒããã¯ãã£ããšããåèªã§èªããŸããåèªãæ£ããæžãããšãæã¿ãŸãïŒãåŠçããç¬èªã®ããã»ããµã¢ãŒããã¯ãã£ãäœæããããã»ããµã®æäœã«ã€ããŠå¹³åçãªç¥èãæã€äººã ã®ããã®äžé£ã®èšäºãæã£ãŠããŸãã
ã³ã¡ã³ãã¯åãä»ããŠããŸãïŒ
ããã»ããµã¢ãŒããã¯ãã£ã«ã€ããŠå°ã
æŽå²çã«ãå€ãã®ããã»ããµãšå€ãã®ã¢ãŒããã¯ãã£ããããŸãã ããããå€ãã®ã¢ãŒããã¯ãã£ã«ã¯é¡äŒŒç¹ããããŸãã ç¹ã«ãã®ããã«ãRISCãCISCãMISCãOISCïŒURISCïŒãªã©ã®ã¢ãŒããã¯ãã£ã®ãã°ã«ãŒãããç»å ŽããŸããã ããã«ãç°ãªãã¡ã¢ãªã¢ãã¬ã¹æå®ã¢ãŒããã¯ãã£ã䜿çšããããšãã§ããŸãïŒvon NeumannãããŒããŒãïŒã åããã»ããµã«ã¯ç¬èªã®ã¢ãŒããã¯ãã£ããããŸãã ããšãã°ãææ°ã®ã¢ãŒããã¯ãã£ã®ã»ãšãã©ã¯RISCïŒARMãMIPSãOpenRISCãRISC-VãAVRãPIC **ãªã©ïŒã§ãããä»ã®èŠçŽ ïŒããšãã°ãå©äŸ¿æ§/äŸ¡æ Œ/人æ°/ãªã©ïŒã«ãã£ãŠåçŽã«åã£ãã¢ãŒããã¯ãã£ããããŸãx86ãx86-64ïŒææ°ã®ããã»ããµã®x86-64ããã³x86ã¯ãã€ã¯ãã³ãŒãã䜿çšãããã®å éšã«ã¯RISCã³ã¢ããããŸãïŒãM68Kã 圌ãã®éãã¯äœã§ããïŒ
RISC
åœä»€ã»ããã³ã³ãã¥ãŒã¿ã®åæž-åœä»€ã®å®è¡æéãççž®ããã¢ãŒããã¯ãã£ïŒRISCãã³ãŒããããããã¯åœä»€ã®æ°ãæžããããšæããããããŸããããããã§ã¯ãããŸããïŒã ãã®æ¹åã¯ãåœæã®ã³ã³ãã€ã©ã®ã»ãšãã©ããã¹ãŠã®åœä»€ã䜿çšããŠããªãã£ãããšãå€æããåŸãæçµçã«çºå±ããããã»ããµéçºè ã¯Conveyorã䜿çšããŠããã©ãŒãã³ã¹ãåäžãããããšã«ããŸããã äžè¬ã«ãRISCã¯ãã¹ãŠã®ã¢ãŒããã¯ãã£ã®äžéã§ãã
ãã®ã¢ãŒããã¯ãã£ã®é®®æãªäŸïŒARMãMIPSãOpenRISCãRISC-V
Tta
TTAãšã¯äœã§ããïŒ TTAã¯ã1ã€ã®ã¡ã¢ãªã¢ãã¬ã¹ããå¥ã®ã¡ã¢ãªã¢ãã¬ã¹ãžã®1ã€ã®ç§»ååœä»€ã«åºã¥ãã¢ãŒããã¯ãã£ã§ãã ãã®ãªãã·ã§ã³ã¯ãã³ã³ãã€ã©ãŒã®äœæ¥ãè€éã«ããŸãããããã©ãŒãã³ã¹ãåäžãããŸãã ãã®ã¢ãŒããã¯ãã£ã«ã¯1ã€ã®æ¬ ç¹ããããŸããããŒã¿ãã¹ãžã®åŒ·ãäŸåæ§ã§ãã ããããŸãã«äººæ°ãäœãçç±ã§ãã TTAã¯OISCã®äžçš®ã§ããããšã«æ³šæããŠãã ããã
é®®ãããªäŸïŒMOVEãããžã§ã¯ã
OISCïŒURISCïŒïŒ
1ã€ã®åœä»€ã»ããã³ã³ãã¥ãŒã¿ãŒ-åäžã®åœä»€ãæã€ã¢ãŒããã¯ãã£ã ããšãã°ãSUBLEQã ãã®ãããªã¢ãŒããã¯ãã£ã«ã¯ãå€ãã®å Žåã次ã®åœ¢åŒããããŸããã¢ã¯ã·ã§ã³ãå®è¡ããçµæã«å¿ããŠããžã£ã³ããããå®è¡ãç¶è¡ããŸãã å€ãã®å Žåããã®å®è£ ã¯éåžžã«åçŽã§ãããããã©ãŒãã³ã¹ã¯å°ãããããŒã¿ãã¹ã«ãã£ãŠå¶éãããŸãã
é®®æãªäŸïŒBitBitJumpãByteByteJumpãSUBLEQ ãããã®äœåãã®ïŒ
CISC
CISC-è€éãªåœä»€ã»ããã³ã³ãã¥ãŒã¿ãŒ-åœä»€ããšã®ã¢ã¯ã·ã§ã³æ°ã®å¢å ãšããæ©èœã ãããã£ãŠãã³ã³ãã€ã©ã®è€éããå¢ãããšã«ãããããã°ã©ã ã®çç£æ§ãé«ããããšãçè«çã«å¯èœã§ããã ããããå®éã«ã¯ãäžéšã®åœä»€ã¯CISCã§ååã«å®è£ ãããŠããŸããã§ããã ãããã¯ãã£ãã«äœ¿çšããããçç£æ§ã®åäžã¯éæãããŸããã§ããã ãã®ã°ã«ãŒãã®ç¹åŸŽã¯ãã¢ãŒããã¯ãã£éã®å€§ããªéãã§ãã ãŸããååã«ãããããããåœä»€ã®å°ãªãã¢ãŒããã¯ãã£ããããŸããã
é®®æãªäŸïŒx86ãM68K
ã¡ã¢ãªã¢ãã¬ãã·ã³ã°
ãã©ã³ãã€ãã³ã¢ãŒããã¯ãã£
ãã®ãããªã¢ãŒããã¯ãã£ã®ç¹åŸŽã¯ãäžè¬çãªããŒã¿ããã³åœä»€ãã¹ã§ããã ææ°ã®ã¢ãŒããã¯ãã£ã®ã»ãšãã©ã¯ãã€ãã³ã®ãœãããŠã§ã¢ã§ãããããŒããŠã§ã¢ããŒããŒããäœãããšãçŠæ¢ãã人ã¯ããŸããã ãã®ã¢ãŒããã¯ãã£ã«ã¯ãããã»ããµã®ããã©ãŒãã³ã¹ããã¹ã«å€§ããäŸåãããšãã倧ããªæ¬ ç¹ããããŸãã ïŒå šäœã®ããã»ããµããã©ãŒãã³ã¹ãå¶éããŸãïŒã
ããŒããŒãã¢ãŒããã¯ãã£
ãã®ã¢ãŒããã¯ãã£ã®ç¹åŸŽã¯ãåå¥ã®ããŒã¿ãã¹ãšåœä»€ãã¹ã§ãã 1ã€ã®ãµã€ã¯ã«ã§äž¡æ¹ã®ãã¹ã䜿çšããèœåïŒãã¹ããã®åœä»€ã®èªã¿åããšããŒã¿ãã¹ãžã®æžã蟌ã¿ãåæã«è¡ãïŒã«ããããã©ã³ãã€ãã³ãããé«ãããã©ãŒãã³ã¹ãæäŸããŸãããã¢ãŒããã¯ãã£ãè€éã«ããããã€ãã®å¶éããããŸãã äž»ã«ãã€ã¯ãã³ã³ãããŒã©ã§äœ¿çšãããŸãã
CPUã®æ©èœ
ã³ã³ãã€ãŒ
ã³ã³ãã¢ãšã¯ïŒ éåžžã«æããªèšèªã§èšããšããããã¯ãµã€ã¯ã«ããšã«ããã€ãã®äžŠè¡ã¢ã¯ã·ã§ã³ã§ãã ããã¯éåžžã«å€±ç€Œã§ãããæ¬è³ªã瀺ããŠããŸãã ã¢ãŒããã¯ãã£ã®è€éãã«ããã³ã³ãã€ãŒã¯ãçç£æ§ãåäžãããå¯èœæ§ããããŸãã ããšãã°ããã€ãã©ã€ã³ã䜿çšãããšãåœä»€ãèªã¿åããåã®åœä»€ãå®è¡ããåæã«ããŒã¿ãã¹ã«æžã蟌ãããšãã§ããŸãã
çµµã¯ãã£ãšé®®æã§ããã
IF-æ瀺ãåãåã
ID-æ瀺ã®è§£èª
EX-å®è¡ã
MEM-ã¡ã¢ãªã¢ã¯ã»ã¹ã
WB-ã¬ãžã¹ã¿ã«æžã蟌ã¿ãŸãã
ãã¹ãŠãã·ã³ãã«ã«èŠããŸããïŒ ãããŠããïŒ åé¡ã¯ãããšãã°ããžã£ã³ãïŒjmp / branch /ãªã©ïŒã«ãã£ãŠãã€ãã©ã€ã³ã匷å¶çã«å®è¡ãåéïŒæ¬¡ã®åœä»€ãååŸïŒãã次ã®åœä»€ãå®è¡ããåã«2ã4ãµã€ã¯ã«ã®é 延ãçºçããããšã§ãã
æ¢åã®ã¢ãŒããã¯ãã£ãæ¡åŒµãã
ããªãäžè¬çãªææ³ã¯ãæ¢åã®ã¢ãŒããã¯ãã£ã®æ¡åŒµæ©èœã䜿çšããŠåœä»€ãè¿œå ããããšã§ãã é®®æãªäŸã¯ãx86ã§ã®SSEã§ãã åã眪ARMããã³MIPSããã³ã»ãšãã©ãã¹ãŠã ãªãã§ïŒ ãŠãããŒãµã«ã¢ãŒããã¯ãã£ãäœæããããšã¯äžå¯èœã ããã§ãã
å¥ã®ãªãã·ã§ã³ã¯ãä»ã®ã¢ãŒããã¯ãã£ã䜿çšããŠåœä»€ã®ãµã€ãºãå°ããããããšã§ãã
代衚çãªäŸïŒThumbãšARMãMIPS16ãšMIPSã
GPUãã¯ããã¯
å€ãã®ã³ã¢ã¯ãããªã«ãŒãã«ããèŠããããã®æ©èœã®ãããè¿œå ã®ãœãªã¥ãŒã·ã§ã³ãå¿ èŠã§ãã ãã€ã¯ãã³ã³ãããŒã©ã§ããã€ãã©ã€ã³ãèŠã€ããããšãã§ããå ŽåãGPUã§äœ¿çšããããœãªã¥ãŒã·ã§ã³ã¯ãŸãã§ãã ããšãã°ããã¹ã¯å®è¡ïŒARMåœä»€ã«ãããŸãããThumb-I / IIã«ã¯ãããŸããïŒã ãã®ä»ã®æ©èœããããŸãïŒæµ®åå°æ°ç¹æ°ãžã®ãã€ã¢ã¹ãã³ã¢ã®å¢å ãšã¯å¯Ÿç §çãªããã©ãŒãã³ã¹ã®äœäžãªã©ã
ãã¹ã¯ãããå®è¡
ãã®ã¢ãŒãã¯ããžã£ã³ãã䜿çšããã«åœä»€ãé çªã«å®è¡ããããšããç¹ã§åŸæ¥ã®ã¢ãŒããšç°ãªããŸãã åœä»€ã¯ããã®åœä»€ãå®è¡ãããæ¡ä»¶ã«ã€ããŠäžå®éã®æ å ±ãä¿åããæ¡ä»¶ãæºããããªãå Žåãåœä»€ã¯ã¹ããããããŸãã
ãããããªãã§ããïŒ
çãã¯ç°¡åã§ãïŒ ããã¯åœä»€ã®ãã¹ãããŒãããŸããã ããšãã°ããããªã«ãŒãã§ã¯ã1ã€ã®åœä»€ã§æ°åã®ã³ã¢ãããŒãã§ããŸãã ãŸãããžã£ã³ãã·ã¹ãã ã䜿çšãããå Žåãã³ã¢ããšã«äœéã¡ã¢ãªããã®åœä»€ãåŸ ã€å¿ èŠããããŸãã ãã£ãã·ã¥ã¯åé¡ãéšåçã«è§£æ±ºããŸãããããã§ãåé¡ãå®å šã«ã¯è§£æ±ºããŸããã
ãã®ä»
ããã§ã¯ãäžå€®åŠçè£ çœ®ããã³ãã€ã¯ãã³ã³ãããŒã©ãŒã§äœ¿çšãããããã€ãã®ææ³ã«ã€ããŠèª¬æããŸãã
äžæ
å²ã蟌ã¿ã¯ãçŸåšå®è¡äžã®ã³ãŒããäžæåæ¢ããŠãç¹å®ã®æ¡ä»¶äžã§ä»ã®ã¿ã¹ã¯ãå®è¡ããææ³ã§ãã ããšãã°ãååšããªãã¡ã¢ãªäœçœ®ã«ã¢ã¯ã»ã¹ãããšãHardFaultãŸãã¯MemoryFaultã®å²ã蟌ã¿ãŸãã¯äŸå€ãåŒã³åºãããŸãã ãŸãã¯ãããšãã°ãã¿ã€ããŒããŒããŸã§ã«ãŠã³ãããŠã³ããå Žåã ããã«ãããäœããã®ã€ãã³ããåŸ ã€éãéã¢ã¯ãã£ãã«ãªããªãããã«ããããšãã§ããŸãã
æ¬ ç¹ã¯äœã§ããïŒ å²ã蟌ã¿åŒã³åºãã¯ãæ°åã®ã¢ã€ãã«ãµã€ã¯ã«ã§ãããå²ã蟌ã¿ããæ»ããšãã¯æ°åã§ãã ãŸããã³ãŒãã®å é ã«ããããã€ãã®åœä»€ã¯ãå²ã蟌ã¿ããŒãã«çšã®åœä»€ã«ãã£ãŠå æãããŸãã
äŸå€
ãã ããå²ã蟌ã¿ã«å ããŠãããšãã°ãŒãã§é€ç®ããå Žåãªã©ããŸã äŸå€ãçºçããŸãã å€ãã®å ŽåãMIPSãªã©ã®å²ã蟌ã¿ãã·ã¹ãã ã³ãŒã«ãšçµã¿åããããŸãã AVRãŸãã¯äžäœPICãªã©ã®ããã«ãããã»ããµã«äŸå€ãåžžã«ååšããããã§ã¯ãããŸãã
ã·ã¹ãã ã³ãŒã«
ã·ã¹ãã ã³ãŒã«ã¯ãªãã¬ãŒãã£ã³ã°ã·ã¹ãã ã§äœ¿çšãããããã°ã©ã ããªãã¬ãŒãã£ã³ã°ã·ã¹ãã ãšéä¿¡ã§ããããã«ããŸããããšãã°ãOSã«ãã¡ã€ã«ã®èªã¿åããèŠæ±ããŸãã å²ã蟌ã¿ã«éåžžã«äŒŒãŠããŸãã åæ§ã«ãäŸå€ã¯ããã»ããµã«åžžã«ååšãããšã¯éããŸãã
ã¡ã¢ãªã¢ã¯ã»ã¹ã³ã³ãããŒã©ãŒããã³ãã®ä»ã®ããã°ã©ã æ ŒçŽæ¹æ³
ããã§ã¯ãã¢ããªã±ãŒã·ã§ã³ã®ããŒããŠã§ã¢ãžã®çŽæ¥ã¢ã¯ã»ã¹ãæåŠããæ¹æ³ã«ã€ããŠèª¬æããŸãã
ç¹æš©ã¢ãŒã
ããã¯ãããã»ããµãèµ·åããã¢ãŒãã§ãã ãã®ã¢ãŒãã§ã¯ãããã°ã©ã ãŸãã¯OSã¯MMU / MPUããã€ãã¹ããŠã¡ã¢ãªã«ãã«ã¢ã¯ã»ã¹ã§ããŸãã ãããç®çãšããªãããã°ã©ã ã®ããŒããŠã§ã¢ãµãã·ã¹ãã ãžã®çŽæ¥ã¢ã¯ã»ã¹ãé¿ããããããã¹ãŠã®ããã°ã©ã ã¯éç¹æš©ã¢ãŒãã§å®è¡ãããŸãã ããšãã°ããã«ãŠã§ã¢ã Windowsã§ã¯ããã°ãã°Ring-0ãšåŒã°ããŸããã* nixã§ã¯ãã·ã¹ãã ãšåŒã°ããŸãã ã«ãŒãã§ç¹æš©ãŠãŒã¶ãŒãšç¹æš©ã¢ãŒããæ··åããªãã§ãã ãããããŒããŠã§ã¢ã«çŽæ¥ã¢ã¯ã»ã¹ããããšã¯ã§ããŸããïŒãããè¡ãããšãã§ããã·ã¹ãã ã¢ãžã¥ãŒã«ãããŠã³ããŒãã§ããŸãããåŸã§è©³ãã説æããŸã:)
MPUããã³MMU
MPUãšMMUã¯ãè€æ°ã®ã¢ããªã±ãŒã·ã§ã³ãåé¢ããããã«ææ°ã®ã·ã¹ãã ã§äœ¿çšãããŠããŸãã ãã ããMMUã§ã¡ã¢ãªãã移åãã§ããå ŽåãMPUã§ã¯ã¡ã¢ãªãžã®ã¢ã¯ã»ã¹/ã¡ã¢ãªå ã®å®è¡ã³ãŒãã®ã¿ããããã¯ã§ããŸãã
PICïŒPIEïŒ
PIEãšã¯äœã§ããïŒ ïŒMK PICãšã®æ··ä¹±ãé¿ããããã«PICã¯äœ¿çšããŸããïŒã PIEã¯ãã³ã³ãã€ã©ãã¡ã¢ãªå ã®ä»»æã®å Žæã§åäœããã³ãŒããçæããææ³ã§ãã ãã®ææ³ãšMPUãçµã¿åããããšãMPUã§æ©èœããé«åºŠãªããã°ã©ãã³ã°èšèªãã³ã³ãã€ã«ã§ããŸãã
SIMD
äžè¬çãªSIMDæè¡ã¯ã1ã¯ããã¯ãµã€ã¯ã«ã§è€æ°ã®ã¬ãžã¹ã¿ã«å¯ŸããŠè€æ°ã®ã¢ã¯ã·ã§ã³ãå®è¡ããããã«äœ¿çšãããŸãã ããšãã°ãMIPSãNEON / VFP /ãªã©ã®ARMãSSE2ã®x86ãªã©ãã¡ã€ã³ã¢ãŒããã¯ãã£ã«è¿œå ãããå ŽåããããŸãã
æé©åã®ããã®åé 眮
ãã®ææ³ã¯ãåœä»€ãåãœãŒãããŠã³ã³ãã€ã©ãŒãçæããã³ãŒããæé©åããããã»ããµãŒã®ããã©ãŒãã³ã¹ãåäžãããããã«äœ¿çšãããŸãã ããã«ãããã³ã³ãã¢ãæ倧éã«äœ¿çšã§ããŸãã
ã¹ããŒã¿ã¹ã¬ãžã¹ã¿
ã¹ããŒã¿ã¹ã¬ãžã¹ã¿ãšã¯äœã§ããïŒ ããã¯ãããã»ããµã®ç¶æ ãä¿åããã¬ãžã¹ã¿ã§ãã ããšãã°ãããã»ããµãç¹æš©ã¢ãŒãã§ãããã©ãããæåŸã®æ¯èŒã®æäœãçµäºãããã®ã
Masked Executionãšçµã¿åãããŠäœ¿çšââããŸãã äžéšã®éçºè ã¯ãMIPSã«å ¥åãããããã«ããã¯ã«ãªãå¯èœæ§ããããããã¹ããŒã¿ã¹ã¬ãžã¹ã¿ãç¹ã«é€å€ããŠããŸãã
mov vs $ 0 reg
MIPSã«ã¯ãå®æ°ãã¡ã¢ãªã«ããŒãããããã®åå¥ã®åœä»€ã¯ãããŸããããaddiããã³oriåœä»€ãããããŒãã¬ãžã¹ã¿ïŒ$ 0ïŒãšãšãã«ãå®æ°ãã¬ãžã¹ã¿ã«ããŒãããæäœããšãã¥ã¬ãŒãããŸãã ä»ã®ã¢ãŒããã¯ãã£ã«ã¯ååšããŸãã ãã®ãããã¯ã«è§Šããã®ã¯ãç·Žç¿ã®ããèšäºã§åœ¹ç«ã€ããã§ãã
RdãRs vs Rdãrsãrt
ç®è¡åœä»€ã«å«ããã¹ããªãã©ã³ãã®æ°ã«ã€ããŠã¯å€ãã®è°è«ããããŸãã ããšãã°ãMIPSã¯3ã¬ãžã¹ã¿ãªãã·ã§ã³ã䜿çšããŸãã 2ã€ã®ãªãã©ã³ãã1ã€ã®ã¬ã³ãŒãã®ã¬ãžã¹ã¿ã äžæ¹ã2ã€ã®ãªãã©ã³ãã䜿çšãããšãåœä»€ã®ãµã€ãºãå°ãããªããããã³ãŒããåæžãããŸãã çµã¿åããã®äŸã¯ãMIPSã®MIPS16ãšARMã®Thumb-Iã§ãã ããã©ãŒãã³ã¹ã®ç¹ã§ã¯ããããã¯ã»ãŒåãã§ãïŒèŠå ãšããŠåœä»€ãµã€ãºãé€ãïŒã
ãšã³ãã£ã¢ã³ãã¹
ãã€ããªãŒããŒã ããã°ãšã³ãã£ã¢ã³åŒãšãªãã«ãšã³ãã£ã¢ã³åŒãç¥ã£ãŠãããããããŸããã ãããã¯ãåœä»€/ã¬ãžã¹ã¿/ã¡ã¢ãª/ãªã©ã§ãã€ãé ãèšè¿°ããŸãã ããã§ã¯ããã¹ãŠãç°¡åã ãšæããŸã:)ã MIPSãªã©ã®ã¢ãŒããçµã¿åãããããåãåœä»€ã·ã¹ãã ã䜿çšããããã€ãé ãç°ãªãããã»ããµãŒïŒARMãªã©ïŒããããŸãã
CPUããã
ããã§ãããã»ããµãããã¯äœã§ããïŒ å€ãã®äººã¯ããããããŒã¿ãã¹ã®ããããã¹ã§ãããšä¿¡ããŠããŸãããããã§ã¯ãããŸããã ãªãã§ïŒ ãã€ã¯ãã³ã³ãããŒã©ãšãã€ã¯ãããã»ããµã®åæ段éã§ã¯ããã¹ã¯ããšãã°4ãããã§ããã8ãããã®ãã±ããã§éä¿¡ãããŸãã ãã®ããã°ã©ã ã§ã¯ãããã¯8ãããã¢ãŒãã§ããããã«èŠããŸããããçŸåšã®ããã«å¹»æ³ã§ããã ããšãã°ãARM SoCã§ã¯ã128ãããã®ããŒã¿ãŸãã¯åœä»€ãã¹ããã䜿çšãããŸãã
ã³ããã»ããµãŒ
ã³ããã»ããµãŒãšã¯äœã§ããïŒ ã³ããã»ããµã¯ãããã»ããµãŸãã¯å€éšãã€ã¯ããµãŒãããã®èŠçŽ ã§ãã ãããã¯ãããã»ããµã®äž»èŠéšåã«ãšã£ãŠé¢åãããåœä»€ãå®è¡ã§ããããã«ããŸãã 代衚çãªäŸãšããŠãMIPSã®ã³ããã»ããµãŒã¯é€ç®ãšä¹ç®çšã§ãã ãŸãã¯ã80386ã®å Žåã¯387ãªã©ãæµ®åå°æ°ç¹æ°ã®ãµããŒããè¿œå ãããŸããã ããããMIPSã«ã¯å€ãã®ã³ããã»ããµãŒãããããããã®åœ¹å²ãæãããŸãããå²ã蟌ã¿ãäŸå€ãã·ã¹ãã ã³ãŒã«ãå¶åŸ¡ããŸããã å€ãã®å Žåãã³ããã»ããµã«ã¯ç¬èªã®åœä»€ãããããããã®åœä»€ãååšããªãã·ã¹ãã ïŒARMãªã©ïŒã§ã¯ããã©ããïŒãã©ããïŒïŒãä»ããŠããããšãã¥ã¬ãŒãããŸãã æŸèæãšäœããã©ãŒãã³ã¹ã«ããããããããããã¯å€ãã®å Žåããã€ã¯ãã³ã³ãããŒã©ã®å¯äžã®éžæè¢ã§ãã
ååæäœ
ã¢ãããã¯æäœã¯ã1ã€ã®ç䌌ã¿ã¯ãã§è€æ°ã®ã¢ã¯ã·ã§ã³ãå®è¡ããåœä»€ã«ãããã¹ããªãŒã ã«äŸåããªãå®è¡ãä¿èšŒããŸãã
å¥ã®ãœãªã¥ãŒã·ã§ã³ã®å€åœ¢ã¯ãåšèŸºã®ååæ§ã§ãã ããšãã°ãSTM32ã®ã¬ãã°ãé«äœã«èšå®ããã«ã¯ãç°ãªãã¬ãžã¹ã¿ã䜿çšããŸããããã«ãããåšèŸºã¬ãã«ã§ã®ååæ§ãå¯èœã«ãªããŸãã
ãã£ãã·ã¥
確ãã«ãããªãã¯L1ãL2ãL3ããã³ã¬ãžã¹ã¿ã«ã€ããŠèããããšããããŸãã èŠããã«ãããã»ããµã¯ã³ãŒãã®äžéšãåæããŠãžã£ã³ããšã¡ã¢ãªã¢ã¯ã»ã¹ãäºæž¬ããäºåã«ãã£ãã·ã¥ã«ãã®ããŒã¿ãã¡ã¢ãªããååŸããããã«èŠæ±ããŸãã ãã£ãã·ã¥ã¯ãã°ãã°ããã°ã©ã ã«å¯ŸããŠééçã§ããããã®ã«ãŒã«ã«ã¯äŸå€ããããŸãã ããšãã°ãFPGAã®ãœãããŠã§ã¢ã³ã¢ã¯ãœãããŠã§ã¢ãã£ãã·ã¥ã䜿çšããŸãã
ãããŠããã£ãã·ã¥ãã¹ããã£ãã·ã¥ãã¹ãªã©ã®ããšãèããŠããŸããŸããã ããã¯ãããã»ããµåãã§ã¯ãªãæäœã§ããããããã»ããµãã¡ã¢ãªã®ãã®éšåããã£ãã·ã¥ã§ããŸããã§ããã ããã¯ãã¡ã¢ãªãžã®ã¢ã¯ã»ã¹ãé ããªããšããåé¡ã§ãã ãã¹ã¯ããã°ã©ã ã«æ°ä»ãããŸããããããã©ãŒãã³ã¹ã®äœäžã¯èŠéããããŸããããŸããããšãã°å²ã蟌ã¿äžã«ã³ã³ããã¹ããåãæ¿ãããšãå°ããªã³ãŒãããã€ãã©ã€ã³ãšãã£ãã·ã¥ãå¿ èŠã«å¿ããŠããã¯ããããããã£ãã·ã¥ãèŠãã¿ãŸãã
ã·ã£ããŒã¬ãžã¹ã¿
æè¿ã®ããã»ããµã¯ãå€ãã®å Žåãã·ã£ããŠã¬ãžã¹ã¿æè¡ã䜿çšããŠããŸãã ãããã䜿çšãããšãã¬ãžã¹ã¿ã®ä¿åã«é¢é£ããé 延ãå®è³ªçã«çºçãããããšãªããå²ã蟌ã¿ãšãŠãŒã¶ãŒã³ãŒããåãæ¿ããããšãã§ããŸãã
ã¹ã¿ãã¯
ã¹ã¿ãã¯ïŒ .NETãšJavaã§ã¹ã¿ãã¯ãèŠãŸããïŒ ãŸããããªãã¯éšåçã«æ£ããã§ãã ã¹ã¿ãã¯ã¯ååšããŸãããã»ãšãã©ã®ããã»ããµã§ã¯ããŒããŠã§ã¢ã§ã¯ãããŸããã ããšãã°ãMIPSã«ã¯ããããããŸããã ã©ãããŠïŒ çãã¯ç°¡åã§ãã ã¹ã¿ãã¯ã¯ãããã¯ã¢ããããå¿ èŠã®ãªãã¡ã¢ãªãžã®åçŽãªã¢ã¯ã»ã¹ã§ãïŒéåžžã«å€§éæãªå®çŸ©ïŒã ã¹ã¿ãã¯ã¯ãé¢æ°ã®åŒã³åºããåŒæ°ã®åãæž¡ããé¢æ°ã®å®è¡åŸã«ãããã埩å ããããã®ã¬ãžã¹ã¿ã®ä¿åãªã©ã«äœ¿çšãããŸãã
ããŒããšã¯äœã§ããïŒ ããŒãã¯ãã¹ã¿ãã¯ãããã¯ããã«å€§ããã¡ã¢ãªã§ãïŒéåžžãã¹ã¿ãã¯ã¯çŽ1MBã§ãïŒã ãããã¯ãã¹ãŠãã°ããŒãã«ã«ä¿åããŸãã ããšãã°ãMallocã䜿çšããŠååŸãããã¹ãŠã®ãã€ã³ã¿ãŒã¯ãããŒãã®äžéšãæããŸãã ãŸãããã€ã³ã¿ã¯ã¹ã¿ãã¯ãŸãã¯ã¬ãžã¹ã¿ã«ä¿åãããŸãã ã¬ãžã¹ã¿ã«ããŒã¿ãããŒãããããã®åœä»€ã䜿çšãããšãã¹ã¿ãã¯ã®çš®é¡ããšã«ã¹ã¿ãã¯ããã®ä»ã®ã¡ã¢ãªã¢ã¯ã»ã¹ãé«éåã§ããŸããããã¯ãPUSH / POPãINC / DECãŸãã¯ADDIãSUBIïŒå®æ°ãè¿œå ïŒæäœãåžžã«äœ¿çšããŠã¹ã¿ãã¯ã®ããŒã¿ãæ·±ãããå¿ èŠããªãããã§ããè² ã®ãªãã»ãããæã€ã¹ã¿ãã¯ãžã®ã¢ã¯ã»ã¹ã䜿çšããã ãã§ãã
ç»é²
ã¬ãžã¹ã¿ã«ã€ããŠã¯ããŸã詳ãã説æããŸããã ããã«ã€ããŠã¯ãå®è·µçãªèšäºã§è§ŠããŸãã
x86ã®ã¬ãžã¹ã¿ã§ã¯ååã§ãã MIPSã¯ã31åã®ã¬ãžã¹ã¿ã䜿çšããŸãïŒ$ 0ã®å€ã¯åžžã«ãŒãã§ãïŒã ããŒã¯ã¬ãŒå€§åŠã®ããã»ããµã¯ã¬ãžã¹ã¿ãŠã£ã³ããŠã䜿çšããŸãããããã«ãããæ©èœã®ãã¹ããå€§å¹ ã«å¶éãããããã©ãŒãã³ã¹ãåäžããŸããã AVRãªã©ã®ãã®ä»ã®ãã®ã§ã¯ãã¬ãžã¹ã¿ã®äœ¿çšãå¶éãããŠããŸãã ããšãã°ã3ã€ã®16ãããã¯6ã€ã®8ããããšããŠè§£éã§ããŸãããæåã®16ãããã¯äžéšã®æäœã§ã¯äœ¿çšã§ããŸããã MIPSãæè¯ã®æ¹æ³ãéžæãããšæããŸãã ããã¯ç§ã®å人çãªæèŠã§ãã
ã¢ã©ã€ã¡ã³ã
ã¢ã©ã€ã¡ã³ããšã¯äœã§ããïŒ ãã®è³ªåã¯ããªãã«ãä»»ããã ãã:)
çµãã
ããã§ãŒãããŒãã®æåã®ç« ã®çµããã§ãã ã·ãªãŒãºå šäœã¯ãç¬èªã®ããã»ããµãäœæãããšãããããã¯ãäžå¿ã«å±éããŸãã ç¬èªã®ãªãã¬ãŒãã£ã³ã°ã·ã¹ãã ã ç¬èªã®ã¢ã»ã³ãã©ã ç¬èªã®ã³ã³ãã€ã©ãªã©ã
ãŒãã®éšåã¯çè«ã«å°å¿µããŸãã ã·ãªãŒãºå šäœãåå©ã«å°ãããšã¯ã§ããªããšæããŸããããã®è©Šã¿ã¯æ·åã§ã¯ãããŸããïŒ ïŒ