{"format":"brushup-mindmap-v1","id":"co-00-sheet0","title":"总画布","structure":"logic-right","theme":"auto","root":{"id":"9a08dfb599093ad7c1ca6b1560","topic":"计算机组成原理","expanded":true,"children":[{"id":"65fa68afd2ab1a9b737fa99e15","topic":"第一章 计算机系统概论","expanded":true,"nestedMap":{"src":"kaoyan/408/computer-organization/co-00-sheet1","expanded":false,"maxHeight":260,"doc":{"format":"brushup-mindmap-v1","id":"co-00-sheet1","title":"第一章 计算机系统概论","structure":"timeline-h","theme":"auto","root":{"id":"e2f88210a87b7eff975658c01d","topic":"计算机系统概论","expanded":true,"children":[{"id":"c0ef18c1-ac4d-43a8-a058-5094dbd0b0e4","topic":"发展历程","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-1e6b21ffbad4e5.svg","width":64,"height":64},"children":[{"id":"4ec81c67-e520-4679-8495-d58cc637af32","topic":"四代变化","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"37ca4318-bf8e-46ac-96a9-2452494067cb","topic":"电子管 -> 晶体管 -> 中小规模集成电路 -> 超大规模集成电路","expanded":true}]},{"id":"56c83510-4aff-45f9-824f-4187bff559bb","topic":"元件的更新换代","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"1835d440-a336-4800-9d70-46dd410bf075","topic":"摩尔定律","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"ac7b6ac0-28b7-4f89-8a9f-afdfa6767111","topic":"集成电路上可容纳的晶体管数目每18个月翻一倍","expanded":true,"style":{"background":"#8EDDF9"}}]},{"id":"8670ceaa-ed6c-486e-939d-f985d9543322","topic":"半导体、微处理器的发展","expanded":true}]},{"id":"9f36b4af-02e4-4814-9b6b-753614270963","topic":"软件的发展","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"97071687-435e-499d-9cb2-cf43e56b3dda","topic":"编程语言","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"f49414b7-1fee-4052-866e-1bb9d29f5bc8","topic":"机器、汇编、高级语言","expanded":true,"children":[{"id":"e5365ce8-4280-46be-abac-e773459aff77","topic":"PASCAL C++ Java","expanded":true}]}]},{"id":"287cfd09-b8b1-417e-8209-ec545d767421","topic":"操作系统","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"ba36d48c-2ad1-40c5-8829-ac534d76391a","topic":"Windows、Linux、UNIX","expanded":true}]}]},{"id":"d634af97-f61c-441a-a2d7-eec2c09d55b3","topic":"计算机分类和发展","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"c5969290-056e-4f86-84b9-ab321a2364cf","topic":"电子计算机","expanded":true,"style":{"background":"#8EDE99"}},{"id":"bd4f27fd-efff-4edb-a6cb-f7814144abe5","topic":"数字计算机","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"d7bcc620-5e27-42bb-b317-67eef6f318f5","topic":"专用 + 通用计算机","expanded":true}]},{"id":"fa247db0-bea1-4bcd-a84c-6993100ea469","topic":"通用计算机","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"1813b1e2-b259-461b-bc98-d1b97fa1d145","topic":"巨型机、大型机、中型机、小型机、微型机、单片机","expanded":true},{"id":"8d8c3a80-c4c3-43ef-a4fb-339f2b311493","topic":"SISD、SIMD、MISD、MIMD","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"5efaaf64-4627-46a3-9eef-6c1f752d9c32","topic":"Single/Multi instruction S/M data stream","expanded":true},{"id":"1fb56da5-4af4-40d3-90ab-0a043147e08e","topic":"单指令流和单数据流系统：","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"6bff6da2-cf60-4671-8ed0-98c4d2aa476d","topic":"SISD: 冯诺依曼","expanded":true,"style":{"background":"#8EDDF9"}},{"id":"5d3660cf-edce-4147-b477-83539be521d8","topic":"传统冯洛伊曼体系结构","expanded":true}]},{"id":"063702d0-5948-47e4-800a-84a81e07ebda","topic":"单指令流和多数据流系统：","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"1b2d97fd-6000-4ff0-b4d1-bb9183bd353c","topic":"SIMD: 向量、阵列处理器","expanded":true,"style":{"background":"#8EDDF9"}},{"id":"22acb4f8-993a-406c-9ecb-7b4b76984b14","topic":"包括阵列处理器和向量处理器系统","expanded":true}]},{"id":"3f93cfe4-f100-40aa-a845-f98396adfe82","topic":"多指令流和单数据流系统：","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"c5a7ca3d-6af3-4b57-9bea-0bb0999b61d2","topic":"MISD: 不存在","expanded":true},{"id":"46801ba0-573f-48d0-b375-2d2c0232e46d","topic":"实际上不存在","expanded":true}]},{"id":"6efab855-0f18-4270-a6d1-cf0cceef2b33","topic":"多指令流和多数据流系统：","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"c82166d6-8341-4398-a6e4-a518a3293dd6","topic":"MIMD: 多处理器系统","expanded":true,"style":{"background":"#8EDDF9"}},{"id":"bc1c3c68-bb2d-4537-9739-f025d8b8df5f","topic":"包括多处理器和所计算机系统","expanded":true}]}]}]},{"id":"813f18a2-a779-45a8-85dd-25e43ba31b0c","topic":"系列机的特性：","expanded":true,"style":{"background":"#FFABD5"},"children":[{"id":"3dad2f31-9404-4ab2-b729-6beabe71b83d","topic":"指令系统向后兼容","expanded":true,"style":{"background":"#FFABD5"},"children":[{"id":"e35909d9-6e4d-418e-9457-5052b1876331","topic":"在时间上向后兼容：新的机器是兼容老机器指令系统的（Apple就在部分淘汰老机器的指令系统）","expanded":true,"style":{"background":"#FFABD5"}}]}]}]},{"id":"c953ea89-610e-4464-b38d-7479c5af61d1","topic":"*","expanded":true}]},{"id":"486a6646-eb2a-482e-8900-ada962430d18","topic":"层次结构","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-0eb260ceca6ca7.svg","width":64,"height":64},"children":[{"id":"092e8d77-6958-417a-adba-5bc027cab7e9","topic":"软硬件功能等价性","expanded":true,"children":[{"id":"92dfa9b1-7b73-484b-9977-955b917fdd57","topic":"对某一功能来说，既可以由硬件实现，又可以由软件实现，从用户的角度来看，它们在功能上是等价/等效的","expanded":true}]},{"id":"5b5c6e92-3088-46e1-98a3-0082e5fa7027","topic":"硬件的基本组成","expanded":true,"children":[{"id":"21c466af-436b-4fd6-b5e4-80234b11b930","topic":"输入、输出设备","expanded":true},{"id":"1a98e0b3-cd3a-4bdd-9a91-834daa6068d2","topic":"存储器","expanded":true,"children":[{"id":"e4254fb9-9397-4647-ac5f-7c3a33597fb1","topic":"主存储器：内存","expanded":true},{"id":"9b311e89-f3bc-4cb6-b3c4-bc05343c3e8f","topic":"辅助存储器：外存","expanded":true},{"id":"d3fdec63-4b5a-423e-8072-1ed287a0b3f4","topic":"通过【时序控制逻辑】来控制","expanded":true}]},{"id":"2ca91f21-8f90-4964-a009-ef995a159dfe","topic":"冯 · 诺依曼机","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"811d8fb9-323e-4eef-bada-f77a88a985f9","topic":"最大贡献：","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"69aca37f-aa1a-49e5-95af-95a1a44171ec","topic":"提出了“存储程序”的概念","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"1414513d-cee9-40a7-b2cd-c0876c45ba3c","topic":"即：把指令以代码的形式事先输入到计算机的主存储器中","expanded":true,"style":{"background":"#FDD834"}}]}]},{"id":"c82e043d-52c1-4fc3-807b-7cff22bdb4a1","topic":"特点：","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"5ab167d0-2e48-4044-acf0-a76b1f184fcc","topic":"【硬件】系统有：运算器、存储器、控制器、输入设备、输出设备","expanded":true,"style":{"background":"#8EDDF9"}},{"id":"c69ef76d-40d4-4d78-a944-852dd1be7e53","topic":"指令和数据【同等地位】存储在存储器中，都可以通过【地址访问】","expanded":true,"style":{"background":"#FF9595"}},{"id":"4e4e7ec9-b915-4494-9307-948f37feb148","topic":"指令和数据均用【二进制】表示","expanded":true,"style":{"background":"#8EDDF9"}},{"id":"e8bf4a8f-abad-4e75-889d-3f5e12ac55c6","topic":"指令由【<操作码 、地址码>】组成","expanded":true,"style":{"background":"#FF9595"}},{"id":"eb00194e-a570-40e2-b3e1-1ada98278c76","topic":"指令在存储器中【顺序存放】","expanded":true,"style":{"background":"#8EDDF9"}},{"id":"010478b0-1bc3-4899-bbff-025aba97ff02","topic":"早期冯诺依曼机是以【运算器】作为核心的","expanded":true,"style":{"background":"#FFABD5"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-bc28e6acb5057b.png","width":603.5,"height":277.04},"children":[{"id":"675744a7-2cfd-4d95-88c5-7fe7dd0d50b9","topic":"冯诺依曼模型机（虚线：控制信号）","expanded":true,"style":{"background":"#8EDE99"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-c4411c897395be.png","width":665.45,"height":320.04}}]}]},{"id":"2e2538ad-5a19-43e8-99e6-664cad03f2f7","topic":"其他考点：","expanded":true,"style":{"background":"#FFABD5"},"children":[{"id":"855557c7-9509-4705-b630-4f40917f3dc1","topic":"单处理机","expanded":true,"style":{"background":"#FFABD5"}},{"id":"5577fe42-9588-4762-90f9-6a39141a2f8c","topic":"驱动方式","expanded":true,"style":{"background":"#FFABD5"},"children":[{"id":"27165b5d-8638-40c1-bf99-4f8759f8fefc","topic":"控制流驱动","expanded":true,"style":{"background":"#FFABD5"},"children":[{"id":"3b4f9396-18b5-4dc3-b2d9-5f76bad9b5c6","topic":"先取指令，指令指明如何取数据","expanded":true,"style":{"background":"#FFABD5"}}]},{"id":"9a5cfb9f-fff2-4382-95a5-17ac58542f6f","topic":"数据流驱动","expanded":true,"style":{"background":"#FFABD5"},"children":[{"id":"c71bffde-3b70-4926-af33-56a248a250f2","topic":"先取数据，数据指明如何取指令","expanded":true,"style":{"background":"#FFABD5"}}]}]},{"id":"06dad6c1-af7f-4ea7-b6df-7d1f17583b84","topic":"控制方式","expanded":true,"style":{"background":"#FFABD5"},"children":[{"id":"e65c59a3-db73-41ec-a68f-c73687dc9062","topic":"微程序控制","expanded":true,"style":{"background":"#FFABD5"}},{"id":"91e0440f-f29e-4700-b057-44f4211b6a4b","topic":"硬布线控制","expanded":true,"style":{"background":"#FFABD5"}}]}]}]},{"id":"5159eeb8-3284-4ade-a3b7-fffb8b710039","topic":"现代计算机","expanded":true,"children":[{"id":"cc2758bd-76e6-4a03-b6af-738d97ea5a78","topic":"以【存储器】为核心","expanded":true,"style":{"background":"#FDD834","borderColor":"#FDD834"},"children":[{"id":"2651f60b-406e-43ba-a015-c32b105e153f","topic":"现代计算机的数据处理量增大、运算器和控制器合并、存储器的容量大、I/O尽可能绕过CPU","expanded":true}]},{"id":"07688ab5-0148-423f-94e7-7cfcc8fd7a9d","topic":"图示：","expanded":true,"children":[{"id":"93adc18b-cbd6-42a6-a308-ce6d025b49c8","topic":"图示","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-a1c090dc277ee4.png","width":342.47,"height":260.91}}]}]},{"id":"c610c6d2-c34f-4737-8f7d-7ff96effc5cb","topic":"各个设备的内容：","expanded":true,"children":[{"id":"74d2b053-3aca-4082-a288-e6c5bad0d3b6","topic":"请看后续章节","expanded":true}]}]}]},{"id":"2cb969f8-2221-442c-ac3c-a57d4a6f2087","topic":"软件分类","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-44b04ee4db8d01.svg","width":64,"height":64},"children":[{"id":"41076628-7d04-4c6f-bcea-61a8d8b54dcf","topic":"软件分类","expanded":true,"children":[{"id":"6d0818c9-e37c-498e-bb16-4234f769b8e9","topic":"系统软件","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"f123c883-a309-42cb-b1fc-a392abffe753","topic":"操作系统（OS）、数据库管理系统（DBMS）","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"9d6d2d83-d660-4038-8277-b966259e033e","topic":"操作系统是大型系统软件","expanded":true,"style":{"background":"#FFABD5"}},{"id":"0c2179ff-ce1d-4253-8d90-b7f6378af280","topic":"区别DBMS和DBS：","expanded":true,"style":{"background":"#FFABD5"},"children":[{"id":"506adac7-a2a0-4f52-a73f-42abd9d45559","topic":"DBS是数据库系统，DBS是OS【引入了数据库以后的系统】，一般由数据库、数据库管理系统、数据库管理员、应用系统组成，是【应用软件】","expanded":true},{"id":"30b6d055-638b-455c-96d7-1b863a996bf7","topic":"DBMS是位于用户和OS之间的一层【数据管理软件】，是【系统软件】","expanded":true},{"id":"349ce4bd-345f-498d-9edc-32e877bb8399","topic":"DBS没了操作系统依然可以正常运行，故为【应用软件】。DBMS是用于把DBS和硬件进行交互的软件，故为【系统软件】","expanded":true,"style":{"background":"#FF9595"}}]}]},{"id":"d5ed8e76-ae4a-41b8-a1fd-c32b64de7699","topic":"语言处理系统、分布式软件系统、网络软件系统、标准库系统、服务型程序等","expanded":true}]},{"id":"0f3ecef8-b0f5-4e4b-87a9-b7b234215be2","topic":"应用软件","expanded":true,"children":[{"id":"2ba61878-15b3-41b8-9c0c-3b6c2171e09e","topic":"文本处理","expanded":true,"style":{"background":"#FFABD5"}},{"id":"7ff3ff66-2c50-4522-abb5-6186bfa26e6a","topic":"DBS（数据库系统）","expanded":true}]},{"id":"5148d8b5-b621-45ad-a96e-f9b5cccc07ca","topic":"其他软件","expanded":true,"children":[{"id":"d8edbd5d-67b5-4b9d-b898-0a7efe4ee99d","topic":"编译程序","expanded":true,"style":{"background":"#FFABD5"},"children":[{"id":"d2244082-3b4f-4b68-a685-9eaf5382ec02","topic":"：语言处理软件","expanded":true,"style":{"background":"#FFABD5"}}]},{"id":"c0fe3b40-c430-4725-a31b-338f0a475696","topic":"连接程序","expanded":true,"style":{"background":"#FFABD5"},"children":[{"id":"4676ba35-ca4c-42b4-a236-bd476f00c95d","topic":"：服务型程序","expanded":true,"style":{"background":"#FFABD5"}}]}]}]},{"id":"e902e8b8-b07b-45d1-9fd8-6fad571a077d","topic":"语言分类","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"3fa9f0f1-fea1-4158-ade0-bafe7f0dc9f3","topic":"机器","expanded":true,"children":[{"id":"f286d023-d09e-432d-9b05-33097aefdf5e","topic":"二进制","expanded":true}]},{"id":"55451ab5-bf1f-425a-8684-ed7792f2bec4","topic":"汇编","expanded":true,"children":[{"id":"6a5b67e3-5fd9-42d6-bb38-309437cba3ef","topic":"二进制的易读形式","expanded":true}]},{"id":"66c3d3ca-59ad-4b10-842c-cbd6cea9fd2c","topic":"高级","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"d52b7a26-b333-40f8-a5a1-cc4a49cca332","topic":"【预处理】是把头文件中的引用代码段插入到程序文件中","expanded":true,"style":{"background":"#EEEEEE"}},{"id":"3f9678f9-4bb0-41f1-ad12-a1fc7e0bbe75","topic":"【编译】生成的就是【汇编程序】","expanded":true,"style":{"background":"#8EDE99"}},{"id":"3995f436-b5d2-43fe-a978-425fdcb0a111","topic":"【汇编】生成的就是【机器程序】","expanded":true,"style":{"background":"#8EDE99"}},{"id":"ec7cead4-bfd3-425e-a12e-977133099e79","topic":"编译的步骤：","expanded":true,"children":[{"id":"351b92e5-e5df-47d8-bb30-d8a3bf292808","topic":"源代码文件 .c","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"f802816d-82d9-407a-b9dd-3929da19f748","topic":"预处理 -> .i","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"97e2a323-cc99-46e7-a4be-13100413d01a","topic":"编译 -> .s","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"5d6a5407-b3aa-4622-941b-403383e73c1d","topic":"汇编 -> .o","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"d561a878-5d99-48e5-a13e-fe9f8788a6cf","topic":"链接 -> .exe","expanded":true,"style":{"background":"#FF9595"}}]}]}]}]}]},{"id":"79327f9d-7d74-4cdf-8c8d-c23989e6f965","topic":"编译后产生的目标模块地址都是从0开始的相对地址","expanded":true}]},{"id":"55df0b30-a2c1-4000-bad1-bf01bf7807a2","topic":"翻译、编译、解释、汇编：","expanded":true,"style":{"background":"#FFABD5"},"children":[{"id":"353601dc-149c-4cf4-9ac5-a453764c6e64","topic":"翻译[过程]：","expanded":true,"style":{"background":"#FFABD5"},"children":[{"id":"cb7bb101-7ade-4289-ad4e-c214b4ce1354","topic":"高级语言一步步转为机器语言","expanded":true}]},{"id":"3a9ecc69-89c5-4a12-851b-cd3a26a1780c","topic":"编译程序：","expanded":true,"style":{"background":"#FFABD5"},"children":[{"id":"5a43591c-5e84-4684-a643-8228bd241e61","topic":"高级语言一步到位直接转为机器语言","expanded":true}]},{"id":"31871205-6042-4eaa-8c18-74624aaf31aa","topic":"解释程序：","expanded":true,"style":{"background":"#FFABD5"},"children":[{"id":"209d5879-57c2-4fb4-8f28-ffc23dc654ae","topic":"高级语言一条条解释为机器语言后执行","expanded":true,"children":[{"id":"5d19cfb4-7c35-41ad-83b3-bf94883ead46","topic":"如python","expanded":true}]}]},{"id":"b79a3e27-f791-4ff8-8011-317d02d869fa","topic":"汇编程序：","expanded":true,"style":{"background":"#FFABD5"},"children":[{"id":"0d173d7e-d8be-4e8d-bc98-e322e1fe3ade","topic":"汇编 -> 机器","expanded":true}]}]}]}]},{"id":"d66d6f62-5ff7-4ae2-a768-31a7ece2188a","topic":"层次结构、工作原理","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-127eb26f8b6f75.svg","width":64,"height":64},"children":[{"id":"c47bb48f-51e7-4f14-af3a-02207b9abbf4","topic":"考频：中","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"db55a5cd-2312-4fc5-9a65-bc206a5c26dc","topic":"09、15、16、19、22","expanded":true}]},{"id":"d752f6b4-cdc5-439c-84c1-b42f1ca53cf0","topic":"多层结构图：","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"bbf2133d-c649-44c2-8f81-f9c7af1121a9","topic":"还有M5是应用程序层（执行的操作是需要先转为M4来对应到高级语言的某段代码的）","expanded":true,"style":{"background":"#FF9595"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-6121ef9cc931cf.png","width":422.11,"height":375.7},"children":[{"id":"6d950cde-e31c-4bfe-ae4d-a62ce55da0f5","topic":"M2  - 混合层","expanded":true},{"id":"3d3b0fc3-cd96-4eb8-bc77-4fa7ebbf1459","topic":"没有软件的系统：裸机（即只有M0、M1)","expanded":true,"style":{"background":"#FF9595"}},{"id":"330cde6e-792b-43e2-bb4a-b8357997733c","topic":"虚拟机（指M2 ~ M4）","expanded":true,"style":{"background":"#FF9595"}},{"id":"c1e9625b-2954-4791-b501-b624896105fb","topic":"下层是上层的基础，上层是下层的拓展","expanded":true,"style":{"background":"#8EDE99"}}]}]},{"id":"8dfb1114-7eef-4787-97cb-5c29451b462c","topic":"存储程序工作方式：","expanded":true,"children":[{"id":"b2b80235-4622-466f-8a8e-00356f77d0f6","topic":"根据PC取指令","expanded":true,"children":[{"id":"f0607bb6-3830-4e56-9e82-c756ee6f5bd2","topic":"指令译码，PC ++","expanded":true,"children":[{"id":"9f53131d-6240-43ad-b6e4-ece2fd8aba9c","topic":"取操作数，执行","expanded":true,"children":[{"id":"60cd8be5-53b9-4e0d-a409-5a01b2aa4124","topic":"送结果","expanded":true}]}]}]}]},{"id":"84aca1e7-d0fc-444d-947f-9637774c547a","topic":"从源程序到可执行程序：","expanded":true,"children":[{"id":"f16bf8c3-5c71-422d-84f2-4281eff813a7","topic":"图示","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-3cfd8f3b2e092c.png","width":564.69,"height":113.74}},{"id":"b7c33e1d-934d-4306-8fc1-72b4e25eb668","topic":"预处理阶段：","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"b01671e2-a55e-4957-9936-7152fe003e81","topic":"预处理器（cpp）对源程序中以字符#开头的命令进行处理。","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"f7f1512c-a548-40f1-b5f4-5dd757808212","topic":"例如将#include 命令后面的.h文件内容插入程序文件。输出结果是一个以.i为扩展名的源文件hello.i","expanded":true}]}]},{"id":"07bec8cc-0652-454d-8b77-d964c6db1f22","topic":"编译阶段：","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"b856cd47-7ac1-4ade-8239-b55f840cb47c","topic":"编译器（ccl）对预处理后的源程序进行编译，生成一个汇编语言源程序hello.s","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"60dc17bc-99db-434d-99cf-3a5f9c86ab6b","topic":"汇编语言源程序中的每条语句都以一种文本格式描述了一条低级机器语言指令 。","expanded":true}]}]},{"id":"f4079132-062d-4ec2-b20d-24b1c0fd2811","topic":"汇编阶段：","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"5f3d62a6-7125-4145-9ae9-3304d57c41c5","topic":"汇编器（as）将hello.s翻译成机器语言指令，把这些指令打包成一个称为可重定位目标文件的hello.o","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"879700c2-012f-4b8a-8f8e-eeec515a0b5a","topic":"它是一种二进制文件，因此用文本编辑器打开会显示乱码。","expanded":true}]}]},{"id":"ab4df3d5-12c1-4b2b-a61c-4cf3f7071c7b","topic":"链接阶段：","expanded":true,"style":{"background":"#BA69C8"},"children":[{"id":"57628b0e-8967-47bb-8890-f5f490b8ca13","topic":"链接器（Id）将多个可重定位目标文件和标准库函数合并为一个可执行目标文件，或简称可执行文件。","expanded":true,"style":{"background":"#BA69C8"},"children":[{"id":"8be0741c-0756-4176-9699-b709480d623e","topic":"本例中，链接器将hello.o和标准库函数printf所在的可重定位目标模块printf.o合并，生成可执行文件hello最终生成的可执行文件被保存在磁盘上。","expanded":true}]}]}]},{"id":"cdfb847d-f148-452b-93ea-94e6ba96620b","topic":"UNIX中执行","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"c1e30b5b-9370-4328-8007-8396b844b542","topic":"一个简单的C语言程序样例","expanded":true,"children":[{"id":"9c92eec8-81eb-4f0e-9c70-8f9370adfaa2","topic":"vim中的内容","expanded":true,"code":{"lang":"c","code":"#include <stdio.h>\nint main(){\n    printf(\"hello world !!!\");\n}","tokens":[[{"text":"#include ","darkColor":"#C699E0"},{"text":"<stdio.h>","darkColor":"#94C977"}],[{"text":"int","darkColor":"#74CBC4"},{"text":" ","darkColor":"#DEDBD2"},{"text":"main","darkColor":"#6EC0DF"},{"text":"(){","darkColor":"#BAB5A8"}],[{"text":"    ","darkColor":"#DEDBD2"},{"text":"printf","darkColor":"#6EC0DF"},{"text":"(","darkColor":"#BAB5A8"},{"text":"\"hello world !!!\"","darkColor":"#94C977"},{"text":");","darkColor":"#BAB5A8"}],[{"text":"}","darkColor":"#BAB5A8"}]]}}],"code":{"lang":"plaintext","code":"parallels@ubuntu-linux-22-04-desktop:~/Desktop/test$ vim test.c\nparallels@ubuntu-linux-22-04-desktop:~/Desktop/test$ ls\ntest.c\nparallels@ubuntu-linux-22-04-desktop:~/Desktop/test$ gcc test.c -o test\nparallels@ubuntu-linux-22-04-desktop:~/Desktop/test$ ls\ntest  test.c\nparallels@ubuntu-linux-22-04-desktop:~/Desktop/test$ ./test\nhello world !!!","tokens":[[{"text":"parallels@ubuntu-linux-22-04-desktop:~/Desktop/test$ vim test.c"}],[{"text":"parallels@ubuntu-linux-22-04-desktop:~/Desktop/test$ ls"}],[{"text":"test.c"}],[{"text":"parallels@ubuntu-linux-22-04-desktop:~/Desktop/test$ gcc test.c -o test"}],[{"text":"parallels@ubuntu-linux-22-04-desktop:~/Desktop/test$ ls"}],[{"text":"test  test.c"}],[{"text":"parallels@ubuntu-linux-22-04-desktop:~/Desktop/test$ ./test"}],[{"text":"hello world !!!"}]]}},{"id":"b9682a95-0d19-4f2a-9ebf-b602d6b252f2","topic":"①：键盘将char逐个送到CPU中\n②：CPU把char送到主存缓冲区中，等待回车\n（程序中断方式：IO->CPU->内存）","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-40c96204937d83.png","width":476.32,"height":340.29},"children":[{"id":"b988ff4d-65fb-4d6b-ad16-d60c3ee757db","topic":"③：shell收到回车后，调用OS内核程序，把test文件从磁盘加载到主存\n④：主存中有了程序，逐条执行代码（#include还需要从磁盘读代码），执行到printf需要输出，就把对应的string放入到CPU中\n⑤：CPU发送到显示上中（不用掌握）","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-00cc7d5a192100.png","width":443.37,"height":317.43}}]}]},{"id":"0a7fd6ba-9fec-47af-86d1-88efc1532135","topic":"指令执行描述","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"07940143-2a94-468c-9988-638bbac468b4","topic":"取指令","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"3bfb3f30-18c3-48d1-81a8-0899525cdf67","topic":"PC->MAR->M->MDR->IR","expanded":true}]},{"id":"f4c39765-9ca6-4c7a-ae88-f1ba7a545af3","topic":"分析指令","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"7d234044-ac12-4735-bd33-75e87cc493b3","topic":"OP(IR)->CU","expanded":true}]},{"id":"e6b77a39-33fe-4d74-8e42-86240505fe90","topic":"执行指令","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"420fe467-6999-4799-ac71-abc63b941a51","topic":"Ad(IR)->MAR->M->MDR->ACC","expanded":true}]}]}]},{"id":"8c38d078-20d0-49fa-a2a6-eb79d66b466a","topic":"计算机性能指标","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-ca59f6498b6110.svg","width":64,"height":64},"children":[{"id":"e3882f1e-49bf-46ad-a7cd-a34a7a1414ef","topic":"机器字长","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"0bf4722c-754f-4c9d-954a-5080f9bd570b","topic":"机器进行一次整数运算时所能处理的最大二进制位数","expanded":true,"style":{"background":"#8EDDF9"}},{"id":"a4a4153b-179e-4571-90f0-8c155d3b5132","topic":"和指令字长、存储字长的区别：","expanded":true,"children":[{"id":"858751ed-f808-4cf2-aa2f-7db4ce5fb43c","topic":"指令字长是设定的一条指令的长度范围","expanded":true},{"id":"287b8462-86e3-4d46-83b6-9ea96e1372e0","topic":"存储字长是指存储器存储数据的最大长度","expanded":true}]}]},{"id":"c3175c7c-4f84-4e20-afff-af67a9eea727","topic":"数据通路带宽","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"d9ec5f37-a9d4-440d-a108-20e21d627cef","topic":"数据总线一次所能并行传送的信息的位数","expanded":true,"style":{"background":"#8EDDF9"}},{"id":"ab1356b4-a6e9-4307-acc1-514b728feffc","topic":"此处的”数据通路宽度“是指“外部数据总线”的宽度，即CPU与其他部件相连的线的根数","expanded":true}]},{"id":"bb95604e-a74c-4630-bf61-1de521643b80","topic":"主存容量","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"c53d19de-5efc-4894-abd2-3a6e0099c260","topic":"主存储器能够存储信息的最大容量，即：（ 字数 x 字长 ）","expanded":true},{"id":"cc4c8c08-fbd4-447c-a9c8-e7cb8c8963b5","topic":"MAR反应存储单元个数","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"f5290c57-085a-4046-928b-1e6cdfdc15f1","topic":"16bit -> 系统有2^16个存储单元","expanded":true,"style":{"background":"#FDD834"}},{"id":"31dcb581-532a-4427-9bad-efa628c2d83e","topic":"和PC长度一致","expanded":true}]},{"id":"a8c867d4-d2ff-490f-801b-959109bcc57a","topic":"MDR反应存储单元字长","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"526c2b78-8b9c-4933-be0d-1bd3cce3ae98","topic":"32bit -> 一个存储单元中有32bit","expanded":true,"style":{"background":"#FDD834"}}]},{"id":"61790565-e8e8-4084-87b6-92ef5b0eee80","topic":"地址有多少个","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"3a66ea5c-8892-4372-9059-fd15dd90c355","topic":"按字节寻址：2M 个","expanded":true,"style":{"background":"#FDD834"}},{"id":"cbde1b61-e110-48aa-9f3d-b5d6b4238757","topic":"按字寻址：64K 个","expanded":true,"style":{"background":"#FDD834"}}]}]},{"id":"41975e82-803e-46cc-bab2-31193b761305","topic":"运算速度","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"187fa6e1-676a-4328-983c-8fb6cc25626d","topic":"吞吐量","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"40aa22be-bab7-422e-8587-17827d96232a","topic":"系统能在单位时间内处理请求的数量","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"07a1a3ab-d9f4-4694-a135-7d6b6fa68e26","topic":"CPU的速度很大程度上受限于主存，故吞吐量主要取决于主存的存取周期","expanded":true,"style":{"background":"#8EDDF9"}}]}]},{"id":"c4ac2fc8-0aea-4df9-962f-28140d46327b","topic":"响应时间","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"302a7fd4-664f-41a0-8d60-00f860c90163","topic":"用户向计算机发送了一个请求，到系统对该请求做出响应并获得所需结果的等待时间","expanded":true,"style":{"background":"#8EDDF9"}}]},{"id":"ce6a8660-68e4-4a5d-adde-903a840f53b2","topic":"CPU时钟周期","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"e1547c50-5891-4186-8439-2905b44dd5e0","topic":"节拍脉冲，主频的倒数","expanded":true,"style":{"background":"#FF9595"}},{"id":"1a1b27cf-313b-4b55-902d-234462f43028","topic":"执行指令的每一个动作至少需要一个时钟周期","expanded":true,"style":{"background":"#FDD834"}}]},{"id":"d192021c-ec1b-4b2a-a6a0-d35a3306565d","topic":"主频","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"4bc0d6c4-a84a-4d27-86e4-cf7de352cb78","topic":"计算：时钟周期数 ➗ 时间","expanded":true,"style":{"background":"#FF9595"}},{"id":"c896b857-a366-4702-a6f3-170e7dcbdb25","topic":"机器内部主时钟的频率，单位为Hz","expanded":true,"style":{"background":"#FF9595"}}]},{"id":"ff450386-35b0-4621-810c-a6d0cfd30bf3","topic":"CPI","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"b69ded99-58a3-4606-9b35-cf7af3c8f78b","topic":"Clock cycle per instruction，每条指令所需的时钟周期数","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"85865e10-aaf4-41da-b0b6-ba153dfe6a70","topic":"一个系统/程序的CPI是平均下来的CPI","expanded":true,"style":{"background":"#8EDDF9"}}]}]},{"id":"73e58188-f0c5-4937-a754-a448d79cd2c2","topic":"CPU执行时间","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"d199264a-ae9e-4fa5-9e6b-0dba0b037feb","topic":"CPU时钟周期数/主频","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"c2b7efa6-5585-4dd4-9d63-cfeb41193491","topic":"(指令条数 x CPI)/主频","expanded":true,"style":{"background":"#FDD834"}}]}]},{"id":"53cd3421-3ca8-4a85-8108-01728e61c0ec","topic":"MIPS","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"6920d399-efa7-4f03-aa55-7fcd903b6d01","topic":"Million instructions per second，每秒执行多少百万条指令","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"f4961990-2ca5-4f0b-ad81-ea23ed54773c","topic":"MIPS 计算公式","expanded":true,"formula":{"tex":"IPS \\times 10^{-6}","displayMode":true,"mathml":"<span class=\"katex\"><math xmlns=\"http://www.w3.org/1998/Math/MathML\" display=\"block\"><semantics><mrow><mi>I</mi><mi>P</mi><mi>S</mi><mo>×</mo><mn>1</mn><msup><mn>0</mn><mrow><mo>−</mo><mn>6</mn></mrow></msup></mrow><annotation encoding=\"application/x-tex\">IPS \\times 10^{-6}</annotation></semantics></math></span>"}}]},{"id":"9e98c8bf-648f-4edd-8b9d-4fb05cd7d98c","topic":"IPS 与主频、CPI 关系","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"44efd3e0-feab-4461-bcea-8ca7581c8688","topic":"图示","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-b4f9442638330a.png","width":468.72,"height":345.44}}],"formula":{"tex":"IPS = I/S = \\frac{I}{S} = \\frac{C}{S} \\div \\frac{C}{I} = \\text{主频} \\div CPI","displayMode":true,"mathml":"<span class=\"katex\"><math xmlns=\"http://www.w3.org/1998/Math/MathML\" display=\"block\"><semantics><mrow><mi>I</mi><mi>P</mi><mi>S</mi><mo>=</mo><mi>I</mi><mi mathvariant=\"normal\">/</mi><mi>S</mi><mo>=</mo><mfrac><mi>I</mi><mi>S</mi></mfrac><mo>=</mo><mfrac><mi>C</mi><mi>S</mi></mfrac><mo>÷</mo><mfrac><mi>C</mi><mi>I</mi></mfrac><mo>=</mo><mtext>主频</mtext><mo>÷</mo><mi>C</mi><mi>P</mi><mi>I</mi></mrow><annotation encoding=\"application/x-tex\">IPS = I/S = \\frac{I}{S} = \\frac{C}{S} \\div \\frac{C}{I} = \\text{主频} \\div CPI</annotation></semantics></math></span>"}}]},{"id":"0d388d02-c1d4-496b-b1e2-8f4f321ff644","topic":"FLOPS","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"2bcb4f97-c5ba-4211-8038-300855379985","topic":"FLoating-point Operation Per Second，每秒执行的浮点运算数","expanded":true,"style":{"background":"#8EDDF9"}},{"id":"d38734c9-06b4-4b1f-a2e3-4f45f8071763","topic":"K/M/G/T/P/E/Z + FLOPS","expanded":true,"children":[{"id":"ec769ffe-3b6b-4ba1-a61e-dbd209d02258","topic":"对应的10的次方数：K - 3. M - 6. G - 9. T - 12. P - 15. E - 18. Z - 21.","expanded":true,"children":[{"id":"424c97f3-7452-47d0-9caf-ef43ed914e53","topic":"KMG, TP, EZ","expanded":true}]}]}]}]},{"id":"e0c3dff4-4175-4f46-9a71-1b4f50c1dd4a","topic":"基准程序","expanded":true,"children":[{"id":"e9a11097-de54-473f-839b-10094b04083a","topic":"跑分程序，存在一定的缺陷","expanded":true}]},{"id":"a1328c16-8762-4439-a003-80f188728600","topic":"考频：中","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"f6e3bb0f-980a-41b1-bff1-d2175d12a5a3","topic":"10-14、17、20-22","expanded":true}]}]},{"id":"79bd48a0-f272-4c4a-9691-b8061abbe927","topic":"END","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-b3f727212b96fb.svg","width":64,"height":64}}]},"relations":[{"id":"bff1c941-8855-45e4-9bab-be63a4bc58d2","from":"60cd8be5-53b9-4e0d-a409-5a01b2aa4124","to":"b2b80235-4622-466f-8a8e-00356f77d0f6","bidirectional":false}],"summaries":[{"id":"64f410a4-ba0a-43c3-92e4-aa88727c1d3c","parentId":"1a98e0b3-cd3a-4bdd-9a91-834daa6068d2","start":0,"end":0,"label":"CPU可以直接访问"},{"id":"b8f3e0bb-ce65-47d9-9217-338d880b1ab1","parentId":"1a98e0b3-cd3a-4bdd-9a91-834daa6068d2","start":1,"end":1,"label":"需要进行调入后才可以被CPU访问"},{"id":"9c6c1884-4a9b-4727-bbf9-91e8b60d2011","parentId":"2e2538ad-5a19-43e8-99e6-664cad03f2f7","start":2,"end":2,"label":"和冯诺依曼没有必然联系，在后续章节学习"},{"id":"91dac72c-845c-4f41-9439-d51ad6265462","parentId":"5148d8b5-b621-45ad-a96e-f9b5cccc07ca","start":0,"end":1,"label":"不属于应用软件"},{"id":"8890b9b8-61d3-46dd-9db7-457514172ab9","parentId":"5d6a5407-b3aa-4622-941b-403383e73c1d","start":0,"end":0,"label":"ci,so,exe"},{"id":"11c6bbac-818f-4cb3-9d29-ef975bc14aa3","parentId":"bb95604e-a74c-4630-bf61-1de521643b80","start":1,"end":2,"label":"2M bit / 256MB大小"}],"boundaries":[{"id":"14a53ed2-61a5-4074-a251-517350845174","parentId":"5577fe42-9588-4762-90f9-6a39141a2f8c","start":0,"end":0,"label":"冯诺依曼"}]}}},{"id":"58712c29-ebdc-447c-8a74-578a470ff629","topic":"第二章 数据的表示和运算","expanded":true,"nestedMap":{"src":"kaoyan/408/computer-organization/co-00-sheet2","expanded":false,"maxHeight":260,"doc":{"format":"brushup-mindmap-v1","id":"co-00-sheet2","title":"第二章 数据的表示和运算","structure":"timeline-h","theme":"auto","root":{"id":"9249af3ad0d88fb5007fca7685","topic":"第二章 数据的表示和运算","expanded":true,"children":[{"id":"db1ec404-7291-4bad-88be-b8642d3320b5","topic":"数制和编码","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-ca9bf0c86fbc08.svg","width":64,"height":64},"children":[{"id":"077c322f-3d8c-42db-aa98-c62974528f22","topic":"进位计数制","expanded":true,"children":[{"id":"04bfee39-e0ad-4880-a568-2e85bc9e89ef","topic":"基数：","expanded":true,"children":[{"id":"47801fa6-c7fc-4ac9-89e2-0e984a4c0577","topic":"N进制的基数为 0 ~ N-1","expanded":true}]}]},{"id":"243b7b6a-400c-4f29-b8ff-7ec55157cc2f","topic":"为何选择二进制","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"23530ff6-e06c-4a58-9662-56ba763384fa","topic":"使用有两个稳定状态的物理器件就可以表示二进制的每一位了","expanded":true},{"id":"fb1faab9-acee-485c-b4f2-e518f5d5a0ef","topic":"逻辑运算方便","expanded":true},{"id":"1f8b3c99-eef3-45f9-83df-849f60469fc2","topic":"逻辑门电路设计方便","expanded":true}]},{"id":"0f4d0f4e-6e93-4eb1-be87-10ecc79bda1f","topic":"二进制、八进制、十六进制、十进制相互转化","expanded":true,"style":{"background":"#FDD834"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-c1c06b6344ca14.png","width":340.04,"height":288.47},"children":[{"id":"6c5d8707-0898-4c76-95c5-042246876cbe","topic":"注意八进制和十六进制要补位","expanded":true,"style":{"background":"#FF9595"}}]},{"id":"d600482b-2cf2-463d-9f60-dc8a4f1d6b6c","topic":"真值、机器数","expanded":true,"children":[{"id":"93d43fa2-d99d-44f6-86d2-66d98a2201d2","topic":"真值：","expanded":true,"children":[{"id":"5085b427-10e5-4789-908b-9034c05ba093","topic":"符合人类习惯的数字","expanded":true}]},{"id":"67af9571-5cf1-4c52-8365-85c5b2d0a2d3","topic":"机器数：","expanded":true,"children":[{"id":"49a9e53e-fba8-4fc4-a567-73c18ede9d76","topic":"数字在机器中代表的意思","expanded":true}]}]},{"id":"acdf09dc-65ce-4af9-a8a1-b5edf7c32e08","topic":"BCD码","expanded":true,"style":{"background":"#D0D0D0"},"children":[{"id":"f8282a74-ed37-4d1d-a2c0-3c16a3a6cdbd","topic":"*","expanded":true,"style":{"background":"#D0D0D0"}},{"id":"c2a472e7-e0f7-4985-99bf-11b5a792ed4d","topic":"8421、2421、余3码","expanded":true,"style":{"background":"#D0D0D0"}}]}]},{"id":"8dff7caa-747f-407e-9587-b6a42cdb71b6","topic":"定点数的表示","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-c2539473d179e5.svg","width":64,"height":64},"children":[{"id":"7b417c44-6c0c-4f8b-bafb-7009f103ea4b","topic":"考频：低","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"6b1d1731-a319-4a18-b332-39f96d68f8a1","topic":"15、18、21、22","expanded":true}]},{"id":"d4225ab4-c7a7-488c-a763-abed04cf8e95","topic":"无符号数","expanded":true,"children":[{"id":"1b49eee4-dc11-4c75-ab95-350134419e42","topic":"unsigned int、 unsigned long","expanded":true,"children":[{"id":"151b5a75-7171-4950-8c0a-f0ee4a1dc1e8","topic":"无符号数没有小数","expanded":true}]},{"id":"ae71cc35-fb6b-4367-8037-b74f4b90eff1","topic":"【没有符号位】，有n个bit，则数的表示范围为：( 0 ~ 2^n - 1 )","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-6df20d9a4d83f6.png","width":287.26,"height":90.68},"children":[{"id":"124843e9-dfa3-4084-b151-ab8d64a6146e","topic":"指针、表示地址","expanded":true}]}]},{"id":"1ffc4d07-f196-45db-b72d-8dae0f664012","topic":"定点数","expanded":true,"children":[{"id":"c3c13b55-9422-4b4d-86dc-a6d7f121f7ef","topic":"小数点位置是固定的","expanded":true,"children":[{"id":"8abb12b1-5390-4a26-92ac-940535f86f76","topic":"即小数点前面和后面的位数是固定的","expanded":true}]},{"id":"91a5f526-27ea-4b68-9bf6-3bcd4970c13d","topic":"定点小数","expanded":true,"children":[{"id":"81fcecd0-8553-4e97-9e7d-5b952ddea31d","topic":"图示","expanded":true,"style":{"background":"#FF9595"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-234c3049bf9ec8.png","width":317.65,"height":104.23},"children":[{"id":"f4b0858e-5839-46fd-99e4-aa174e01be04","topic":"只表示正的、负的小数","expanded":true,"style":{"background":"#8EDE99"}}]}]},{"id":"8db12481-5291-4d90-ac72-2f1d8ccd7074","topic":"定点整数","expanded":true,"children":[{"id":"bc2538de-55c1-47a8-88ac-97005246f0cd","topic":"图示","expanded":true,"style":{"background":"#FF9595"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-c75c99f4530e8d.png","width":320.8,"height":101.36},"children":[{"id":"0cab2fc9-d735-4e73-9db8-0b219a7b18ca","topic":"只表示正的、负的整数","expanded":true,"style":{"background":"#8EDE99"}}]}]}]},{"id":"b4933e87-1aed-4649-9b71-79e1c44371f8","topic":"浮点数 --- 小数点位置是不固定的","expanded":true},{"id":"4979837a-9db0-42ad-9546-1d4ca764a3b3","topic":"有符号数","expanded":true,"children":[{"id":"166c6c92-cd1b-4502-a8e4-282f12d5ee68","topic":"原码","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"c2b045d0-3eff-4078-a57e-163d95872e37","topic":"形式","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"76ec8c3a-c6c5-414b-b7c3-2cccd2f70f95","topic":"第一位为符号位，其余位为数值位，要么表示小数要么表示整数","expanded":true,"style":{"background":"#8EDDF9"}}]},{"id":"8e59a7c7-9d76-4bb3-89ee-0a161f5aec10","topic":"表示范围","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"467be8da-c782-4b12-974f-338ba890a533","topic":"整数","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"eab01ac0-052d-41a3-9d44-077e653631cb","topic":"整数","expanded":true,"children":[{"id":"95a96d04-efea-4f20-afe4-f702a96dd3f6","topic":"存在 +0 和 -0，所以正负数对半分","expanded":true,"style":{"background":"#8EDE99"},"formula":{"tex":"-(2^n - 1) \\le x \\le (2^n - 1)","displayMode":true,"mathml":"<span class=\"katex\"><math xmlns=\"http://www.w3.org/1998/Math/MathML\" display=\"block\"><semantics><mrow><mo>−</mo><mo stretchy=\"false\">(</mo><msup><mn>2</mn><mi>n</mi></msup><mo>−</mo><mn>1</mn><mo stretchy=\"false\">)</mo><mo>≤</mo><mi>x</mi><mo>≤</mo><mo stretchy=\"false\">(</mo><msup><mn>2</mn><mi>n</mi></msup><mo>−</mo><mn>1</mn><mo stretchy=\"false\">)</mo></mrow><annotation encoding=\"application/x-tex\">-(2^n - 1) \\le x \\le (2^n - 1)</annotation></semantics></math></span>"}}]}]},{"id":"ba3a41e8-f6f0-4453-a18e-7b9cd7bb7fb9","topic":"小数","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"4cd4d327-dee8-46a0-b44c-50743ac6a67c","topic":"纯小数","expanded":true,"children":[{"id":"97c956f7-1451-43f4-98bd-c36e0090159c","topic":"小数的表示是离散的，正负对半分","expanded":true,"style":{"background":"#8EDE99"},"formula":{"tex":"-(1 - 2^{-n}) \\le x \\le (1 - 2^{-n})","displayMode":true,"mathml":"<span class=\"katex\"><math xmlns=\"http://www.w3.org/1998/Math/MathML\" display=\"block\"><semantics><mrow><mo>−</mo><mo stretchy=\"false\">(</mo><mn>1</mn><mo>−</mo><msup><mn>2</mn><mrow><mo>−</mo><mi>n</mi></mrow></msup><mo stretchy=\"false\">)</mo><mo>≤</mo><mi>x</mi><mo>≤</mo><mo stretchy=\"false\">(</mo><mn>1</mn><mo>−</mo><msup><mn>2</mn><mrow><mo>−</mo><mi>n</mi></mrow></msup><mo stretchy=\"false\">)</mo></mrow><annotation encoding=\"application/x-tex\">-(1 - 2^{-n}) \\le x \\le (1 - 2^{-n})</annotation></semantics></math></span>"}}]}]}]},{"id":"9ce08258-41fa-4426-bc73-b37cc9cb0a44","topic":"作用","expanded":true,"children":[{"id":"fc48a027-08ac-4d12-b10b-df4ee1830fdf","topic":"最容易理解的表示方式","expanded":true},{"id":"0f1af4db-94d1-4a73-a0cc-f6b787e9d923","topic":"原码相加运算不成立哦","expanded":true,"style":{"background":"#FFABD5"}}]},{"id":"8311cf70-9788-4250-b402-7baac43b05f3","topic":"举例：","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"802ea2cc-b8b6-4913-a57e-06afd4006535","topic":"整数","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"9c24b0a9-e190-457f-a1d7-f5700b86c8db","topic":"x1  = +1110","expanded":true,"children":[{"id":"888ace6b-9c8c-4c72-8d0d-5b2621504a7e","topic":"[x1]原 = 0, 0001110","expanded":true}]},{"id":"3de04dc6-797c-4f17-81b7-69cbddb9a5a7","topic":"x2 = -1110","expanded":true,"children":[{"id":"a463ca66-0e77-4b2c-808c-7124ed665fb9","topic":"[x2]原 = 1, 0001110","expanded":true}]}]},{"id":"8df42343-e66e-4427-b54c-899ad564b878","topic":"小数","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"bc7de525-b648-4c64-8c18-48ad4edc31e1","topic":"x1  = +0.1101","expanded":true,"children":[{"id":"f0e57a0a-09e7-4f2c-b302-d03efd462f23","topic":"[x1]原 = 0.1101000","expanded":true}]},{"id":"b4bb0a08-fcf5-48ad-b92a-937d73f0d999","topic":"x2 = -0.1101","expanded":true,"children":[{"id":"51acebfb-3f41-4bef-b348-594cc8ec1aba","topic":"[x2]原 = 1.1101000","expanded":true}]}]}]}]},{"id":"42b27e16-33fc-46aa-b6f1-4604b7f33ce0","topic":"反码","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"9a265bfb-54a0-4d89-937b-536839168798","topic":"形式","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"fab7cd7f-b25a-44cb-99ae-b821ab5f89e0","topic":"从原码转化而来，如果原码为正，反码不变。如果原码为负，则反码的数值位是原码的取反","expanded":true,"style":{"background":"#8EDDF9"}}]},{"id":"64e2818a-b785-4508-8440-3491b09d8c9a","topic":"表示范围","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"46441b0e-8c23-4c70-a0fa-87e42c8423bc","topic":"和原码完全一致","expanded":true,"style":{"background":"#8EDE99"}}]},{"id":"12161ba2-ef08-4dc6-8f36-253698195309","topic":"作用","expanded":true,"children":[{"id":"dde0ed5e-23cc-4d03-bbdb-cf54c8806f95","topic":"作为”原码 -> 补码“的中间态","expanded":true},{"id":"e767b469-a6ca-4b61-9ad1-d10f4cd45433","topic":"若是想通过反码得出十进制，则先转为原码再转为十进制","expanded":true}]},{"id":"722990ff-f1ab-4dca-a2a4-bcefea223dae","topic":"举例：","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"bcaa4b97-551e-43ab-91cc-b9678cd59f1a","topic":"整数","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"8af41d0a-0585-4f0a-a7a7-83e67c116f08","topic":"x1  = +1110","expanded":true,"children":[{"id":"5cf49ad1-ee74-4342-ab35-571ee3a71852","topic":"[x1]反 = 0, 0001110","expanded":true,"children":[{"id":"c15d6c25-6fc5-431c-bb4a-3237d43eba71","topic":"[x1]原 = 0, 0001110","expanded":true,"style":{"background":"#ADADAD"}}]}]},{"id":"772632ac-e55c-4e5e-8221-db020b39fa64","topic":"x2 = -1110","expanded":true,"children":[{"id":"0a17a8a1-bbac-459b-9f4b-419dade6403d","topic":"[x2]反 = 1, 1110001","expanded":true,"style":{"background":"#7986CB"},"children":[{"id":"b3ec5d87-a74b-4cce-93ed-5121121f33c5","topic":"[x2]原 = 1, 0001110","expanded":true,"style":{"background":"#ADADAD"}}]}]}]},{"id":"bbbfdcfe-1209-428f-9a3d-e538c1039456","topic":"小数","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"b211cda0-5014-44d3-b4c7-e2a094be1e78","topic":"x1  = +0.1101","expanded":true,"children":[{"id":"99d89bfd-cd56-4c54-b4f3-74748ca43e68","topic":"[x1]反 = 0.1101000","expanded":true,"children":[{"id":"78c07efa-615a-4ac0-900c-d71f4722fc68","topic":"[x1]原 = 0.1101000","expanded":true,"style":{"background":"#ADADAD"}}]}]},{"id":"eeb71bc8-726d-419a-be91-1b60bf3e1dfd","topic":"x2 = -0.1101","expanded":true,"children":[{"id":"213757f3-9d0e-4954-bd17-a378accc5bf9","topic":"[x2]反 = 1.0010111","expanded":true,"style":{"background":"#7986CB"},"children":[{"id":"32d1ce5a-635a-4a6a-9447-6b23b8092921","topic":"[x2]原 = 1.1101000","expanded":true,"style":{"background":"#ADADAD"}}]}]}]}]}]},{"id":"bf82449b-0a56-48d0-905e-c4a581a63e8d","topic":"补码","expanded":true,"icons":["star:red"],"style":{"background":"#8EDDF9"},"children":[{"id":"8fac4e5b-53c0-4da2-b284-ac48e209f507","topic":"形式","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"0ab07d42-610a-47ae-b480-65fff2b7b666","topic":"正数的补码：不变\n负数的补码：反码 + 1","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"0143ae4b-96ce-472e-8f89-340ad38b09a5","topic":"负数：原码转为补码的技巧是【尾数】取反再+1","expanded":true,"style":{"background":"#8EDDF9"}}]},{"id":"0bcc7882-d580-48cd-beaf-47ece1af742b","topic":"注意：","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"8e4f6f25-806a-4457-a614-ff5f42708556","topic":"补码中只存在一个 0","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"54a4504e-986e-4d25-90c8-a72e6d5d4bcd","topic":"+0 的补码： 0 0000 000","expanded":true,"children":[{"id":"dc3ef09f-51c1-4a6a-83de-f597e769ba1d","topic":"-0 的补码：【 1 0000 000按位取反再+1 】 \n-> 【0 0000 000】和+0 一致了","expanded":true}]},{"id":"ab1a3251-e2d7-403f-85aa-cc5c3473dfda","topic":"1 0000 000是无法通过原码变化获得的，故规定在整数中表示 -2^n，在小数中表示 -1","expanded":true,"style":{"background":"#FF9595"}}]},{"id":"abda5178-64cd-4b2d-a566-1e2fe453f48b","topic":"原码 -> 补码：（负）按位取反 + 1\n补码 -> 原码：（负）按位取反 + 1","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"64fed95e-2212-4cbd-a235-b3e5d37d4bd9","topic":"为什么：","expanded":true,"hyperlink":"https://blog.csdn.net/m0_37433111/article/details/107938663?utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromMachineLearnPai2%7Edefault-1.essearch_pc_relevant&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromMachineLearnPai2%7Edefault-1.essearch_pc_relevant"},{"id":"89f64d11-a650-428e-95cf-c7ea91362011","topic":"按位取反 + 1 的快速做法：从右往左，遇到第一个 1 右边的所有bit不动，把这个1左边的全部数值位bit取反","expanded":true,"style":{"background":"#FF9595"}}]}]}]},{"id":"54d6dcaf-195e-4e7e-b77c-5141f90fd843","topic":"表示范围","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"7217063c-b220-4b40-ae63-57bc05f7f618","topic":"整数","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"ac2b7119-d2af-41bc-b215-2eaa9573217a","topic":"没有 -0 了，负数可以到 -2^n 了","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"35358731-a2cf-481c-8878-89649f89a961","topic":"原码范围：","expanded":true,"children":[{"id":"ff6d77d9-c12c-48d8-a0ed-ca7e0ba841ef","topic":"存在 +0 和 -0，所以正负数对半分","expanded":true,"style":{"background":"#999999"},"formula":{"tex":"-(2^n - 1) \\le x \\le (2^n - 1)","displayMode":true,"mathml":"<span class=\"katex\"><math xmlns=\"http://www.w3.org/1998/Math/MathML\" display=\"block\"><semantics><mrow><mo>−</mo><mo stretchy=\"false\">(</mo><msup><mn>2</mn><mi>n</mi></msup><mo>−</mo><mn>1</mn><mo stretchy=\"false\">)</mo><mo>≤</mo><mi>x</mi><mo>≤</mo><mo stretchy=\"false\">(</mo><msup><mn>2</mn><mi>n</mi></msup><mo>−</mo><mn>1</mn><mo stretchy=\"false\">)</mo></mrow><annotation encoding=\"application/x-tex\">-(2^n - 1) \\le x \\le (2^n - 1)</annotation></semantics></math></span>"}}]}],"formula":{"tex":"-2^n \\le x \\le 2^n - 1","displayMode":true,"mathml":"<span class=\"katex\"><math xmlns=\"http://www.w3.org/1998/Math/MathML\" display=\"block\"><semantics><mrow><mo>−</mo><msup><mn>2</mn><mi>n</mi></msup><mo>≤</mo><mi>x</mi><mo>≤</mo><msup><mn>2</mn><mi>n</mi></msup><mo>−</mo><mn>1</mn></mrow><annotation encoding=\"application/x-tex\">-2^n \\le x \\le 2^n - 1</annotation></semantics></math></span>"}}]},{"id":"a90d9f8f-b74d-4882-bf79-9a507b002f87","topic":"小数","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"7a46e0e4-0172-426a-a796-d1039fe1e8e8","topic":"没有 -0 了，负数可以到 -1 了","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"17fbc1a7-ab65-4f45-ae02-1bbd0153f0ed","topic":"原码范围：","expanded":true,"children":[{"id":"e3055b90-c07f-4a45-ab6a-2eba3f933e6e","topic":"小数的表示是离散的，正负对半分","expanded":true,"style":{"background":"#999999"},"formula":{"tex":"-(1 - 2^{-n}) \\le x \\le (1 - 2^{-n})","displayMode":true,"mathml":"<span class=\"katex\"><math xmlns=\"http://www.w3.org/1998/Math/MathML\" display=\"block\"><semantics><mrow><mo>−</mo><mo stretchy=\"false\">(</mo><mn>1</mn><mo>−</mo><msup><mn>2</mn><mrow><mo>−</mo><mi>n</mi></mrow></msup><mo stretchy=\"false\">)</mo><mo>≤</mo><mi>x</mi><mo>≤</mo><mo stretchy=\"false\">(</mo><mn>1</mn><mo>−</mo><msup><mn>2</mn><mrow><mo>−</mo><mi>n</mi></mrow></msup><mo stretchy=\"false\">)</mo></mrow><annotation encoding=\"application/x-tex\">-(1 - 2^{-n}) \\le x \\le (1 - 2^{-n})</annotation></semantics></math></span>"}}]}],"formula":{"tex":"-1 \\le x \\le 1 - 2^{-n}","displayMode":true,"mathml":"<span class=\"katex\"><math xmlns=\"http://www.w3.org/1998/Math/MathML\" display=\"block\"><semantics><mrow><mo>−</mo><mn>1</mn><mo>≤</mo><mi>x</mi><mo>≤</mo><mn>1</mn><mo>−</mo><msup><mn>2</mn><mrow><mo>−</mo><mi>n</mi></mrow></msup></mrow><annotation encoding=\"application/x-tex\">-1 \\le x \\le 1 - 2^{-n}</annotation></semantics></math></span>"}}]}]},{"id":"8b37042f-8fbf-408f-8bc8-aedff4feddf1","topic":"作用","expanded":true,"icons":["star:red"],"style":{"background":"#FDD834"},"children":[{"id":"9d1c7a0f-62b3-4282-81ae-b32a33b05852","topic":"补码相加减的运算是成立的","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"d7604b0c-9747-4844-8510-9c32cebd4ff2","topic":"所以在现代语言(例如C++)中都是采用的补码来表示数","expanded":true,"style":{"background":"#FDD834"}}]},{"id":"d5089b0e-6fff-4150-aea4-0b1a4cf87091","topic":"一切加减法都可以写作两个补码数相加","expanded":true}]},{"id":"b9edf250-0dbf-4024-8ae3-692b1056120c","topic":"举例：","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"ca14ab91-ae24-4d51-86b8-24021a3b05a6","topic":"整数","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"f21bf2f6-8b17-4f14-be64-ceea99b2763e","topic":"x1  = +1110","expanded":true,"children":[{"id":"c6393a7b-5d91-48b9-8aa6-38514c50c251","topic":"[x1]补 = 0, 0001110","expanded":true,"children":[{"id":"e6285f51-8b61-4fa6-8d96-9544e943b134","topic":"[x1]原 = 0, 0001110","expanded":true,"style":{"background":"#ADADAD"}}]}]},{"id":"100c3ed5-cb0d-4ecd-858f-978ec6238567","topic":"x2 = -1110","expanded":true,"children":[{"id":"44072b54-4e5f-4eed-b361-c93d239fcadb","topic":"[x2]补 = 1, 1110010","expanded":true,"style":{"background":"#7986CB"},"children":[{"id":"1061a113-8500-46d0-8a20-02ba89b0740a","topic":"[x2]原 = 1, 0001110","expanded":true,"style":{"background":"#ADADAD"}}]}]}]},{"id":"219c8149-663c-429f-8604-e6a6a6aa16cd","topic":"小数","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"6c4f27ad-c8a0-4d29-8676-5787cbd80080","topic":"x1  = +0.1101","expanded":true,"children":[{"id":"8d5c46b3-3806-42a7-8a16-fb999316c921","topic":"[x1]补 = 0.1101000","expanded":true,"children":[{"id":"9606b619-0fb8-4b50-89d7-23dd7369db1a","topic":"[x1]原 = 0.1101000","expanded":true,"style":{"background":"#ADADAD"}}]}]},{"id":"d9f24fd1-f467-49d3-9ee4-d21445bcd9f9","topic":"x2 = -0.1101","expanded":true,"children":[{"id":"835623aa-95e2-415e-9ef1-c6b1a5710934","topic":"[x2]补 = 1.0011000","expanded":true,"style":{"background":"#7986CB"},"children":[{"id":"1009e310-6a5b-4bdd-8df6-97eda1eb6590","topic":"[x2]原 = 1.1101000","expanded":true,"style":{"background":"#ADADAD"}}]}]}]}]}]},{"id":"d023f59c-7512-4c70-9c83-bd40a1f38abd","topic":"移码","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"1119038d-3e26-434f-94e0-462e8d72bba3","topic":"形式","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"51b4e752-5e39-4f69-9660-c4c9179e7033","topic":"移码 = 补码首位取反","expanded":true,"style":{"background":"#8EDDF9"}}]},{"id":"1029cc62-35d9-4f2e-b06a-5944a975fff1","topic":"表示范围","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"7c06d5a6-3fd2-4813-9042-275c18069b58","topic":"和补码一致","expanded":true,"style":{"background":"#8EDE99"}}]},{"id":"f38d174b-d421-4d83-8e85-dd58af40ca86","topic":"作用","expanded":true,"icons":["star:red"],"style":{"background":"#FDD834"},"children":[{"id":"d3353c93-abd0-4833-8956-2e62e3b274c0","topic":"使用移码计算机可以直接通过【按位比较的方式】来比较两个数的大小","expanded":true,"style":{"background":"#FDD834"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-9803e7b2b8d1ae.png","width":448.03,"height":286.66}}]}]}]}]},{"id":"a24ff2d3-5303-4a9e-9b81-935b2266bf30","topic":"数值表示和差错检测","expanded":true,"style":{"background":"#999999"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-1a9748e57e5a29.svg","width":64,"height":64},"children":[{"id":"b0e477f0-c39d-4107-8686-8ec37b35426d","topic":"校验码","expanded":true,"style":{"background":"#D0D0D0"},"children":[{"id":"966cb859-63a0-4ab7-821a-1395eedf4e76","topic":"不考","expanded":true,"style":{"background":"#D0D0D0"}},{"id":"fdf6ceb1-5646-4316-a03c-18c54f5f875a","topic":"奇偶校验、CRC循环冗余校验、海明码","expanded":true,"style":{"background":"#D0D0D0"}}]},{"id":"b5e49792-50a2-4a53-993e-80c10b380678","topic":"字符与字符串","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"626d0788-e2cc-4fd2-8656-72eed456b1a5","topic":"英文字符","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"9d61c19e-c23a-4f97-83b9-079adaecc72a","topic":"ASCII码","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"0d74fe67-6bc8-40c4-ae97-d475bb183257","topic":"0 ~ 127，只占7bit，通常会补充一个 1bit 凑齐1B","expanded":true,"style":{"background":"#8EDDF9"}},{"id":"6f766ac9-bb1f-4971-a691-dbf48dba9658","topic":"0 ~ 31为控制、通信字符","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"e068c615-4067-4832-ad7b-68d26079aaa5","topic":"例如：6 - ACK、22 - SYN","expanded":true}]},{"id":"aa3b1bc0-229c-4af3-bd19-8377a93097d0","topic":"数字 0 -> 48","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"2bc8dacd-f11f-44c7-a444-6a7895d11e85","topic":"字母 A -> 65","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"64b38b5f-1c8b-4db6-aae3-696629db9b21","topic":"字母 a -> 97","expanded":true,"style":{"background":"#8EDE99"}}]}]}]}]},{"id":"0b4b3992-163d-4a4e-8973-581731812f30","topic":"汉字字符","expanded":true,"style":{"background":"#999999"},"children":[{"id":"4cdf6520-2ae2-451e-8787-50f77e58b779","topic":"GB2312-(19)80","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"687e16c3-6d9f-488a-affd-da30f153acb2","topic":"汉字 + 各种符号一共7445个","expanded":true},{"id":"64b4607e-4e23-474a-8931-3c9ee9ff88c2","topic":"一共16bit来存储，分为区号(8bit) + 位号(8bit)","expanded":true,"style":{"background":"#8EDDF9"}},{"id":"79b21734-d1c5-49b2-aaf3-c61955cc0a83","topic":"图示","expanded":true,"style":{"background":"#8EDDF9"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-acd8b0e2890cf0.png","width":294.73,"height":291.2},"children":[{"id":"c1711b0a-99b6-48bd-8ce1-8be9bb8d9fcd","topic":"区位码 = 区号 + 位号","expanded":true,"style":{"background":"#8EDDF9"}},{"id":"5239a455-22f5-425a-8a41-1c6ae12bb579","topic":"国标码 = 区位码 + 2020H","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"969ecfc9-9318-4e10-b7b4-81ca6e0ada83","topic":"因为ASCII码的20H以前的都是通信码，以此来区别，国标码是用于传输","expanded":true}]},{"id":"87106d3a-7bd0-4c50-87ba-d61805de5543","topic":"汉字内码 = 国标码 + 8080H","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"cdd16ea9-7496-45ab-b911-082c238c8bac","topic":"因为ASCII码127，故80H可以把汉字内码和ASCII码区别开来","expanded":true}]}]},{"id":"208241cd-e015-49fa-ac29-4c3f5af2eb4b","topic":"输入一个汉字","expanded":true,"children":[{"id":"bec7ecbb-2da0-40e6-858c-ab29549763f2","topic":"输入拼音，输入法定位到该汉字的国标码","expanded":true},{"id":"a78b0e7a-e844-437f-8022-d08cf93f5405","topic":"系统将国标码转为汉字内码","expanded":true}]},{"id":"bc29dfe2-be7f-4f1f-9bda-a64e57353e40","topic":"输出一个汉字","expanded":true,"children":[{"id":"b0eb9fa2-fafa-4b12-aa26-6def39f4cd11","topic":"输出汉字字形码例如：一个16 x 16的黑白点阵","expanded":true}]}]},{"id":"6e33057c-3dcd-4e04-863d-174c1973e382","topic":"GB18030收录了27484个汉字","expanded":true},{"id":"15ae7def-26e4-45cf-97fa-cfa8a1e0cdb2","topic":"*","expanded":true,"icons":["emoji:💬"],"style":{"borderStyle":"dashed","borderColor":"#F59E0B"}}]},{"id":"c33db92d-be98-4898-bcda-2a6e0b1acea5","topic":"字符串的储存","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"05018ba4-d95b-43ee-bf3d-2dd12075ac26","topic":"大端模式","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"713d8284-4285-4df0-98e1-96df89fa863f","topic":"最高有效字节放在低地址部分","expanded":true,"style":{"background":"#FF9595"}},{"id":"4c1f51ca-1d28-4df7-9bb4-bf4508b79c2f","topic":"符合人类阅读习惯","expanded":true,"style":{"background":"#FF9595"}}]},{"id":"d47936d7-73a8-4bbb-b3d8-080fb91e6c9a","topic":"小端模式","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"11859731-b758-4f66-a346-ea4bdf6c49cf","topic":"最高有效字节放在高地址部分","expanded":true,"style":{"background":"#FF9595"}},{"id":"77b800a3-0673-4e59-92ca-c133c6bc5560","topic":"符合机器取值顺序（先取低有效位再取高有效位）","expanded":true,"style":{"background":"#FF9595"}}]},{"id":"018a6468-ac4d-4d26-b976-9f1248e232f8","topic":"记忆口诀：","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"a08cff00-2072-4771-8955-61cfab4b4607","topic":"大人小机","expanded":true,"style":{"background":"#FDD834"}}]},{"id":"6a22e119-aa90-406d-9f8a-75bc3edf0322","topic":"Intel唯一在追求小端，【与OS无关】，与硬件制造厂商的选择有关","expanded":true,"style":{"background":"#FFABD5"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-81036c16173d6e.png","width":433,"height":80}}]}]},{"id":"8fa43697-9ef0-47fe-92f6-f97779cc2450","topic":"被删除","expanded":true,"icons":["emoji:💬"],"style":{"borderStyle":"dashed","borderColor":"#F59E0B"}}]},{"id":"8fb0bd7c-9757-4f4b-aaf7-5ba039d02579","topic":"运算电路和方法","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-af719faaedece9.svg","width":64,"height":64},"children":[{"id":"4216cb54-7436-4b10-8fb6-632ac88a1b33","topic":"考频：低","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"fe5eb8f1-ebc1-4feb-b683-e78c3c5a50e7","topic":"18（标志位）、20大（ALU）","expanded":true}]},{"id":"027dc743-a753-48a8-8be5-3f93fcf39db5","topic":"（补充）门电路和摩根定律","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"aee430ff-9485-4959-a185-c60ba23a13f0","topic":"图示","expanded":true,"style":{"background":"#8EDDF9"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-ffb606858cef5c.png","width":374.13,"height":246.08},"children":[{"id":"07af24d1-725a-4a25-aeab-146d0a0a8bab","topic":"图示","expanded":true,"style":{"background":"#8EDDF9"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-ddc324aa1c3a39.png","width":235.2,"height":245.71}}]}]},{"id":"5cf08fa4-256b-4b93-aef4-51fb31c418d0","topic":"一位全加器","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"2e782d27-6869-4925-9b02-bac71b73a769","topic":"图示","expanded":true,"style":{"background":"#8EDDF9"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-e4395d4a4bb0a3.png","width":536.23,"height":269.28},"children":[{"id":"aab89d09-d5c8-4416-bd02-5dd23c05209d","topic":"逻辑符号（简化）","expanded":true,"style":{"background":"#8EDDF9"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-7fcb35c037fd78.png","width":176.37,"height":122.98},"children":[{"id":"cb90e52f-820e-47b3-bb18-b73f58bc44dd","topic":"结构","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"7fa4fbae-e4fd-441a-a914-8d47ced7f22c","topic":"三个输入","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"cc8b0fcb-1a1f-4f7d-bde9-0a337f5488d7","topic":"Ai","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"d2706ef3-b84d-4486-ba4c-fa3c90e69390","topic":"第一个加数","expanded":true,"style":{"background":"#8EDE99"}}]},{"id":"b5b2c4b6-7a19-423f-9609-2b4a976931b8","topic":"Bi","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"bd354420-37b7-4935-b5f6-cf659cb3fec9","topic":"第二个加数","expanded":true,"style":{"background":"#8EDE99"}}]},{"id":"92f77f96-1383-4299-be01-0f3f2ef04a40","topic":"C(i-1)","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"4933baad-7baf-4610-bfcb-36037c11c929","topic":"上一次运算后传入的进位数","expanded":true,"style":{"background":"#8EDE99"}}]}]},{"id":"f6117f9b-d3fa-45c0-b26d-16bba3c3e655","topic":"两个输出","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"351bf8e9-d92d-4578-a720-5a16a99de70f","topic":"Ci","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"5de3b3a2-e0ca-40dd-9abb-8eadf77cb7ed","topic":"本次运算后的进位数","expanded":true,"style":{"background":"#8EDE99"}}]},{"id":"e1a38931-fb43-43a1-9d4f-6528559c73e0","topic":"Si","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"9128417f-42d1-411f-b6e6-459502e1a766","topic":"本次运算的结果","expanded":true,"style":{"background":"#8EDE99"}}]}]},{"id":"2099030a-7a76-4355-81b5-fb321e855af4","topic":"计算公式","expanded":true,"style":{"background":"#8EDE99"},"formula":{"tex":"\\begin{aligned} S_i &= A_i \\oplus B_i \\oplus C_{i-1} \\\\ C_i &= A_i B_i + (A_i \\oplus B_i) C_{i-1} \\end{aligned}","displayMode":true,"mathml":"<span class=\"katex\"><math xmlns=\"http://www.w3.org/1998/Math/MathML\" display=\"block\"><semantics><mtable rowspacing=\"0.25em\" columnalign=\"right left\" columnspacing=\"0em\"><mtr><mtd><mstyle scriptlevel=\"0\" displaystyle=\"true\"><msub><mi>S</mi><mi>i</mi></msub></mstyle></mtd><mtd><mstyle scriptlevel=\"0\" displaystyle=\"true\"><mrow><mrow></mrow><mo>=</mo><msub><mi>A</mi><mi>i</mi></msub><mo>⊕</mo><msub><mi>B</mi><mi>i</mi></msub><mo>⊕</mo><msub><mi>C</mi><mrow><mi>i</mi><mo>−</mo><mn>1</mn></mrow></msub></mrow></mstyle></mtd></mtr><mtr><mtd><mstyle scriptlevel=\"0\" displaystyle=\"true\"><msub><mi>C</mi><mi>i</mi></msub></mstyle></mtd><mtd><mstyle scriptlevel=\"0\" displaystyle=\"true\"><mrow><mrow></mrow><mo>=</mo><msub><mi>A</mi><mi>i</mi></msub><msub><mi>B</mi><mi>i</mi></msub><mo>+</mo><mo stretchy=\"false\">(</mo><msub><mi>A</mi><mi>i</mi></msub><mo>⊕</mo><msub><mi>B</mi><mi>i</mi></msub><mo stretchy=\"false\">)</mo><msub><mi>C</mi><mrow><mi>i</mi><mo>−</mo><mn>1</mn></mrow></msub></mrow></mstyle></mtd></mtr></mtable><annotation encoding=\"application/x-tex\">\\begin{aligned} S_i &amp;= A_i \\oplus B_i \\oplus C_{i-1} \\\\ C_i &amp;= A_i B_i + (A_i \\oplus B_i) C_{i-1} \\end{aligned}</annotation></semantics></math></span>"}}]}]}]}]},{"id":"408ed437-c0da-4a5d-a9ed-84db1f125d5a","topic":"串行加法器","expanded":true,"style":{"background":"#D0D0D0"},"children":[{"id":"3954c627-c356-4b62-aab3-994a5a068b8e","topic":"串行加法器：循环使用一位全加器","expanded":true,"style":{"background":"#D0D0D0"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-2684d7510423ad.png","width":293.79,"height":197.36},"children":[{"id":"f3ef3dc5-6d49-4dda-b1b2-46b6dedd9add","topic":"如果操作数长n位，加法就要分n次进行，每次产生一位和，并且串行逐位地送回寄存器。","expanded":true},{"id":"b168b064-4d18-4f7d-ac02-d66ca2b2ef00","topic":"问题：每一位的运算必须基于上一次的运算才能进行，非常浪费时间","expanded":true,"style":{"background":"#8EDE99"}}]}]},{"id":"baf07bce-86d7-4d88-984b-645d104c545b","topic":"串行进位加法器","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"e60d1bb3-dbc7-41ff-9033-55509898f6c7","topic":"把多个全加器串在一起，和串行加法器问题一致，速度一样的慢","expanded":true,"style":{"background":"#8EDDF9"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-6da80d5fa49e8a.png","width":283.23,"height":108.13},"children":[{"id":"7251d02c-8f0a-4197-a208-65cb5cf1ef08","topic":"串行进位的并行加法器：把n个全加器串接起来，就可进行两个n位数的相加。","expanded":true},{"id":"3100a901-3e9b-46bd-9df0-83de33f5f8c6","topic":"串行进位又称为行波进位，每一级进位直接依赖于前一级的进位，即进位信号是【逐级形成】。","expanded":true}]}]},{"id":"068c3e6f-52ee-4e1b-8f80-8a5db467b865","topic":"并行进位加法器","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"76e824dc-7012-4838-bb62-f04928f9cefa","topic":"理论依据","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"271936c8-7c31-4f5b-aed2-0f65d946cf32","topic":"相互间的进位没有依赖关系，只要同时到达，可以同时生成C1~C3","expanded":true,"style":{"background":"#8EDDF9"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-33186cff6f5fea.png","width":451.04,"height":105.28},"children":[{"id":"a9ec2f34-79ef-4a9c-9c1d-2d0b5b4586cb","topic":"先行进位、超前进位","expanded":true}]}]},{"id":"d74768f5-df90-4bde-a459-c90360e34b79","topic":"四位CLA部件/CLA电路","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"69b7e302-1603-4832-9dd8-5ca6404b2224","topic":"图示","expanded":true,"style":{"background":"#8EDE99"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-d430053aa7ce5e.png","width":452.56,"height":207.14}}]},{"id":"af5c2996-a48e-4e21-b619-042d7d2e00af","topic":"四位全先行进位加法器","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"7ca82f9c-0e75-4bc4-b6c3-d5d454fcb2cb","topic":"图示","expanded":true,"style":{"background":"#FF9595"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-d865bc6dcedf9c.png","width":462.47,"height":165.64},"children":[{"id":"a2c80581-902b-4e32-957c-3205153c7838","topic":"简化","expanded":true,"children":[{"id":"d3fadb99-cfd8-485c-86c2-4db90cd7363d","topic":"把几(4)个加法器串在一起，这样可以并发的计算4bit的数据","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-7189b29a588934.png","width":203.52,"height":207.99}}]}]}]}]},{"id":"346cd84a-ffe9-4b77-8d7d-34e40c6cd9ff","topic":"多级并行进位加法器","expanded":true,"style":{"background":"#EEEEEE"},"children":[{"id":"195aa876-1797-4cb5-9961-c3f54e0a47ca","topic":"图示","expanded":true,"style":{"background":"#EEEEEE"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-2d9d341115ba75.png","width":541.91,"height":366.18}}]},{"id":"662403d9-90a7-4ebc-af74-988b79f32a4c","topic":"带标记加法器","expanded":true,"children":[{"id":"98c4e5dc-e33a-492a-8821-93739af34333","topic":"标志位的生成","expanded":true,"style":{"background":"#FFABD5"},"children":[{"id":"15e37adb-9d68-4a96-ae53-3897eaa9ad78","topic":"PSW用来存放两类信息：","expanded":true,"style":{"background":"#FFABD5"},"children":[{"id":"a2785716-d37c-4974-8abc-8088829a9ab6","topic":"一类是体现当前指令执行结果的各种状态信息，称为状态标志，如有无借位进位（CF位）、有无溢出（OF位）、结果正负（SF位）、结果是否为零（ZF位）、奇偶标志位（PF位）等；","expanded":true,"children":[{"id":"f55a38ee-45bc-43e4-8ef2-943280e5660a","topic":"另一类是存放控制信息，称为控制状态，如允许中断(IF位)，跟踪标志（TF位），方向标志(DF)等。有些机器中将PSW称为标志寄存器FR（Flag Register）。","expanded":true}]}]}]},{"id":"b98ec153-279d-4845-b162-ca3918c68156","topic":"图示","expanded":true,"style":{"background":"#8EDE99"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-79c03f8ef8e680.png","width":253.3,"height":247.87},"children":[{"id":"b3a75704-6a32-4ed3-aa28-f85b3c843ae3","topic":"ZF：","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"5721ad00-860b-40b5-a07c-e360f8548e72","topic":"F输出全为0，ZF = 1","expanded":true,"style":{"background":"#FF9595"},"formula":{"tex":"ZF = \\overline{F_n + \\cdots + F_2 + F_1}","displayMode":true,"mathml":"<span class=\"katex\"><math xmlns=\"http://www.w3.org/1998/Math/MathML\" display=\"block\"><semantics><mrow><mi>Z</mi><mi>F</mi><mo>=</mo><mover accent=\"true\"><mrow><msub><mi>F</mi><mi>n</mi></msub><mo>+</mo><mo>⋯</mo><mo>+</mo><msub><mi>F</mi><mn>2</mn></msub><mo>+</mo><msub><mi>F</mi><mn>1</mn></msub></mrow><mo stretchy=\"true\">‾</mo></mover></mrow><annotation encoding=\"application/x-tex\">ZF = \\overline{F_n + \\cdots + F_2 + F_1}</annotation></semantics></math></span>"}}]},{"id":"ffffa3b4-28d0-4f78-a8a1-1370e1fc25d4","topic":"OF：","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"392bf522-787c-4456-9001-f6b769a62e03","topic":"溢出位，是给【有符号数】用的，有符号数溢出则OF = 1，不溢出 OF = 0","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"a804bfc0-aff1-4e06-99a3-af4dbc07b7ba","topic":"最高位进位 ⊕ 次高位进位","expanded":true,"style":{"background":"#8EDDF9"}},{"id":"70989e44-2fb0-4dc7-81a6-88dfb37a74aa","topic":"符号位发生了改变就说明溢出","expanded":true}],"formula":{"tex":"OF = C_n \\oplus C_{n-1}","displayMode":true,"mathml":"<span class=\"katex\"><math xmlns=\"http://www.w3.org/1998/Math/MathML\" display=\"block\"><semantics><mrow><mi>O</mi><mi>F</mi><mo>=</mo><msub><mi>C</mi><mi>n</mi></msub><mo>⊕</mo><msub><mi>C</mi><mrow><mi>n</mi><mo>−</mo><mn>1</mn></mrow></msub></mrow><annotation encoding=\"application/x-tex\">OF = C_n \\oplus C_{n-1}</annotation></semantics></math></span>"}}]},{"id":"fb43874e-8a9c-4bcb-a831-a45f5384f457","topic":"SF：","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"34b239e4-79a5-4fe7-8448-6ed75dbd7226","topic":"给【有符号数】的，正数为0，负数为1","expanded":true,"style":{"background":"#FF9595"},"formula":{"tex":"SF = F_n","displayMode":true,"mathml":"<span class=\"katex\"><math xmlns=\"http://www.w3.org/1998/Math/MathML\" display=\"block\"><semantics><mrow><mi>S</mi><mi>F</mi><mo>=</mo><msub><mi>F</mi><mi>n</mi></msub></mrow><annotation encoding=\"application/x-tex\">SF = F_n</annotation></semantics></math></span>"}}]},{"id":"97fbd5bf-38c5-4faa-bfb9-308d1c47c0d8","topic":"CF：","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"a47825c2-fd05-465d-82c5-134c4696381b","topic":"进位位，是给【无符号数】用的，运算进位了CF = 1，否则 CF = 0","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"716c66b4-ca0d-40fc-8914-f1dfd2b5f883","topic":"加法运算Cin = 0，Cout = 1说明出现了进位","expanded":true,"icons":["priority:1"]},{"id":"eb014843-eb7a-4f9d-8587-65cd3789b16f","topic":"减法运算Cin = 1，Cout = 0说明出现了借位，就是A比B小","expanded":true,"icons":["priority:2"]}],"formula":{"tex":"CF = C_{out} \\oplus C_{in}","displayMode":true,"mathml":"<span class=\"katex\"><math xmlns=\"http://www.w3.org/1998/Math/MathML\" display=\"block\"><semantics><mrow><mi>C</mi><mi>F</mi><mo>=</mo><msub><mi>C</mi><mrow><mi>o</mi><mi>u</mi><mi>t</mi></mrow></msub><mo>⊕</mo><msub><mi>C</mi><mrow><mi>i</mi><mi>n</mi></mrow></msub></mrow><annotation encoding=\"application/x-tex\">CF = C_{out} \\oplus C_{in}</annotation></semantics></math></span>"}}]}]},{"id":"803b63b3-8db0-46bd-8ab2-3573e8e00c68","topic":"带标记加法器逻辑电路","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"958a6495-1acc-48e2-91f4-37d1ca069e62","topic":"图示","expanded":true,"style":{"background":"#8EDDF9"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-979f1474da7697.png","width":475.44,"height":258.93},"children":[{"id":"2b1a472a-6f5e-4cec-a3b2-702f89c4413a","topic":"Cn和Cout一样","expanded":true}]}]}]},{"id":"064403db-167a-471d-b73f-0b0c8c6ecd01","topic":"多路选择器、三态门","expanded":true,"children":[{"id":"81f9a684-967c-4e56-8a08-f54ccb645f94","topic":"多路选择器","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-f290b253ab5833.png","width":1814,"height":1222},"children":[{"id":"77e513a2-4961-43a5-bf16-027f32dc78b5","topic":"k个输入，m要求","expanded":true,"children":[{"id":"eaa0f3bc-52a5-4912-8b78-cccc8255fb36","topic":"一位ALU的结构（有三种操作）","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-656b1a946bb4ce.png","width":308.18,"height":194.88}}],"formula":{"tex":"m \\ge \\lceil \\log_2 k \\rceil\\,\\text{bit}","displayMode":true,"mathml":"<span class=\"katex\"><math xmlns=\"http://www.w3.org/1998/Math/MathML\" display=\"block\"><semantics><mrow><mi>m</mi><mo>≥</mo><mo stretchy=\"false\">⌈</mo><msub><mrow><mi>log</mi><mo>⁡</mo></mrow><mn>2</mn></msub><mi>k</mi><mo stretchy=\"false\">⌉</mo><mtext> </mtext><mtext>bit</mtext></mrow><annotation encoding=\"application/x-tex\">m \\ge \\lceil \\log_2 k \\rceil\\,\\text{bit}</annotation></semantics></math></span>"}}]},{"id":"f47e5362-4724-471c-bc21-cefb90c62d02","topic":"三态门","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-12223f123186bd.png","width":1602,"height":1488}}]},{"id":"d21ecd9a-17f6-45e3-bc66-f2e354c178df","topic":"ALU为组合逻辑电路","expanded":true,"children":[{"id":"96c09b18-0959-43d2-abe7-8f732dd2d612","topic":"组合逻辑电路：没有存储单元只包含了电路。\n时序逻辑电路：既有电路又有存储单元","expanded":true,"style":{"background":"#8EDE99"}},{"id":"60d1be1f-f79b-4711-a936-249d6ef1aee2","topic":"ALU的基本结构","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-b57100baca41f1.png","width":271.3,"height":211.64}}]},{"id":"73ef84ff-3d93-42d9-b686-576037818e9a","topic":"运算器的组成部分","expanded":true,"children":[{"id":"c9342d4c-3b1d-4d94-9544-f3e1dc13b66a","topic":"ALU","expanded":true},{"id":"e59c3b7c-5579-44fe-ad41-c192f1bb5ae9","topic":"总线","expanded":true},{"id":"106825f6-9f56-45bc-afc8-e105b714d86d","topic":"状态寄存器","expanded":true,"children":[{"id":"721456fb-159c-47a2-ba24-3d0ca700359f","topic":"存储进位信息","expanded":true}]}]}]},{"id":"38d338e0-9183-4a5c-9b44-7b9fde15c1fb","topic":"定点数的移位运算","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-2dbe0fdaf450fc.svg","width":60,"height":61},"children":[{"id":"17e20605-b45a-45d9-a53c-3fbd85b3e952","topic":"逻辑运算","expanded":true,"children":[{"id":"04f2c06d-5a88-4756-82aa-fbcd4d917dd7","topic":"与、或、非三大基本运算","expanded":true}]},{"id":"d3810e7b-f11a-4b1f-b549-e1a687683ed7","topic":"逻辑移位","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"b695ba39-fd41-415b-93e4-de2204ab41ab","topic":"不管数的类型，一律添 0","expanded":true,"style":{"background":"#8EDE99"}},{"id":"4d78cf3f-df9a-4263-8f84-c7e8fbd3c371","topic":"作用：","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"abea657c-4dcc-4258-a6a0-dda4b0694edd","topic":"用于拆分和定位一个二进制中对应区间bit的数值，例如可以通过逻辑移位获得24bit RGB二进制数的R、G、B分别的数值","expanded":true,"style":{"background":"#8EDDF9"}}]}]},{"id":"1df30865-eed5-4c2f-9c43-ca6e7e87048b","topic":"算术移位","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"1b716ff7-d08b-456b-8f15-e81c9102cc09","topic":"原码","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"c476f926-4d98-4bc9-9a2a-115526fb519e","topic":"正数负数，一律添 0","expanded":true,"style":{"background":"#8EDE99"}}]},{"id":"7d96b784-eed7-45fa-9218-05ba508d1d79","topic":"反码","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"74c98cf1-2834-4811-a167-d53e2ec1460f","topic":"正数全 0，负数全 1","expanded":true,"style":{"background":"#8EDE99"}}]},{"id":"cd4f0376-f053-494a-9805-5cb2e28a7c5f","topic":"补码","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"603a962c-a94e-4c81-9f4f-3699f66e8f0b","topic":"正数全 0，负数左 1 右 0","expanded":true,"style":{"background":"#8EDE99"}}]},{"id":"c35ff896-54e2-4445-9812-2b75845d315e","topic":"算术移位的精度：","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"17f70788-42c9-4a6b-88ef-7243dec1392d","topic":"往右移动会丢失精度","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"64075c72-e131-4f74-bf8c-46d8118d6fbc","topic":"例：0011(3) 右移一次 0001(1)，而 3 ÷ 2 = 1.5","expanded":true}]},{"id":"e25bd50b-c973-489b-b34a-596ccfb2bc84","topic":"往左移动可能出现严重误差","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"bbccfc4e-d8a0-4f1d-a9a0-3f8036e65a5e","topic":"例： 1000(-8)  左移一次 0000 (0), 出现严重误差","expanded":true}]}]},{"id":"1e998202-24e1-4017-b1b4-1deee0249d9f","topic":"作用：","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"3c55aa2d-7c53-4845-8adc-84fd14382cbd","topic":"算术位移可以模拟乘法运算","expanded":true,"style":{"background":"#FDD834"},"formula":{"tex":"\\begin{aligned} -2 \\times 7 &= 1111\\,1110 \\times 0000\\,0111 \\\\ &\\to -2\\text{左移}0\\text{次}(\\times 1)\\text{、}1\\text{次}(\\times 2)\\text{、}2\\text{次}(\\times 4)\\text{再相加} \\\\ \\text{即 } & 1111\\,1110 + 1111\\,1100 + 1111\\,1000 \\\\ &= 1111\\,1010 + 1111\\,1000 = 1111\\,0010 = -14 \\end{aligned}","displayMode":true,"mathml":"<span class=\"katex\"><math xmlns=\"http://www.w3.org/1998/Math/MathML\" display=\"block\"><semantics><mtable rowspacing=\"0.25em\" columnalign=\"right left\" columnspacing=\"0em\"><mtr><mtd><mstyle scriptlevel=\"0\" displaystyle=\"true\"><mrow><mo>−</mo><mn>2</mn><mo>×</mo><mn>7</mn></mrow></mstyle></mtd><mtd><mstyle scriptlevel=\"0\" displaystyle=\"true\"><mrow><mrow></mrow><mo>=</mo><mn>1111</mn><mtext> </mtext><mn>1110</mn><mo>×</mo><mn>0000</mn><mtext> </mtext><mn>0111</mn></mrow></mstyle></mtd></mtr><mtr><mtd><mstyle scriptlevel=\"0\" displaystyle=\"true\"><mrow></mrow></mstyle></mtd><mtd><mstyle scriptlevel=\"0\" displaystyle=\"true\"><mrow><mrow></mrow><mo>→</mo><mo>−</mo><mn>2</mn><mtext>左移</mtext><mn>0</mn><mtext>次</mtext><mo stretchy=\"false\">(</mo><mo>×</mo><mn>1</mn><mo stretchy=\"false\">)</mo><mtext>、</mtext><mn>1</mn><mtext>次</mtext><mo stretchy=\"false\">(</mo><mo>×</mo><mn>2</mn><mo stretchy=\"false\">)</mo><mtext>、</mtext><mn>2</mn><mtext>次</mtext><mo stretchy=\"false\">(</mo><mo>×</mo><mn>4</mn><mo stretchy=\"false\">)</mo><mtext>再相加</mtext></mrow></mstyle></mtd></mtr><mtr><mtd><mstyle scriptlevel=\"0\" displaystyle=\"true\"><mtext>即 </mtext></mstyle></mtd><mtd><mstyle scriptlevel=\"0\" displaystyle=\"true\"><mrow><mrow></mrow><mn>1111</mn><mtext> </mtext><mn>1110</mn><mo>+</mo><mn>1111</mn><mtext> </mtext><mn>1100</mn><mo>+</mo><mn>1111</mn><mtext> </mtext><mn>1000</mn></mrow></mstyle></mtd></mtr><mtr><mtd><mstyle scriptlevel=\"0\" displaystyle=\"true\"><mrow></mrow></mstyle></mtd><mtd><mstyle scriptlevel=\"0\" displaystyle=\"true\"><mrow><mrow></mrow><mo>=</mo><mn>1111</mn><mtext> </mtext><mn>1010</mn><mo>+</mo><mn>1111</mn><mtext> </mtext><mn>1000</mn><mo>=</mo><mn>1111</mn><mtext> </mtext><mn>0010</mn><mo>=</mo><mo>−</mo><mn>14</mn></mrow></mstyle></mtd></mtr></mtable><annotation encoding=\"application/x-tex\">\\begin{aligned} -2 \\times 7 &amp;= 1111\\,1110 \\times 0000\\,0111 \\\\ &amp;\\to -2\\text{左移}0\\text{次}(\\times 1)\\text{、}1\\text{次}(\\times 2)\\text{、}2\\text{次}(\\times 4)\\text{再相加} \\\\ \\text{即 } &amp; 1111\\,1110 + 1111\\,1100 + 1111\\,1000 \\\\ &amp;= 1111\\,1010 + 1111\\,1000 = 1111\\,0010 = -14 \\end{aligned}</annotation></semantics></math></span>"}}]}]},{"id":"e62fbb8b-9696-48cf-b30b-4d315536ed2a","topic":"循环移位","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"518b9b03-9984-4ff8-be20-9a0b1e932eec","topic":"带进制位和不带进制位","expanded":true,"style":{"background":"#8EDDF9"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-36f6e0e2827eff.png","width":535.69,"height":212.84},"children":[{"id":"856a616a-5277-4955-b6a0-59f925a11ea0","topic":"CF中不是0就是1","expanded":true},{"id":"041a658d-d96a-49e4-b453-4ff193ad7466","topic":"带进位位：大循环","expanded":true},{"id":"409260aa-2b47-42e5-bc51-fee45e5a56f7","topic":"不带进位位：小循环","expanded":true}]}]},{"id":"c6fc27b8-83c9-43ff-8a05-e539e15a934f","topic":"考频：低","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"9e947302-1bea-4c9e-88b0-d801254a247c","topic":"18","expanded":true}]}]},{"id":"c0910a43-e26f-4661-86bf-72fae30e958a","topic":"定点数的加减法","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-ad5da923dd36e9.svg","width":64,"height":64},"children":[{"id":"27d0ae53-c00f-4947-8441-e88824db60cb","topic":"考频：低","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"b0e7d222-873d-4c83-adf1-8727e3a86418","topic":"（10、13、14、18）溢出","expanded":true}]},{"id":"d8566e2e-477a-4f5a-a495-15a86e817456","topic":"【加减法】","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"91e2ee15-7b3c-4e01-85e4-eca341443bbd","topic":"运算规则：","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"8a278aa4-5ce3-44dd-b217-ac53d84dc12a","topic":"1. 使用补码来进行加法，符号位参与运算","expanded":true,"style":{"background":"#FDD834"}},{"id":"8cddf12e-9017-49fc-a9ef-ec3963e92584","topic":"2. 如果是 A - B，改为补码形式的 A + (-B)来进行计算","expanded":true}]},{"id":"68a52c38-e1b4-43f1-8d45-d05a586ac4bc","topic":"运算电路：","expanded":true,"children":[{"id":"bcbbf27c-8e33-4e5d-a01b-67c9c1260050","topic":"图示","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-c904426616e73b.png","width":443.8,"height":244.43},"children":[{"id":"d17cff5a-2bc6-4a58-8d73-13bb9098bc77","topic":"ZF、OF、SF、CF的意义","expanded":true,"children":[{"id":"f5783643-5958-4f86-b156-bb40ac500029","topic":"zero flag，overflow flag，signal flag，carry flag","expanded":true}]}]}]},{"id":"8e79fade-2362-4e53-82bc-e2e15e406936","topic":"溢出判断：","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"a40fd1ac-9228-4097-aa96-cbeef5efcdb0","topic":"正负溢出","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"20543a81-c7cd-48bb-a459-83308817c287","topic":"正 + 正","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"85f6624e-cad6-4823-99b5-d5482b5ff998","topic":"可能导致正溢出","expanded":true,"style":{"background":"#8EDE99"}}]},{"id":"e971028d-3c26-49b7-86d6-df63ae1feab2","topic":"负 + 负","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"1f1ff587-e8a2-4c0e-8367-6f42e6b865e9","topic":"可能导致负溢出","expanded":true,"style":{"background":"#8EDE99"}}]},{"id":"a158b971-ed57-4d1e-b890-8439ab28a11e","topic":"正负相加","expanded":true,"children":[{"id":"afdef37c-bba6-4207-9e52-942f585a810f","topic":"一定没有溢出","expanded":true}]}]},{"id":"559c9dcc-3f09-4ca4-a294-3b227cb2a74a","topic":"溢出的含义：","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"b28503d3-411b-4c19-9e7e-5c209921bb07","topic":"原码、反码、补码计算器","expanded":true,"hyperlink":"https://chenwenhang.github.io/code-switch/"},{"id":"2324f7f7-7072-4485-b88c-7f537e991e1a","topic":"图示","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-b5f34fbaca3376.png","width":388.92,"height":192.45}}]},{"id":"8b6d247e-8a92-49ef-8232-873b1062c4ed","topic":"检测手段","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"a466d9ee-b3cf-4f5c-bd3d-f0647129808d","topic":"单符号位","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"72c990a7-06bd-4d1a-90d7-1f061cb84a01","topic":"计算出结果后进行检测，可以检测出异常","expanded":true,"style":{"background":"#8EDDF9"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-90a8036b947577.png","width":411.83,"height":244.21},"children":[{"id":"d3b439c1-7399-40a0-80c0-7f6f5d68ac64","topic":"无法检测是正溢出还是负溢出","expanded":true}]}]},{"id":"2c5210f4-6678-429c-9598-840e26475f56","topic":"符号位 + 进制位","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"c2645188-20ec-43b2-bc66-8f6a219ea155","topic":"( 正溢出 -> 0,1 ) ；( 负溢出 -> 1,0 )","expanded":true,"style":{"background":"#8EDDF9"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-7887b4e46f875f.png","width":390.27,"height":234.71}}]},{"id":"4b952ba2-a9c0-43ae-8077-c065ee860925","topic":"双符号位","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"07fb4b06-e22d-45df-b7bf-5ab654e63762","topic":"( 正溢出 -> 0,1 ) ；( 负溢出 -> 1,0 )","expanded":true,"style":{"background":"#8EDDF9"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-5f30809f4ef5e3.png","width":407,"height":217.84},"children":[{"id":"8b1129ea-73d1-4703-9ba4-8950a3d274fd","topic":"存储的时候是单符号位，运算时扩展成了双符号位。","expanded":true,"style":{"background":"#FF9595"}}]}]},{"id":"ee405127-bd84-4873-be7d-17f68eb272b4","topic":"拓展","expanded":true,"children":[{"id":"18850ad8-10ba-45e3-84c5-141ec5c12f29","topic":"双符号位补码：","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"ca8e4e70-1dbf-48e4-9591-12fd1bdc26a4","topic":"模4补码","expanded":true,"style":{"background":"#FDD834"}}]},{"id":"d0f44d88-978b-486b-89ef-ed8d2860ad4f","topic":"单符号位补码：","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"30620239-1ee6-4a27-8f89-7a88aea3bf76","topic":"模2补码","expanded":true,"style":{"background":"#FDD834"}}]}]}]},{"id":"d866f829-57c6-4a04-8567-8a741470f425","topic":"解决办法","expanded":true,"children":[{"id":"a4d853c9-cba0-4c4c-8bf8-96a278e87f73","topic":"通过符号扩展来进行溢出控制，例如 int (4B) -> long(8B)，扩展方法和算术位移一致","expanded":true}]}]}]},{"id":"edd68350-8f7e-4910-804d-e119891f25f1","topic":"【乘法运算】","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"11c4e63e-66c0-43b6-b0f9-0596727eb551","topic":"图示","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-42b7da0f2dc8dc.png","width":608,"height":752},"children":[{"id":"342ea0e0-2973-422b-9617-f971325122f1","topic":"ACC：乘积高位","expanded":true,"style":{"background":"#FDD834"}},{"id":"e93614a9-bf57-434a-ae4d-2a618e6e8e71","topic":"MQ：乘数、乘积低位","expanded":true,"style":{"background":"#FDD834"}},{"id":"32d6559f-5359-4603-8412-2461f0df77c9","topic":"X：被乘数","expanded":true,"style":{"background":"#FDD834"}}]},{"id":"761a19e7-cb99-4387-bf07-01f24b494831","topic":"X * MQ","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"8cd5616b-f0dd-4606-a676-5f1db7a9b536","topic":"X是被乘数，MQ是乘数","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"8c2968c3-7bee-4cc4-a27a-c7fe121a36a7","topic":"前放X，后放MQ","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"188f4a2b-a13d-459e-a068-d55dc93b2864","topic":"（X*Y）","expanded":true,"style":{"background":"#BA69C8"}}]}]}]},{"id":"940912c1-47b2-4efd-be87-a2f228b161e4","topic":"【原码乘法】\n符号另算。多次累加，通过MQ最后一位来判断是否让ACC加X，每次都让右移，最后结果ACC为高位，MQ为低位","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"6dd48623-0fcb-4c80-b52d-ac1aa2115a1a","topic":"硬件构成","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"6e307ae0-9af0-4e7c-b904-c62596bec7ec","topic":"图示","expanded":true,"style":{"background":"#8EDE99"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-b6da1188842f76.png","width":476.3,"height":209.91},"children":[{"id":"b4350245-50d8-48c1-84d2-51f4bd70cb64","topic":"ACC有n+1位，MQ也有n+1位","expanded":true}]}]},{"id":"f8d613a9-d4f7-4b59-a714-7184d09849be","topic":"加法规则：","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"a52bb5c2-9a8c-4aa9-966d-ad1f82cd2aff","topic":"MQ的最低位为0，则ACC = ACC + 0","expanded":true,"style":{"background":"#FDD834"}},{"id":"bbd42453-ff79-4a93-8ee4-14633d59da30","topic":"MQ的最低位为1，则ACC = ACC + X","expanded":true,"style":{"background":"#FDD834"}}]},{"id":"f7a79ac2-3df3-4730-ae0e-feb1eadecb15","topic":"移位规则：","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"c9202677-daeb-4d39-bbc7-513cfe372025","topic":"统一采用逻辑移位（只补0）","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"c2dce210-47be-45fd-816c-8813df69241c","topic":"因为是原码，所以逻辑算术移位没区别","expanded":true}]}]},{"id":"4e330fde-f321-4647-acd8-650d32205483","topic":"运算流程：","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"8b4af1f5-f94e-4fa9-b65c-0af608a0b01b","topic":"已知运算 x * y，x为负，y为正","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"16874a96-5db1-4d77-a884-2880e8685ab3","topic":"其中x和y的符号位为一位，数值位为n位","expanded":true,"style":{"background":"#8EDE99"}}]},{"id":"57d94bd6-0ba9-4551-8c36-54974344b3ca","topic":"0. 确定最终符号位为 1，把【x的符号改为0】","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"73e06691-9bce-4e50-a289-5503a53a8dc4","topic":"符号位的计算：对两个数的符号位进行异或运算即可","expanded":true,"style":{"background":"#8EDE99"}}]},{"id":"5629266d-a94c-4952-9331-d048919f5eeb","topic":"1. 把x存入X寄存器中，把y存入到MQ寄存器中，清空ACC","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"17cdd378-6179-4420-b939-3de7608f64c8","topic":"此时，MQ的最低位就应该是被乘数X应该进行操作","expanded":true,"style":{"background":"#8EDE99"}}]},{"id":"5cec4649-6df7-489e-b0dc-06934b29223f","topic":"2. 进行加法，进行移位","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"f6f3decc-8abc-43ab-81aa-9f3f94fdf79d","topic":"此时的右移有两个作用：","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"d7392b9e-5fba-4c7c-a7b9-87921f1fff18","topic":"A. 使得MQ的最低位指明了下一次需要进行操作 \nB. 下次一次的加法是和上一次的结果“错位”相加","expanded":true,"style":{"background":"#8EDE99"}}]}]},{"id":"841222d0-0cb0-453a-8192-d277e988c2cc","topic":"3. 重复 1~2 的步骤 n 次。\n最后的结果就是(ACC, MQ)中，其中MQ的最末位舍弃，ACC的第一位改为符号位","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"9f6a6ef4-ed06-4242-af2c-7b2c833ffaf6","topic":"ACC的全部 + MQ的前n位","expanded":true,"style":{"background":"#8EDDF9"}},{"id":"1e410115-1d1d-4daf-b1c9-a8508294fa7f","topic":"x * y 最后的结果最多为 2n 位，MQ和ACC都是n+1位寄存器，MQ的最末位舍去","expanded":true,"style":{"background":"#8EDE99"}}]}]},{"id":"a86185c0-1c3d-41a0-98bb-ca283ebb6ccf","topic":"采用的是原码一位乘法，还有二位乘法，不拓展了","expanded":true,"style":{"background":"#D0D0D0"}},{"id":"83e7abdf-6d85-4244-a38d-481f3e19bddf","topic":"n次位移，n次运算","expanded":true,"icons":["emoji:💬"],"style":{"borderStyle":"dashed","borderColor":"#F59E0B"}}]},{"id":"049cbabf-46e7-470c-8f76-24de2d86b57c","topic":"【补码乘法】\n符号参与运算，双符号位，MQ多一个辅助位，ACC是+/- X或者不变看MQ后两位之差，然后位移。【最后还有一次加法】","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"caf54522-91c7-4f95-b0c3-48a3059c9d9b","topic":"硬件构成","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"07b4bb25-fa93-4e46-b823-1f47abe8eccd","topic":"图示","expanded":true,"style":{"background":"#8EDE99"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-94f50caea260c4.png","width":598.12,"height":287.67},"children":[{"id":"a8ad99d5-bb15-4cec-9d80-183e13db16bd","topic":"MQ为 n+2 位（因为多了一位辅助位）","expanded":true},{"id":"58209d41-7cb5-4948-a50c-ba3fa262cf72","topic":"同样ACC和X都是n+2位（因为CPU要保证寄存器长度一致），那么就可以采用双符号位了","expanded":true}]}]},{"id":"4ac3f688-08e1-4c56-b3cb-c1aca0a50373","topic":"加法规则：","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"9a7deff1-aea0-41d7-b759-ffeda0afe2c0","topic":"根据MQ的最低位和MQ的辅助位（在硬件中MQ的最低位为MQ的倒数第二位，辅助位为MQ的倒数第一位）","expanded":true,"style":{"background":"#FF9595"}},{"id":"544ee1fc-24d8-4733-bc30-615cd7aeb410","topic":"辅助位 - 最低位 = 1 ， ACC = ACC + x","expanded":true,"style":{"background":"#FDD834"}},{"id":"59e774c3-0c96-4791-90da-384df71ccc3e","topic":"辅助位 - 最低位 = 0 ， ACC = ACC + 0","expanded":true,"style":{"background":"#FDD834"}},{"id":"52c8d0e7-6b38-4232-b645-b6ef60e7cce8","topic":"辅助位 - 最低位 = -1， ACC = ACC + (-x)","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"49b13851-0ba9-4cd2-8b63-4a191607d178","topic":"x的补码到-x的补码是由另外的辅助电路完成的","expanded":true}]}]},{"id":"d2873acc-e401-4dd5-909c-14fb5c97349b","topic":"移位规则：","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"1231b4fb-2592-4176-b545-26566b703a0f","topic":"采用算术移位","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"408ac95b-1621-44f8-a88a-411a7f459044","topic":"正的补0，负的补 1","expanded":true,"style":{"background":"#FDD834"}}]}]},{"id":"61771e3f-2264-4a06-b536-304ebd629cd9","topic":"运算流程：","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"ae41f865-1e00-4358-9bf3-aabfac55465e","topic":"已知运算 x * y，x为负，y为正","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"bc09f047-7800-4961-b894-a3576d7e66f9","topic":"其中x和y的符号位为一位，数值位为n位","expanded":true,"style":{"background":"#8EDE99"}}]},{"id":"d24a8f03-3489-4682-bd6c-4be0e2d077ea","topic":"1. x扩展为双符号直接存入X，y不扩展符号存入MQ中，清空ACC（MQ辅助位初始为0）","expanded":true,"style":{"background":"#8EDDF9"}},{"id":"1caedf8f-f44e-471a-83b4-22f4ba6a8d9d","topic":"2. 根据加法和移位的规则进行加法运算","expanded":true,"style":{"background":"#8EDDF9"}},{"id":"2b9e8629-f176-4817-aea9-05adbe050833","topic":"3. 重复 1~2 的步骤n次","expanded":true,"style":{"background":"#8EDDF9"}},{"id":"5f6b8251-fdfc-45e7-a2d3-d5605b253f28","topic":"4. 对3的结果再进行一次加法运算","expanded":true,"style":{"background":"#8EDDF9"}},{"id":"d5307d38-4f45-4d7a-b46c-f4a21d648803","topic":"5. 最后的结果就是(ACC, MQ)","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"e587a556-4089-4da3-a353-b18f2e57a066","topic":"ACC的全部 + MQ的前n位","expanded":true}]}]},{"id":"fa44e42c-a856-4b11-bd06-ecbd40758a66","topic":"n次位移，n+1次运算","expanded":true,"icons":["emoji:💬"],"style":{"borderStyle":"dashed","borderColor":"#F59E0B"}}]},{"id":"51f9bcf7-6fa7-4353-8bcb-239bcc5cec8f","topic":"整数运算和小数运算的符号位位置相同","expanded":true,"children":[{"id":"400668fc-858a-42ca-b57f-d74c449987b0","topic":"但是整数运算的小数位在MQ的第n位上，小数运算的小数点在第1/2位上(看是原码还是补码）","expanded":true}]},{"id":"2b270dc1-e0d9-42d5-a31a-9bfd355b63cb","topic":"原补码乘法，区别在于原码只需看MQ最后一位，补码需要看MQ的辅助位和最后一位","expanded":true,"icons":["emoji:💬"],"style":{"borderStyle":"dashed","borderColor":"#F59E0B"}}]},{"id":"ff567a5c-810d-4204-ac3a-b0e653222f8f","topic":"乘法电路","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"8d339679-f1de-4609-b562-98276c7ae660","topic":"无符号数","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"4004a584-7200-45f8-827e-b558e55c9b3f","topic":"图示","expanded":true,"style":{"background":"#FF9595"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-db60e8d6cc26b9.png","width":572.32,"height":279.9},"children":[{"id":"507949a9-26f8-4782-8d5a-873cd9136ccb","topic":"自己尝试一下~","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-1629262d1cb4a0.png","width":495.07,"height":264.09},"children":[{"id":"b41ba682-745e-4c4a-bc5f-6fb206f4b4b3","topic":"阵列乘法器，可以同时得到多位的乘积","expanded":true,"hyperlink":"https://zhuanlan.zhihu.com/p/139173424","image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-b9075ea2d8d167.png","width":382.95,"height":171.84}}]}]}]},{"id":"2716d119-cbd5-4e63-8dd1-ead2aea80227","topic":"有符号数","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"4cbfd12a-f4cf-4603-ba9d-acfc8e8829b5","topic":"补码一位乘法逻辑结构图","expanded":true,"style":{"background":"#FF9595"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-57afc9b67afba4.png","width":590.55,"height":316.58},"children":[{"id":"eaad25d8-ba1c-4240-a47d-403c9c8ba8b2","topic":"注意事项：这里电路（MIPS）中的【补码】乘法是单符号位的，n次加移就够了","expanded":true,"style":{"background":"#FFABD5"},"children":[{"id":"69eb181b-2675-475f-bf21-917100f7683d","topic":"上面学的双符号位【补码】乘法要n+1次加法、n次移位","expanded":true,"style":{"background":"#FFABD5"}}]}]}]}]},{"id":"be469c91-b5a8-4f9d-975e-52fa5e7ff6a0","topic":"【除法运算】","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"86fef3d2-934d-4f6c-bd3a-687662e9a1d6","topic":"硬件检测","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"d8b281bb-5e08-4be0-b72e-7f319098cbae","topic":"定点小数应是除数 > 被除数","expanded":true,"style":{"background":"#8EDE99"}},{"id":"8bc243a4-a225-4f4a-bcc6-0b139753c243","topic":"如果第一步的商运算后的结果为 1，那么就说明除数 <= 被除数，无法用定点小数来进行计算，故报错","expanded":true,"style":{"background":"#8EDE99"}}]},{"id":"34d73914-826f-48fe-84b4-ea2cc96be0b9","topic":"图示","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-42b7da0f2dc8dc.png","width":608,"height":752},"children":[{"id":"ff780e46-87a4-4ed8-be01-c611efc17be3","topic":"ACC：被除数、余数","expanded":true,"style":{"background":"#FDD834"}},{"id":"f72d8394-7df6-4f52-af52-68bfc4f6b856","topic":"MQ：商","expanded":true,"style":{"background":"#FDD834"}},{"id":"63f78a76-2636-423b-a1fd-8053462854be","topic":"X：除数","expanded":true,"style":{"background":"#FDD834"}}]},{"id":"6a1547a5-ea33-4bf2-a80b-93abc205e75f","topic":"R ÷ Y = Q...R","expanded":true,"style":{"background":"#BA69C8"},"children":[{"id":"9fbde61c-d7fa-467b-960c-f2460cc05128","topic":"R: remainder，Y: ...，Q: quotient","expanded":true}]},{"id":"5ca105d8-08bd-4cbe-8ada-8990eb46e59b","topic":"【原码除法】\n先商一，然后相减后发现是负数了，再处理，逐渐左移，最后MQ是商，ACC是余数","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"8699419a-aea4-4538-acd5-8289aeea6a35","topic":"恢复余数法","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"08588b4d-9db0-4811-8629-b9e808666858","topic":"硬件构成","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"a746832c-73b8-4bb0-b58d-954f900d40f4","topic":"图示","expanded":true,"style":{"background":"#8EDE99"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-dfe890806c7949.png","width":592.01,"height":351.94},"children":[{"id":"13736774-92b3-4448-9b12-c4e81a2b1e5c","topic":"ACC有n+1位，MQ也有n+1位","expanded":true}]}]},{"id":"e2524c00-3334-4fcc-8336-ae0b8b4599a7","topic":"运算流程：","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"81a0967d-8639-4f6a-a1b7-63eee9206838","topic":"单独处理符号位","expanded":true,"style":{"background":"#FDD834"}},{"id":"22d46703-6150-44cd-98b7-52cc0058763f","topic":"已知运算 x ÷ y","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"c1b4d308-8bac-44d0-b902-cbb8a44d8519","topic":"ACC ÷ X","expanded":true}]},{"id":"89b371e5-5e83-42ac-87f9-1ed1372ff3a5","topic":"0. 把 y 写入到X，把 x 写入到ACC，MQ清零","expanded":true,"style":{"background":"#8EDDF9"}},{"id":"9c52b376-155f-42f2-8ceb-4acf364591a7","topic":"1. 算法默认商 1，MQ的最低位置为 1，进行减法操作：ACC = ACC + (-X)","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"0be03979-7051-4172-bcfb-48be59fea593","topic":"如果最后的ACC的结果为负，则说明此时商0，则把MQ的最低位改为 0，同时ACC = ACC + X","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"328a6e0c-7446-481f-91cb-c9c33443692e","topic":"“恢复余数法”","expanded":true,"icons":["emoji:💬"],"style":{"borderStyle":"dashed","borderColor":"#F59E0B"}}]}]},{"id":"c0465154-a253-4b74-aa48-e323cfae987b","topic":"2. 把(ACC, MQ)的值全部左移一位","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"78cdfc19-de5a-47d5-a8b1-516fde78ad73","topic":"此时的左移有两个作用：","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"25bcbda9-4a23-4071-a8b3-19c0c680344e","topic":"A. 使得ACC被除数*2\nB. 有一位商已经确定在MQ中了","expanded":true,"style":{"background":"#8EDE99"}}]}]},{"id":"9d053b59-cae0-446f-829d-af0bd85d7a3f","topic":"3. 如果x和y的数值位都为n，那么需要经过【n + 1】次减法运算，n 次移位运算","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"72550586-295d-4541-aa18-b3adc70b7e02","topic":"如果最后一次商 1 还是负数，则应该再恢复余数一次","expanded":true,"style":{"background":"#8EDDF9"}}]},{"id":"5921552c-02cb-4c8a-b0ff-7a33d4fcfe43","topic":"MQ最后存放了商，ACC存放了余数，【修改MQ的符号位】","expanded":true,"style":{"background":"#FF9595"}}]}]},{"id":"c1b59f76-63d7-4268-9e4c-ea00261a327f","topic":"加减交替法","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"4a1a42c2-3f62-44e8-979e-9f39e820f226","topic":"优化思路：","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"01548b81-e932-42b4-9c9b-589febbab6f1","topic":"图示","expanded":true,"style":{"background":"#8EDE99"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-88b5f3d4ee45e1.png","width":515.56,"height":217.44}},{"id":"b82f7fe5-b60f-461e-87b0-14dea901d947","topic":"不进行恢复余数的操作，将操作更改如下","expanded":true,"children":[{"id":"0005ab73-665d-4e65-bbc1-328aad08e0c4","topic":"计算机每次都默认商 1，然后进行补码减法，对于减法后的结果，如果结果为正，则移位进行下一次商操作。","expanded":true},{"id":"abdbf0b8-f38f-4ccb-b2b7-ab33d5a08020","topic":"如果商 1 结果为负，则将 (ACC, MQ) 的值左移一位，在加上X的值（此处的X是ACC,MQ,X的那个X）","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"6746db94-e0e7-4f59-ac25-9e4b8ce0f2b6","topic":"把 (a + b) x 2 - b","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"53760648-e415-4ed6-83fc-c417a14fe738","topic":"简化为了 2 x a + b","expanded":true,"style":{"background":"#FDD834"}},{"id":"933099c0-d298-4c9e-8be1-1cd6477417bc","topic":"首先恢复余数(+b)，然后向左移位一次(x2)，然后进行下一次的商 1 相减设置(-b)","expanded":true,"icons":["emoji:💬"],"style":{"borderStyle":"dashed","borderColor":"#F59E0B"}}]}]}]}]},{"id":"2f44a39c-1f9f-4678-bb05-ed7848d40e20","topic":"其他特点：","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"a4012d96-83ad-4577-95c1-008ec7366327","topic":"最后算完MQ和ACC的时候如果ACC的内容是负数，还是要 +X 恢复一下","expanded":true,"style":{"background":"#FF9595"}},{"id":"4d1d852e-fb11-4c04-9e8c-86b6598617f1","topic":"加法进行了 n + 1/n + 2 次，而左移进行了 n 次","expanded":true,"style":{"background":"#FF9595"}}]}]}]},{"id":"6f858d72-53fb-47e3-af10-3914f1283677","topic":"【补码除法】\n符号位参与运算，如果X和ACC异号，则左移后相加，如果X和ACC同号，则左移后相减","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"9e9ded71-7c61-495c-b896-4bb4f0772e38","topic":"图示","expanded":true,"style":{"background":"#8EDE99"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-6fc366c6cbe0d3.png","width":676.26,"height":344.24},"children":[{"id":"32103fa7-3509-40df-b6f2-9f0201d4e18c","topic":"原码除法采用默认商 1","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"1b320f6d-77d8-421d-af02-b3a7e853dda8","topic":"如果结果为正：左移 + X","expanded":true,"style":{"background":"#8EDE99"}},{"id":"1e8c3404-3091-49ab-97f7-2c9193b6dc6a","topic":"如果结果为负：左移 - X","expanded":true,"style":{"background":"#8EDE99"}}]},{"id":"d6e94861-73b3-4e1f-801d-651a4dafc7fc","topic":"补码除法在商的时候根据ACC和X的符号进行判断","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"5de75b02-ecd4-436f-a83f-845e3b3c63f4","topic":"如果ACC和X的符号不同，则商0","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"36b7f5d7-c80e-431d-a822-1be2751e8aa6","topic":"(ACC, MQ)左移一位，+ X","expanded":true,"style":{"background":"#8EDDF9"}}]},{"id":"46ea6f84-39b0-450f-8928-f3ee6d388aa8","topic":"如果ACC和X的符号同号，则商 1","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"f1701409-cc0d-45a1-b97c-8d55c726e0e6","topic":"(ACC, MQ)左移一位， - X","expanded":true,"style":{"background":"#8EDDF9"}}]}]}]}]}]},{"id":"8685e11e-484b-494b-b17b-9b84477e7f19","topic":"除法电路","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"db4f6199-ca7e-4248-962a-6cba6a693ba0","topic":"R ÷ Y = Q...R / ACC ÷ X = MQ ... ACC","expanded":true,"style":{"background":"#FF9595"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-0bc998ed2cf6d8.png","width":434.67,"height":253.97},"children":[{"id":"785ba065-bedd-4e01-8776-63c118f12343","topic":"定点小数","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"959c40bf-e857-4224-8b9f-6f3e59152cc9","topic":"图示","expanded":true,"style":{"background":"#FF9595"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-08c3a2414c6569.png","width":457.12,"height":229.89}}]},{"id":"0011450b-232e-4b7f-90cb-e5be97774798","topic":"定点整数","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"95824c17-7ba0-4e76-9d28-7f922f6b2ac6","topic":"图示","expanded":true,"style":{"background":"#FFABD5"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-7cdaaf53e2c0b3.png","width":456.58,"height":275.16}}]},{"id":"e31563ae-969c-481b-9b04-8b0450676c48","topic":"复习：Q中写值0或1，然后左移","expanded":true,"icons":["emoji:💬"],"style":{"borderStyle":"dashed","borderColor":"#F59E0B"}}]}]},{"id":"190cc4f2-156e-4139-b822-45bdb00e33a5","topic":"总结：","expanded":true,"children":[{"id":"0d0eaf6e-d876-4d0f-bedb-7b4dc02edaa5","topic":"乘法、除法基本结构：","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"d165d145-ce72-4352-922a-0a044516661b","topic":"ALU：实现加减法，能够求[-补码]","expanded":true,"style":{"background":"#FF9595"}},{"id":"a301bb8e-7e7f-49bb-a9df-b25cc4e04294","topic":"具有逻辑/算术移位功能的寄存器","expanded":true,"style":{"background":"#FF9595"}},{"id":"448ffa54-292b-4093-bb1b-6d09fda359c8","topic":"可以控制左右移/加减/读写信号发出的控制逻辑","expanded":true,"style":{"background":"#FF9595"}},{"id":"19274c83-ec7b-4329-8adf-0e9dc79180fc","topic":"计数器Cn：记录还剩余几轮处理","expanded":true,"style":{"background":"#FF9595"}}]}]}]},{"id":"7fce4b05-b3cc-4180-834b-2f3859c478b6","topic":"定点数的转换","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-84a338e255dc39.svg","width":64,"height":64},"children":[{"id":"67ff0b9c-b25f-46b5-a2df-99958021acc2","topic":"强制类型转化","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"5a3da868-be47-4f86-8375-4e943d3a485f","topic":"原则：不改变具体数值，只改变解释方式","expanded":true,"style":{"background":"#8EDDF9"}},{"id":"c7c9a2a1-828e-4489-9715-b858a05e6575","topic":"例如：","expanded":true,"children":[{"id":"58a41e37-d8f1-4a19-a624-a5e6e48374b4","topic":"unsigned int 转 int 示例","expanded":true,"code":{"lang":"cpp","code":"#include <iostream>\n\nint main() {\n    unsigned int x = 0x80000001;\n    int x1 = x;\n    printf(\"(%lu) - %u\", sizeof(unsigned int ),  x);\n    printf(\" - (%lu) - %d\\n\", sizeof(int ),  x1);\n    unsigned int y = 0xFFFFFFFF;\n    int y1 = y;\n    printf(\"(%lu) - %u\", sizeof(unsigned int ),  y);\n    printf(\" - (%lu) - %d\", sizeof(int ),  y1);\n}\n// 得出结论：unsigned int 转为 int 类型\n// 是直接存储为补码形式的","tokens":[[{"text":"#include ","darkColor":"#C699E0"},{"text":"<iostream>","darkColor":"#94C977"}],[{"text":" "}],[{"text":"int","darkColor":"#74CBC4"},{"text":" ","darkColor":"#DEDBD2"},{"text":"main","darkColor":"#6EC0DF"},{"text":"()","darkColor":"#BAB5A8"},{"text":" ","darkColor":"#DEDBD2"},{"text":"{","darkColor":"#BAB5A8"}],[{"text":"    ","darkColor":"#DEDBD2"},{"text":"unsigned","darkColor":"#74CBC4"},{"text":" ","darkColor":"#DEDBD2"},{"text":"int","darkColor":"#74CBC4"},{"text":" ","darkColor":"#DEDBD2"},{"text":"x","darkColor":"#EEECE6"},{"text":" ","darkColor":"#DEDBD2"},{"text":"=","darkColor":"#BAB5A8"},{"text":" ","darkColor":"#DEDBD2"},{"text":"0x80000001","darkColor":"#E2B159"},{"text":";","darkColor":"#BAB5A8"}],[{"text":"    ","darkColor":"#DEDBD2"},{"text":"int","darkColor":"#74CBC4"},{"text":" ","darkColor":"#DEDBD2"},{"text":"x1","darkColor":"#EEECE6"},{"text":" ","darkColor":"#DEDBD2"},{"text":"=","darkColor":"#BAB5A8"},{"text":" ","darkColor":"#DEDBD2"},{"text":"x","darkColor":"#EEECE6"},{"text":";","darkColor":"#BAB5A8"}],[{"text":"    ","darkColor":"#DEDBD2"},{"text":"printf","darkColor":"#6EC0DF"},{"text":"(","darkColor":"#BAB5A8"},{"text":"\"(","darkColor":"#94C977"},{"text":"%lu","darkColor":"#E2B159"},{"text":") - ","darkColor":"#94C977"},{"text":"%u","darkColor":"#E2B159"},{"text":"\"","darkColor":"#94C977"},{"text":",","darkColor":"#BAB5A8"},{"text":" ","darkColor":"#DEDBD2"},{"text":"sizeof(","darkColor":"#BAB5A8"},{"text":"unsigned","darkColor":"#74CBC4"},{"text":" ","darkColor":"#DEDBD2"},{"text":"int","darkColor":"#74CBC4"},{"text":" ","darkColor":"#DEDBD2"},{"text":"),","darkColor":"#BAB5A8"},{"text":"  ","darkColor":"#DEDBD2"},{"text":"x","darkColor":"#EEECE6"},{"text":");","darkColor":"#BAB5A8"}],[{"text":"    ","darkColor":"#DEDBD2"},{"text":"printf","darkColor":"#6EC0DF"},{"text":"(","darkColor":"#BAB5A8"},{"text":"\" - (","darkColor":"#94C977"},{"text":"%lu","darkColor":"#E2B159"},{"text":") - ","darkColor":"#94C977"},{"text":"%d","darkColor":"#E2B159"},{"text":"\\n","darkColor":"#E67F9F"},{"text":"\"","darkColor":"#94C977"},{"text":",","darkColor":"#BAB5A8"},{"text":" ","darkColor":"#DEDBD2"},{"text":"sizeof(","darkColor":"#BAB5A8"},{"text":"int","darkColor":"#74CBC4"},{"text":" ","darkColor":"#DEDBD2"},{"text":"),","darkColor":"#BAB5A8"},{"text":"  ","darkColor":"#DEDBD2"},{"text":"x1","darkColor":"#EEECE6"},{"text":");","darkColor":"#BAB5A8"}],[{"text":"    ","darkColor":"#DEDBD2"},{"text":"unsigned","darkColor":"#74CBC4"},{"text":" ","darkColor":"#DEDBD2"},{"text":"int","darkColor":"#74CBC4"},{"text":" ","darkColor":"#DEDBD2"},{"text":"y","darkColor":"#EEECE6"},{"text":" ","darkColor":"#DEDBD2"},{"text":"=","darkColor":"#BAB5A8"},{"text":" ","darkColor":"#DEDBD2"},{"text":"0xFFFFFFFF","darkColor":"#E2B159"},{"text":";","darkColor":"#BAB5A8"}],[{"text":"    ","darkColor":"#DEDBD2"},{"text":"int","darkColor":"#74CBC4"},{"text":" ","darkColor":"#DEDBD2"},{"text":"y1","darkColor":"#EEECE6"},{"text":" ","darkColor":"#DEDBD2"},{"text":"=","darkColor":"#BAB5A8"},{"text":" ","darkColor":"#DEDBD2"},{"text":"y","darkColor":"#EEECE6"},{"text":";","darkColor":"#BAB5A8"}],[{"text":"    ","darkColor":"#DEDBD2"},{"text":"printf","darkColor":"#6EC0DF"},{"text":"(","darkColor":"#BAB5A8"},{"text":"\"(","darkColor":"#94C977"},{"text":"%lu","darkColor":"#E2B159"},{"text":") - ","darkColor":"#94C977"},{"text":"%u","darkColor":"#E2B159"},{"text":"\"","darkColor":"#94C977"},{"text":",","darkColor":"#BAB5A8"},{"text":" ","darkColor":"#DEDBD2"},{"text":"sizeof(","darkColor":"#BAB5A8"},{"text":"unsigned","darkColor":"#74CBC4"},{"text":" ","darkColor":"#DEDBD2"},{"text":"int","darkColor":"#74CBC4"},{"text":" ","darkColor":"#DEDBD2"},{"text":"),","darkColor":"#BAB5A8"},{"text":"  ","darkColor":"#DEDBD2"},{"text":"y","darkColor":"#EEECE6"},{"text":");","darkColor":"#BAB5A8"}],[{"text":"    ","darkColor":"#DEDBD2"},{"text":"printf","darkColor":"#6EC0DF"},{"text":"(","darkColor":"#BAB5A8"},{"text":"\" - (","darkColor":"#94C977"},{"text":"%lu","darkColor":"#E2B159"},{"text":") - ","darkColor":"#94C977"},{"text":"%d","darkColor":"#E2B159"},{"text":"\"","darkColor":"#94C977"},{"text":",","darkColor":"#BAB5A8"},{"text":" ","darkColor":"#DEDBD2"},{"text":"sizeof(","darkColor":"#BAB5A8"},{"text":"int","darkColor":"#74CBC4"},{"text":" ","darkColor":"#DEDBD2"},{"text":"),","darkColor":"#BAB5A8"},{"text":"  ","darkColor":"#DEDBD2"},{"text":"y1","darkColor":"#EEECE6"},{"text":");","darkColor":"#BAB5A8"}],[{"text":"}","darkColor":"#BAB5A8"}],[{"text":"// 得出结论：unsigned int 转为 int 类型","darkColor":"#908B7E"}],[{"text":"// 是直接存储为补码形式的","darkColor":"#908B7E"}]]},"note":"运行输出：\n(4) - 2147483649 - (4) - -2147483647\n(4) - 4294967295 - (4) - -1"}]}]},{"id":"8a53b9ef-a0ce-421e-9488-c41cf47d9a70","topic":"长整数变短整数","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"9337ef86-0474-4854-9472-0af152e760c9","topic":"高位截断，低位保留","expanded":true,"style":{"background":"#8EDDF9"}}]},{"id":"c959d0aa-fc91-46c6-8bd8-0f2b2f4a15aa","topic":"短整数变长整数","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"29c737ea-226d-4af4-84d8-3caa8ce9a0fc","topic":"符号扩展","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"3344597d-dc14-4eb1-9eaf-165c5a8d91b9","topic":"unsigned 就是直接补0","expanded":true,"style":{"background":"#8EDDF9"}},{"id":"287c34ba-265e-40f5-a89d-f5fe8618916d","topic":"short/int/long 就是按正负补0/补 1","expanded":true,"style":{"background":"#8EDDF9"}}]},{"id":"c53e9a1b-649e-463d-8fab-7e3c7ac79e0e","topic":"由 short 变为 unsigned int 的过程","expanded":true,"style":{"background":"#FFABD5"},"children":[{"id":"eb22d175-03a1-4f0f-9a56-aeb5c836f152","topic":"首先先把short【扩展】为int类型，然后再【转为】unsigned int的【表示方法】","expanded":true,"style":{"background":"#FFABD5"},"children":[{"id":"703b573a-deda-45b7-b4d4-fc2af92c777c","topic":"如果自己手动修改转化的方式：先转为unsigned再扩展，就会很系统默认的不一样","expanded":true,"style":{"background":"#FFABD5"}}],"code":{"lang":"c","code":"#include <stdio.h>\n\nint main() {\n    short x = 0xf000;\n    unsigned short num1 = (unsigned short) x;\n    int num2 = (int) x;\n    unsigned int num3 = (unsigned int) x;\n    unsigned int num4 = (unsigned int)((unsigned short)x);\n    printf(\"num1 = 0x%x --- num1 = %u --- sizeof(num1) = %ld\\n\",\n            num1, num1, sizeof(num1));\n    printf(\"num2 = 0x%x --- num2 = %d\\n\", num2, num2);\n    printf(\"num3 = 0x%x --- num3 = %u\\n\", num3, num3);\n    printf(\"num4 = 0x%x --- num4 = %u --- sizeof(num4) = %ld\\n\",\n            num4, num4, sizeof(num4));\n}","tokens":[[{"text":"#include ","darkColor":"#C699E0"},{"text":"<stdio.h>","darkColor":"#94C977"}],[{"text":" "}],[{"text":"int","darkColor":"#74CBC4"},{"text":" ","darkColor":"#DEDBD2"},{"text":"main","darkColor":"#6EC0DF"},{"text":"()","darkColor":"#BAB5A8"},{"text":" ","darkColor":"#DEDBD2"},{"text":"{","darkColor":"#BAB5A8"}],[{"text":"    ","darkColor":"#DEDBD2"},{"text":"short","darkColor":"#74CBC4"},{"text":" x ","darkColor":"#DEDBD2"},{"text":"=","darkColor":"#BAB5A8"},{"text":" ","darkColor":"#DEDBD2"},{"text":"0xf000","darkColor":"#E2B159"},{"text":";","darkColor":"#BAB5A8"}],[{"text":"    ","darkColor":"#DEDBD2"},{"text":"unsigned","darkColor":"#74CBC4"},{"text":" ","darkColor":"#DEDBD2"},{"text":"short","darkColor":"#74CBC4"},{"text":" num1 ","darkColor":"#DEDBD2"},{"text":"=","darkColor":"#BAB5A8"},{"text":" ","darkColor":"#DEDBD2"},{"text":"(","darkColor":"#BAB5A8"},{"text":"unsigned","darkColor":"#74CBC4"},{"text":" ","darkColor":"#DEDBD2"},{"text":"short","darkColor":"#74CBC4"},{"text":")","darkColor":"#BAB5A8"},{"text":" x","darkColor":"#DEDBD2"},{"text":";","darkColor":"#BAB5A8"}],[{"text":"    ","darkColor":"#DEDBD2"},{"text":"int","darkColor":"#74CBC4"},{"text":" num2 ","darkColor":"#DEDBD2"},{"text":"=","darkColor":"#BAB5A8"},{"text":" ","darkColor":"#DEDBD2"},{"text":"(","darkColor":"#BAB5A8"},{"text":"int","darkColor":"#74CBC4"},{"text":")","darkColor":"#BAB5A8"},{"text":" x","darkColor":"#DEDBD2"},{"text":";","darkColor":"#BAB5A8"}],[{"text":"    ","darkColor":"#DEDBD2"},{"text":"unsigned","darkColor":"#74CBC4"},{"text":" ","darkColor":"#DEDBD2"},{"text":"int","darkColor":"#74CBC4"},{"text":" num3 ","darkColor":"#DEDBD2"},{"text":"=","darkColor":"#BAB5A8"},{"text":" ","darkColor":"#DEDBD2"},{"text":"(","darkColor":"#BAB5A8"},{"text":"unsigned","darkColor":"#74CBC4"},{"text":" ","darkColor":"#DEDBD2"},{"text":"int","darkColor":"#74CBC4"},{"text":")","darkColor":"#BAB5A8"},{"text":" x","darkColor":"#DEDBD2"},{"text":";","darkColor":"#BAB5A8"}],[{"text":"    ","darkColor":"#DEDBD2"},{"text":"unsigned","darkColor":"#74CBC4"},{"text":" ","darkColor":"#DEDBD2"},{"text":"int","darkColor":"#74CBC4"},{"text":" num4 ","darkColor":"#DEDBD2"},{"text":"=","darkColor":"#BAB5A8"},{"text":" ","darkColor":"#DEDBD2"},{"text":"(","darkColor":"#BAB5A8"},{"text":"unsigned","darkColor":"#74CBC4"},{"text":" ","darkColor":"#DEDBD2"},{"text":"int","darkColor":"#74CBC4"},{"text":")((","darkColor":"#BAB5A8"},{"text":"unsigned","darkColor":"#74CBC4"},{"text":" ","darkColor":"#DEDBD2"},{"text":"short","darkColor":"#74CBC4"},{"text":")","darkColor":"#BAB5A8"},{"text":"x","darkColor":"#DEDBD2"},{"text":");","darkColor":"#BAB5A8"}],[{"text":"    ","darkColor":"#DEDBD2"},{"text":"printf","darkColor":"#6EC0DF"},{"text":"(","darkColor":"#BAB5A8"},{"text":"\"num1 = 0x","darkColor":"#94C977"},{"text":"%x","darkColor":"#E2B159"},{"text":" --- num1 = ","darkColor":"#94C977"},{"text":"%u","darkColor":"#E2B159"},{"text":" --- sizeof(num1) = ","darkColor":"#94C977"},{"text":"%ld","darkColor":"#E2B159"},{"text":"\\n","darkColor":"#E67F9F"},{"text":"\"","darkColor":"#94C977"},{"text":",","darkColor":"#BAB5A8"}],[{"text":"            num1","darkColor":"#6EC0DF"},{"text":",","darkColor":"#BAB5A8"},{"text":" num1","darkColor":"#6EC0DF"},{"text":",","darkColor":"#BAB5A8"},{"text":" ","darkColor":"#6EC0DF"},{"text":"sizeof(","darkColor":"#BAB5A8"},{"text":"num1","darkColor":"#6EC0DF"},{"text":"));","darkColor":"#BAB5A8"}],[{"text":"    ","darkColor":"#DEDBD2"},{"text":"printf","darkColor":"#6EC0DF"},{"text":"(","darkColor":"#BAB5A8"},{"text":"\"num2 = 0x","darkColor":"#94C977"},{"text":"%x","darkColor":"#E2B159"},{"text":" --- num2 = ","darkColor":"#94C977"},{"text":"%d","darkColor":"#E2B159"},{"text":"\\n","darkColor":"#E67F9F"},{"text":"\"","darkColor":"#94C977"},{"text":",","darkColor":"#BAB5A8"},{"text":" num2","darkColor":"#6EC0DF"},{"text":",","darkColor":"#BAB5A8"},{"text":" num2","darkColor":"#6EC0DF"},{"text":");","darkColor":"#BAB5A8"}],[{"text":"    ","darkColor":"#DEDBD2"},{"text":"printf","darkColor":"#6EC0DF"},{"text":"(","darkColor":"#BAB5A8"},{"text":"\"num3 = 0x","darkColor":"#94C977"},{"text":"%x","darkColor":"#E2B159"},{"text":" --- num3 = ","darkColor":"#94C977"},{"text":"%u","darkColor":"#E2B159"},{"text":"\\n","darkColor":"#E67F9F"},{"text":"\"","darkColor":"#94C977"},{"text":",","darkColor":"#BAB5A8"},{"text":" num3","darkColor":"#6EC0DF"},{"text":",","darkColor":"#BAB5A8"},{"text":" num3","darkColor":"#6EC0DF"},{"text":");","darkColor":"#BAB5A8"}],[{"text":"    ","darkColor":"#DEDBD2"},{"text":"printf","darkColor":"#6EC0DF"},{"text":"(","darkColor":"#BAB5A8"},{"text":"\"num4 = 0x","darkColor":"#94C977"},{"text":"%x","darkColor":"#E2B159"},{"text":" --- num4 = ","darkColor":"#94C977"},{"text":"%u","darkColor":"#E2B159"},{"text":" --- sizeof(num4) = ","darkColor":"#94C977"},{"text":"%ld","darkColor":"#E2B159"},{"text":"\\n","darkColor":"#E67F9F"},{"text":"\"","darkColor":"#94C977"},{"text":",","darkColor":"#BAB5A8"}],[{"text":"            num4","darkColor":"#6EC0DF"},{"text":",","darkColor":"#BAB5A8"},{"text":" num4","darkColor":"#6EC0DF"},{"text":",","darkColor":"#BAB5A8"},{"text":" ","darkColor":"#6EC0DF"},{"text":"sizeof(","darkColor":"#BAB5A8"},{"text":"num4","darkColor":"#6EC0DF"},{"text":"));","darkColor":"#BAB5A8"}],[{"text":"}","darkColor":"#BAB5A8"}]]},"note":"运行输出：\nnum1 = 0xf000 --- num1 = 61440 --- sizeof(num1) = 2\nnum2 = 0xfffff000 --- num2 = -4096\nnum3 = 0xfffff000 --- num3 = 4294963200\nnum4 = 0xf000 --- num4 = 61440 --- sizeof(num4) = 4"}]}]},{"id":"08e8b6f4-c482-4f48-a44a-8fea3ebe7354","topic":"数据存储","expanded":true,"children":[{"id":"8346f788-9b9b-439f-881e-5f91479036e4","topic":"大小端模式","expanded":true,"children":[{"id":"217dacbf-39aa-4834-b36d-6770fb424a85","topic":"大端模式","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"81cc2151-8370-4866-ab18-9af586a5b46d","topic":"最高有效字节放在低地址部分","expanded":true,"style":{"background":"#FF9595"}},{"id":"cf88e6c4-f703-4cdc-9fa2-bb7737915897","topic":"符合人类阅读习惯","expanded":true,"style":{"background":"#FF9595"}}]},{"id":"d267965b-d1fd-4fc1-b947-18f56cf54a14","topic":"小端模式","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"30c09ba6-d6cc-4a62-bdeb-f5621058e5f9","topic":"最高有效字节放在高地址部分","expanded":true,"style":{"background":"#FF9595"}},{"id":"61b05520-aac9-4608-a06c-d0f0853abc44","topic":"符合机器取值顺序（先取低有效位再取高有效位）","expanded":true,"style":{"background":"#FF9595"}}]},{"id":"5601550c-5b38-4685-86b9-ecbd048ba203","topic":"记忆口诀：","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"84011fa9-4dde-4eac-a9d3-77a6f0fbebe6","topic":"大人小机","expanded":true,"style":{"background":"#FDD834"}}]},{"id":"c3a5ed9a-5b9d-4808-9040-76ecfa691a1c","topic":"Intel唯一在追求小端，【与OS无关】，与硬件制造厂商的选择有关","expanded":true,"style":{"background":"#FFABD5"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-81036c16173d6e.png","width":433,"height":80}}]},{"id":"10651b25-4d2e-4428-a1f1-5f09ff56cc7e","topic":"边界对齐","expanded":true,"children":[{"id":"a8561907-dc5b-4bba-ae6f-f00053d3bbd4","topic":"边界对齐方式","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"9112fa1f-d413-407f-83bc-b87ec8abd424","topic":"边界对齐方式，最大可能满足一次访存可以直接获得一个字的数据","expanded":true,"style":{"background":"#FDD834"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-2cf5c8835e875c.png","width":320.87,"height":167.41},"children":[{"id":"41633b20-2836-4f0a-a9cb-c62f2c149b27","topic":"空间换时间","expanded":true},{"id":"422aeed2-e77f-4754-a339-a09b41f11cf6","topic":"RISC通常采用边界对齐，可以适应指令流水","expanded":true,"style":{"background":"#8EDDF9"}}]}]},{"id":"dfed7831-1135-44c0-b848-472e574e47d7","topic":"边界不对齐方式","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"63bd2e77-bf95-405f-8d6f-92ab87daab76","topic":"边界不对齐方式可能2B的半字都需要2次访存","expanded":true,"style":{"background":"#FF9595"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-f3280b0fa42d5c.png","width":300.07,"height":110.86},"children":[{"id":"d5876af6-e66e-46b5-9d58-d6e62fb4de9b","topic":"时间换空间","expanded":true}]}]}]}]},{"id":"1eb29ede-6b50-45cd-8da0-d35cf09a1df5","topic":"考频：高","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"dbebc0a2-3fe0-40b9-9a37-ec7f4a1cf300","topic":"09、12*2、16、18*2、19、20、11大","expanded":true}]}]},{"id":"1496d7df-2cbd-4080-a891-d1f248a693db","topic":"浮点数","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-939c1c28fe2e94.svg","width":64,"height":64},"children":[{"id":"c5f84932-97f8-4277-a331-f734aeb35e11","topic":"考频：高","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"d5319783-f91f-4596-a072-e1178b63e64c","topic":"09-15、18、20-22、17大","expanded":true}]},{"id":"c1282bc8-ea1a-4ad8-9ec4-efc8f19a6684","topic":"通常表示方法","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"87810fd1-b57a-40e5-8246-14d52b983b2b","topic":"浮点数真值公式","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"09f9ed04-f85c-43e4-a8d4-a984b222bad9","topic":"其中 R为基数（即R进制），E和M都是有符号定点数。E称为阶码，M称为尾码","expanded":true,"style":{"background":"#8EDDF9"}},{"id":"b40eb70a-b1f9-4961-9b2d-030f2e21c5af","topic":"E为定点整数，M为定点小数","expanded":true,"style":{"background":"#8EDDF9"}},{"id":"cae29dfc-7e23-4040-92de-3966638f9fcf","topic":"其中E和M可以用补码或原码来表示","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"00ce5aa0-85f4-400e-b405-38b0693a1f17","topic":"注意计算十进制值的时候补码为负要转为对应真值在写值","expanded":true,"style":{"background":"#FFABD5"}}]}],"formula":{"tex":"N = (-1)^S \\times R^E \\times M","displayMode":true,"mathml":"<span class=\"katex\"><math xmlns=\"http://www.w3.org/1998/Math/MathML\" display=\"block\"><semantics><mrow><mi>N</mi><mo>=</mo><mo stretchy=\"false\">(</mo><mo>−</mo><mn>1</mn><msup><mo stretchy=\"false\">)</mo><mi>S</mi></msup><mo>×</mo><msup><mi>R</mi><mi>E</mi></msup><mo>×</mo><mi>M</mi></mrow><annotation encoding=\"application/x-tex\">N = (-1)^S \\times R^E \\times M</annotation></semantics></math></span>"}},{"id":"11136edc-85ba-47e0-917c-1c7d38ddbe04","topic":"一般格式","expanded":true,"style":{"background":"#8EDDF9"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-03b0dc2832e4ed.png","width":306.71,"height":96.39}},{"id":"ad492c67-5c4e-4c03-9fd2-04c95eeb9385","topic":"尾数规格化","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"20c659ae-5680-4b54-9999-fc343a96c004","topic":"原码","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"d0a8e5ab-a532-4daa-80de-e9f753996a2c","topic":"浮点数的尾数部分的最高位一定是“有效数”位","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"86c847af-fa16-4f86-8711-c6ce389be9d5","topic":"负数： 1, 1 ....","expanded":true,"style":{"background":"#8EDE99"}},{"id":"aeddfa98-dc89-457e-bfc4-681317b2f846","topic":"正数：0, 1....","expanded":true,"style":{"background":"#8EDE99"}}]}]},{"id":"9fde0c9b-7e0e-477d-a98d-8954f5292497","topic":"补码","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"1488e7af-a727-483e-9904-61203f782fa6","topic":"浮点数的尾数部分最高位和符号位一定不同","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"483d8df1-4a91-4eff-a241-4d7b90959f83","topic":"负数：1, 0 ...","expanded":true,"style":{"background":"#8EDE99"}},{"id":"b673b294-6ae7-4332-a8b8-9402f4f61120","topic":"正数：0, 1....","expanded":true,"style":{"background":"#8EDE99"}}]}]},{"id":"ed9df134-7a02-4447-8751-352be69b15ad","topic":"尾数、阶码规格化","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"018d42f9-8ca7-4de1-9f37-7b9d2ccfed27","topic":"例如 原码 ( M = 1,011 ，E = 0, 000 0010 )，则应该变为：( M = 1,110 ，E = 0, 000 0001），M左移了，E对应减小","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"3ea76c8a-6c03-426c-88e0-08d6b4bbdec6","topic":"尾数左移：左归","expanded":true},{"id":"2fa3f6b1-9e74-46ca-99ba-bad0a17fa677","topic":"尾数右移：右归","expanded":true}]}]}]},{"id":"84fca804-ef6f-4245-b808-4deaa8926b04","topic":"计算","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"de42a8bf-3f0b-48e7-b182-0d4ac155220b","topic":"在进行加减计算中，采用双符号位进行计算，可以挽救很多溢出","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"551b55e5-49a5-42dc-83fb-526213248761","topic":"例如：符号位 00 和 符号位 00 相加的结果是 0 1，则可以把尾数右移一位，阶码 +1 来进行挽救","expanded":true,"style":{"background":"#8EDE99"}}]}]}]},{"id":"e8e1ddc6-82a6-4ee7-b2d7-14d8e55ac09e","topic":"浮点数的运算","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"e30454b0-50bc-4370-b22f-a9c0ca89a949","topic":"对阶","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"0290558b-a043-4ecb-8b56-a6a6e03893bc","topic":"首先把两个浮点数的阶码对齐，以小阶向大阶看齐","expanded":true,"style":{"background":"#8EDE99"}}]},{"id":"d650e990-da24-44d3-9e5c-66402720166b","topic":"尾数求和","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"3874d5cb-19e1-4c28-a908-a8367c82a5c3","topic":"尾数按定点数的加减法进行运算","expanded":true,"style":{"background":"#8EDE99"}}]},{"id":"94cd2494-a6ee-4deb-8193-cf7ed5ef1edb","topic":"规格化","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"4a70a692-e8df-4c7b-abea-3b50a61e633f","topic":"尾数 > 0时，规格化为00.1xxxx\n尾数 < 0时，规格化为 11.0xxxx","expanded":true,"style":{"background":"#8EDE99"}}]},{"id":"737869dc-c97c-42bd-9e84-0e7f8781c30b","topic":"舍入","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"c4460e8d-f454-4ade-80b9-525ed1faa439","topic":"\"0\"舍\"1\"入法：","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"b4744fdd-8779-4ae8-b1c0-5bec5a4f7bbe","topic":"尾数右移，如果被【移除的最高位】为 0，那么就舍去。如果被【移除的最高位】的是 1，那么就让尾数 + 1","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"d0abd736-f276-44fa-9338-42de6a824d97","topic":"10100","expanded":true,"children":[{"id":"afc8d58d-de8d-4a9e-8a19-19a015ae60d6","topic":"右移3次：","expanded":true,"children":[{"id":"ca91cc71-297d-41be-9b53-81e59a49298c","topic":"10 + 1 = 11","expanded":true}]},{"id":"bffc2972-2fa6-4a57-8805-6d68e3af7a9e","topic":"右移1次：","expanded":true,"children":[{"id":"dcf40cca-06ac-4386-ad09-3f74fdedf867","topic":"1010","expanded":true}]}]},{"id":"0b13cc6b-dffb-414c-bbf1-dc430e1d6c39","topic":"此时+1后可能还需要进行规格化","expanded":true}]}]},{"id":"954adbe0-d483-4cb9-88ec-43a331e8cc0d","topic":"恒置为\"1\"法：","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"069a1735-5c04-4abf-beac-cb436f658f4b","topic":"尾数右移，不管如何移动，尾数最末位一定为 1","expanded":true,"style":{"background":"#8EDE99"}}]}]},{"id":"254a1421-1f90-484b-af48-9c3bda60142e","topic":"溢出判断","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"73d7aa44-8471-400b-a0e8-c2e73ff4a0e1","topic":"双符号时","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"8a346215-aee2-47f2-a729-a08d333138cc","topic":"如果阶码出现了“01”，说明出现了上溢，进入中断处理","expanded":true,"style":{"background":"#8EDE99"}},{"id":"66030cf1-02dc-4bf1-8617-ccb34271cfe4","topic":"如果阶码出现了“10”，说明出现了下溢，按 0 处理","expanded":true,"style":{"background":"#8EDE99"}}]}]},{"id":"9c898976-c438-470e-b6d9-a60fad2ebb32","topic":"一般考试的运算是不会计算IEEE754模式的","expanded":true,"style":{"background":"#7986CB"},"children":[{"id":"4213745a-e207-4986-aa15-bb2032941968","topic":"计算只有09选择题考了","expanded":true}]}]},{"id":"78311d51-91f2-40be-9431-fc4c893c3f3a","topic":"IEEE 754","expanded":true,"icons":["star:red"],"style":{"background":"#FDD834"},"children":[{"id":"d68be9bf-4937-42c5-afbc-976ce666dc85","topic":"一般格式","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"667bd3fb-0754-4aae-b8ef-5a6f07bdee2f","topic":"<符号位、阶码、尾数>","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"4a698d58-1885-4bf1-b25b-225cfa9cc06f","topic":"【符号位】 1 为负，0为正","expanded":true,"style":{"background":"#FDD834"}},{"id":"66bbac97-b17d-4b70-9cee-bfcca8008081","topic":"【阶码】部分使用特殊的移码计算","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"8df61f91-0387-47c0-8103-6ab2ab92dbc4","topic":"之前的移码（改符号位）：1,000 0001 + 1000 0000 = 0,000 0001","expanded":true},{"id":"97aa06ce-ab8c-4ce8-8478-6543eeda17d0","topic":"直接在补码那里进行加法运算，例如：1, 000 0001 + 0111 1111(偏) = 0000 0000","expanded":true,"style":{"background":"#8EDE99"}}],"formula":{"tex":"\\text{偏置值} = 2^{n-1} - 1","displayMode":true,"mathml":"<span class=\"katex\"><math xmlns=\"http://www.w3.org/1998/Math/MathML\" display=\"block\"><semantics><mrow><mtext>偏置值</mtext><mo>=</mo><msup><mn>2</mn><mrow><mi>n</mi><mo>−</mo><mn>1</mn></mrow></msup><mo>−</mo><mn>1</mn></mrow><annotation encoding=\"application/x-tex\">\\text{偏置值} = 2^{n-1} - 1</annotation></semantics></math></span>"}},{"id":"216a49ff-9065-47e9-9476-758c30d3ecb3","topic":"【尾数】用原码表示，且隐藏最高位的1","expanded":true,"style":{"background":"#FDD834"}}]},{"id":"0fa6dc67-3ce4-4f0e-a93e-a018aaf8b6ce","topic":"不同精度","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"ff2fa584-fa20-4833-8d7b-6d3ef8f65d9d","topic":"图示","expanded":true,"style":{"background":"#8EDE99"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-57696e7958cb78.png","width":494.3,"height":404.22}}]},{"id":"2292c7c3-7c4a-48d7-bf8a-ea8f772975af","topic":"特殊的浮点数情况","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"00720619-e37e-451d-8341-691ce712c5c3","topic":"图示","expanded":true,"style":{"background":"#8EDE99"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-fb2c9928e01bb5.png","width":491.36,"height":168.2},"children":[{"id":"b3214aff-2b05-461e-9665-ce601a7e9665","topic":"8bit原码表示的阶码可以表示 0 ~ 255，在IEEE754中，0和255分别代表了特殊含义。","expanded":true},{"id":"07ac9c24-b6aa-4b14-ae93-f4e1a39bc458","topic":"故IEEE754的阶码取值范围是： (1 ~ 254) - 127 = -126 ~ 127","expanded":true,"style":{"background":"#FF9595"}},{"id":"c51e018d-2140-4030-92fa-29f95c9c268c","topic":"为什么全0是-127，全1是-128？","expanded":true,"style":{"background":"#FFABD5"},"children":[{"id":"18c422b3-d4d6-47ca-bb1e-e4cf80194a12","topic":"IEEE754的阶码在这个图基础上全部进行了-1","expanded":true,"style":{"background":"#FFABD5"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-e3d3dab9387c7d.png","width":470.93,"height":300.85}}]}]}]}]}]},{"id":"035b4186-5e71-4a48-891e-73b892fbb608","topic":"举个举例：","expanded":true,"children":[{"id":"2646564d-6cd0-4cd0-be3e-cef84252834f","topic":"图示","expanded":true,"style":{"background":"#FDD834"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-172f475115611f.png","width":533.6,"height":387.64},"children":[{"id":"74c3d24b-0ced-42de-9efe-7784b19da685","topic":"IEEE 754 浮点数 - 在线工具","expanded":true,"hyperlink":"https://www.toolhelper.cn/Digit/FractionConvert"}]}]},{"id":"21708cff-844d-47c0-b61b-14d1905b4366","topic":"类型转换","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"9f0a3c4f-c993-4b68-b20f-2b652ca7d498","topic":"图示","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-f85860e150b2ba.png","width":717,"height":445}}]}]},{"id":"8daa0929-59a1-42ce-a4c7-5e188a57a21c","topic":"END","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-ac155e6bc1bf7a.svg","width":64,"height":64}}]},"relations":[{"id":"73b644be-2a1b-4ebd-8749-88e52f2f65fd","from":"940912c1-47b2-4efd-be87-a2f228b161e4","to":"049cbabf-46e7-470c-8f76-24de2d86b57c","bidirectional":false,"label":"1. 多了辅助位 \n2. 加法规则变了\n3. 多了一次加法"}],"summaries":[{"id":"810e01dd-5a52-4ad5-9618-eccf1cdf8ea0","parentId":"db1ec404-7291-4bad-88be-b8642d3320b5","start":3,"end":3,"label":"例如：真值 +5 即机器数 0,101"},{"id":"b8c76c77-a123-4633-a0b6-514355a0b3c5","parentId":"8e4f6f25-806a-4457-a614-ff5f42708556","start":1,"end":1,"label":"因为1 0000 000 = 0 0000 000按位取反 + 1，但是 +0 是正数，没有这个运算规则"},{"id":"90a7d251-ce60-475c-976d-b67437203b25","parentId":"c33db92d-be98-4898-bcda-2a6e0b1acea5","start":0,"end":1,"label":""},{"id":"1fc33092-f0ec-46f6-a134-935673166913","parentId":"cd4f0376-f053-494a-9805-5cb2e28a7c5f","start":0,"end":0,"label":"注意：是左边添 1，右边添 0"},{"id":"c978d0c4-aa2d-4399-b822-d1b9e4b69c31","parentId":"11c4e63e-66c0-43b6-b0f9-0596727eb551","start":0,"end":2,"label":"X * MQ = ( ACC, MQ )"},{"id":"d09e914d-2647-4aa9-b91c-408f1bb2c5ce","parentId":"940912c1-47b2-4efd-be87-a2f228b161e4","start":3,"end":3,"label":""},{"id":"01877a94-a0a0-4c0e-8836-ee498afacdc7","parentId":"049cbabf-46e7-470c-8f76-24de2d86b57c","start":3,"end":3,"label":""},{"id":"ae2bdd3e-295d-458d-9a19-067cd9773cd5","parentId":"34d73914-826f-48fe-84b4-ea2cc96be0b9","start":0,"end":2,"label":"ACC ÷ X = MQ ... ACC"},{"id":"a759cfe4-1a9c-4a9a-8641-fde5046ecc25","parentId":"8699419a-aea4-4538-acd5-8289aeea6a35","start":1,"end":1,"label":""},{"id":"039e736c-e745-49cd-adc4-c4807d06b3d3","parentId":"c1b59f76-63d7-4268-9e4c-ea00261a327f","start":0,"end":1,"label":""},{"id":"8bb145de-9bf3-427e-b0ec-73fa09f821b9","parentId":"32103fa7-3509-40df-b6f2-9f0201d4e18c","start":0,"end":1,"label":"随后进行下一次的运算"},{"id":"e00d70ca-1555-41fc-9ec0-0cb541fd2a07","parentId":"8346f788-9b9b-439f-881e-5f91479036e4","start":1,"end":1,"label":""},{"id":"ae21f8dd-1b0d-456d-9e99-2d8219243e6e","parentId":"94cd2494-a6ee-4deb-8193-cf7ed5ef1edb","start":0,"end":0,"label":"补码"}],"boundaries":[{"id":"2516d503-c667-4a3a-beba-22466a23288a","parentId":"07b4bb25-fa93-4e46-b823-1f47abe8eccd","start":0,"end":1,"label":"MQ有辅助位，ACC、X均为双符号位"},{"id":"cf0174cf-8cba-4a5d-afe0-4a731f3a10bd","parentId":"be469c91-b5a8-4f9d-975e-52fa5e7ff6a0","start":0,"end":0,"label":"前提"}]}}},{"id":"94b3b7f5-39d8-4517-af06-a00e517cbb5e","topic":"第三章 存储系统","expanded":true,"nestedMap":{"src":"kaoyan/408/computer-organization/co-00-sheet3","expanded":false,"maxHeight":260,"doc":{"format":"brushup-mindmap-v1","id":"co-00-sheet3","title":"⭐️第三章 存储系统","structure":"timeline-h","theme":"auto","root":{"id":"e6ab2807e2785aebf6acdb666c","topic":"第三章 存储系统","expanded":true,"children":[{"id":"15f9ae40b8c988f8c74cc9383c","topic":"存储器特点","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-0eb260ceca6ca7.svg","width":64,"height":64},"children":[{"id":"7e5a6e65287bc5c9b813285742","topic":"分类：","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"65f8ec9165a9aeec78a0987feb","topic":"按作用：","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"0dfa32cf-7d20-477c-93dd-1ff64880b720","topic":"高级缓冲存储器","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"90f88ad7-4115-4aad-a74f-149849db9490","topic":"【即Cache】，位于CPU和主存之间，使CPU能更快速的使用到里面的数据（Cache中的数据是主存中的副本，而缓冲区不是）","expanded":true,"style":{"background":"#8EDE99"}}]},{"id":"a068eb44345b2434022d6a91b0","topic":"主存储器","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"66f720e1-007b-4fcb-a286-fdba1d26938f","topic":"【即主存/内存】，存放计算机运行时需要的大量的数据，CPU可以直接与其进行访问，也可以和cache交换数据","expanded":true,"style":{"background":"#8EDE99"}}]},{"id":"bec565db-c1e8-41f9-a19d-068828354043","topic":"辅助存储器","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"3f9779dd-61a2-44e7-bbc0-47707f66f90d","topic":"【即辅存/外存】，不能与CPU进行直接信息交换","expanded":true,"style":{"background":"#8EDE99"}}]}]},{"id":"d55bf0be719adacf5d4b183914","topic":"按存储介质：","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"d5aaa9483cfa839b909cb8e78a","topic":"磁表面（磁盘磁带）、磁心存储器半导体存储器（MOS存储器）、光存储器（光盘）","expanded":true,"style":{"background":"#8EDDF9"}}]},{"id":"7d2a9c1a242a1364c13d3aca01","topic":"按存取方式：","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"32ead7c7-839a-474e-9860-9f9555e09b87","topic":"随机存取","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"0b69f34f0488862dde821bd4ac","topic":"RAM、ROM（只读存储器）","expanded":true,"style":{"background":"#EEEEEE"}}]},{"id":"c4801854-d34c-4ff4-a7ce-659656dcee1e","topic":"串行访问存储器","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"66f4aa80-c59c-4e3d-a345-da9382c99322","topic":"对存储单元进行读写时，根据其物理位置的先后进行寻址","expanded":true},{"id":"42772ccc-4180-4084-b428-013ed887b967","topic":"例如顺序存取（磁带）","expanded":true}]}]},{"id":"1ffa940ce6ea6b9c24b90aa1e5","topic":"按信息可保存性：","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"52b844042feab5b3fba0990d35","topic":"易失型（RAM断电后丢失）","expanded":true,"style":{"background":"#8EDE99"}},{"id":"a4be1d4f-0d4c-4dfa-812b-2d95d78252cd","topic":"非易失性（ROM断电后不丢失）","expanded":true,"style":{"background":"#8EDE99"}},{"id":"a6f27cd8-28d1-4573-9317-f741c39e3054","topic":"破坏性读出（DRAM芯片）","expanded":true,"style":{"background":"#8EDE99"}},{"id":"55ec71ad-1365-4038-8259-fb5026f1648b","topic":"非破坏性读出（SRAM芯片、DISK）","expanded":true,"style":{"background":"#8EDE99"}}]},{"id":"21546021-827b-48ad-9de3-32518ecb8cac","topic":"其他","expanded":true,"children":[{"id":"a735ff58-8669-4ef7-8ff3-301c45c1588c","topic":"DAM直接存取存储器","expanded":true,"children":[{"id":"5ad32722-7169-4fcd-8921-297419f9e60c","topic":"磁盘","expanded":true}]}]}]},{"id":"07db3136a478eaad95f96b623e","topic":"性能指标：","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"8b1827a23fa92e2c40650baa72","topic":"存储容量：","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"e18b26185e68911fe03dfb2a99","topic":"存储字数 * 字长","expanded":true,"style":{"background":"#8EDE99"}},{"id":"22284caad0d901d49506a979b7","topic":"主存存储容量","expanded":true,"children":[{"id":"bf783eeb0a0badaa7745eb3402","topic":"MAR位数：","expanded":true,"children":[{"id":"a1388c2e23586dda53724b0095","topic":"地址总线个数","expanded":true}]},{"id":"876aa82ce32ba3f4ba1e6841a6","topic":"MDR位数：","expanded":true,"children":[{"id":"0f5be373724bef32d3c318f618","topic":"数据总线个数","expanded":true}]}],"formula":{"tex":"2^{\\text{MAR位数}} \\times \\text{MDR位数}","displayMode":true,"mathml":"<span class=\"katex\"><math xmlns=\"http://www.w3.org/1998/Math/MathML\" display=\"block\"><semantics><mrow><msup><mn>2</mn><mtext>MAR位数</mtext></msup><mo>×</mo><mtext>MDR位数</mtext></mrow><annotation encoding=\"application/x-tex\">2^{\\text{MAR位数}} \\times \\text{MDR位数}</annotation></semantics></math></span>"}}]},{"id":"164ae0fc990afec0b997f818a7","topic":"单位成本：","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"376b2e2c5f0bd19a5481f95169","topic":"每位价格 = 总成本 / 总容量（bit)","expanded":true,"style":{"background":"#8EDE99"}}]},{"id":"c0791ff1b4096bfd18635b4b28","topic":"存储速度：","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"9fe9b11c7b983a0511801b2f16","topic":"存取时间：","expanded":true,"children":[{"id":"43fa59f5-37c3-427a-b8af-8fb26af5e33f","topic":"启动一次存储器到最终完成操作所经历的时间","expanded":true}]},{"id":"1c7aab955958702e36ecbad56c","topic":"存取周期：","expanded":true,"children":[{"id":"2bab786d4a8a52b3329809bd71","topic":"存取时间 + 恢复时间","expanded":true,"children":[{"id":"1d4df0c1-b125-4088-9012-a4e1c5794574","topic":"又称：连续读或者连续写所允许的最短时间间隔","expanded":true,"style":{"background":"#FFABD5"}}]}]},{"id":"3939f09cc5d99bef06e7994348","topic":"主存带宽：","expanded":true,"children":[{"id":"81381c44-581a-40af-9b04-c3f9bb390a02","topic":"数据传输率，表示每秒从主存进出信息的最大数量","expanded":true}]}]}]},{"id":"b9b9f6d2cc285beee84b59332a","topic":"多级存储系统：","expanded":true,"children":[{"id":"05cb398c58b8b1ca51123a22cb","topic":"图示","expanded":true,"style":{"background":"#FF9595"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-a98a2dd28fef47.png","width":321.93,"height":149.2},"children":[{"id":"9968c2ca-4a72-43fc-b802-064cd215ed60","topic":"图示","expanded":true,"style":{"background":"#FF9595"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-222b65fc712ecf.png","width":369.23,"height":140.38}}]}]},{"id":"f8ab38a7-fe98-429b-9f77-ece351f550b9","topic":"考频：低","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"079bdf1d-9cbd-4a46-9069-c5b1528536eb","topic":"11","expanded":true}]}]},{"id":"64b9e926b2ba17aaa5f9292cb2","topic":"SRAM、DRAM","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-127eb26f8b6f75.svg","width":64,"height":64},"children":[{"id":"049fdaec-dbc7-44cf-82f3-fec6b53ac213","topic":"考频：低","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"eaeabf62-d63a-473a-a093-5e27a55dbe1a","topic":"12、14、15、22","expanded":true}]},{"id":"b75a85cc8978e625ad4b6ab885","topic":"SRAM","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"d0109478-6116-44e0-8838-0bb6e921145e","topic":"Static Random Access Memory","expanded":true},{"id":"2e79f9dad26800f3e4188bb61a","topic":"存储元：\n（几个MOS)","expanded":true,"children":[{"id":"e629571b1c894e94926cf90786","topic":"双稳态触发管，6个MOS","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-031f2f854118b0.png","width":287.47,"height":201.6},"children":[{"id":"2ded8bcf-ad11-449b-9f52-354639146b1d","topic":"了解即可","expanded":true}]}]},{"id":"89e920c9d03bb699de47496f23","topic":"优点：","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"23ca5903669a327d37d3293b78","topic":"速度快，但是【集成度低、功耗大、用来组成高速缓存存储器】","expanded":true,"style":{"background":"#FF9595"}},{"id":"9f8b74f402a963a016a5d946fd","topic":"不需要进行刷新","expanded":true,"style":{"background":"#FF9595"}}]},{"id":"7ea5a990-77b7-4d84-9e78-f570b31f65ef","topic":"Cache","expanded":true,"icons":["emoji:💬"],"style":{"borderStyle":"dashed","borderColor":"#F59E0B"}}]},{"id":"90e8cf81bb580bdb03c2e9417c","topic":"DRAM","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"a48901db-6435-44cd-b93b-ba7adb2b5ce6","topic":"Dynamic Random Access Memory","expanded":true},{"id":"dbdb9657179bb8d661b57b81a6","topic":"存储元：","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"9dda684c594b7b0cafc3b9a668","topic":"栅极电容","expanded":true,"style":{"background":"#FDD834"}}]},{"id":"0739faaa213a90fb4872c826f0","topic":"采用技术：","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"33897a397eaa697900dd48c3d8","topic":"地址复用技术","expanded":true,"style":{"background":"#FDD834"}}]},{"id":"e75bae2861782db625d5c8beac","topic":"优点：","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"fc09d364626bba5c8d57589651","topic":"集成高、价格低、容量大、功耗低","expanded":true,"style":{"background":"#8EDE99"}}]},{"id":"c3c03eba-d07d-43b8-afd0-af9aa839bf77","topic":"在工作时存储器内容不会发生改变（即会进行刷新，所以内容不会发生丢失）","expanded":true,"style":{"background":"#FFABD5"}},{"id":"069e966b-c6e2-4b78-b575-e8c871a42e3c","topic":"现在DRAM被称为SDRAM（例如DDR3，DDR4）","expanded":true,"style":{"background":"#FFABD5"}},{"id":"96db02e65de9ddc6bd4f9a9a14","topic":"刷新：","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"cca8c5fe96f9e712ff2638e9d7","topic":"每次刷新多少存储单元：","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"a70a0bec87f8b70ec7214a34ea","topic":"【基础版】一次刷新一整行","expanded":true,"style":{"background":"#8EDDF9"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-0aba303d6ad441.png","width":250.61,"height":228.96},"children":[{"id":"39a07011-e827-42e6-9474-2c0bc68e0d4c","topic":"例如有20根地址线，则一共对应有1024 * 1024根选通线。","expanded":true,"style":{"background":"#8EDDF9"}},{"id":"07a9b88c-dc61-4c23-8c7c-8a7bccb45361","topic":"刷新顺序：从上到下选n个。每次刷新一行","expanded":true,"style":{"background":"#FF9595"}}]},{"id":"5e16139e-568b-4e89-8ba9-adf0f5e8279b","topic":"【行列存储版】把地址分布改为行地址+列地址的存储方式","expanded":true,"style":{"background":"#8EDDF9"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-812ed0853d024a.png","width":480.15,"height":240.08},"children":[{"id":"d09f5331-d3e0-47ee-9ac8-98f6a645e53d","topic":"例如有20根地址线，则有1024根行选通线，1024根列选通线 = 2048根选通线。","expanded":true,"style":{"background":"#8EDDF9"}},{"id":"321ccff2-33fc-48a7-bd26-376152232a4a","topic":"刷新顺序：从左到右，从上到下。每次选n个一起刷新","expanded":true,"style":{"background":"#FF9595"}}]}]},{"id":"5f883662ae4bbb241d8fb8fc10","topic":"刷新周期：","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"c66901c9d27948ed1a1489ad67","topic":"一般取2ms刷新一次","expanded":true,"style":{"background":"#8EDE99"}}]},{"id":"c4ba025b1859abcb43f309f659","topic":"刷新算法：","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"bc3a780afa3a845e0b86084efc","topic":"集中刷新：","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"49a257c8-53d2-47b8-a9e8-be6c29e433e8","topic":"在一个刷新周期内，在一个固定时间，停止其他操作，把【所有】的存储单元都进行刷新。","expanded":true,"style":{"background":"#8EDDF9"}},{"id":"8d36e866-c32e-49b3-bbf8-417bc9ccba67","topic":"“死时间”、“死区”","expanded":true,"style":{"background":"#FF9595"}}]},{"id":"d95827eaf6e993c91fccca321e","topic":"分散刷新：","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"b421d851-3d3c-4a11-aa21-7e85ace1b1bd","topic":"把每行的刷新分散到各个工作周期内，每个存储周期前半部分用于正常读写，后半部分用于刷新【某一行】（这一行是CPU安排的）","expanded":true,"style":{"background":"#8EDDF9"}},{"id":"a25ec623-d24e-46f4-9e0e-eb2121d8df51","topic":"加长了系统的存取周期","expanded":true,"style":{"background":"#FF9595"}}]},{"id":"5109e248a4eb595171114bc580","topic":"异步刷新：","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"d0b3794f-a6b6-4cc1-aea5-766345e2090c","topic":"即：集中刷新 + 分散刷新","expanded":true},{"id":"cebb4fdd-5e16-41ae-955a-36514c0c4336","topic":"将刷新周期除以行数，得到两次刷新操作之间的时间间隔 t，则每隔时间t进行一次刷新，刷新【一行】","expanded":true,"style":{"background":"#FF9595"}}]}]},{"id":"d1f8ac5e80f8fd30bc8829bf46","topic":"注意：","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"374b17e57c781043fe91bba342","topic":"透明度：","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"0f289f3289793cf39b76981b90","topic":"对CPU透明，不依赖外部的访问","expanded":true,"style":{"background":"#FDD834"}}]},{"id":"03e2d324-8dfc-41d9-ac88-2453dfdc2179","topic":"刷新单位：","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"ef346b74-af62-4c63-9a3c-8a4a3c1e5eb1","topic":"一行，行地址由CPU自行生成","expanded":true,"style":{"background":"#FDD834"}}]},{"id":"9ba86c32ccbb2725f1c09a783b","topic":"选片：","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"c3f9c17711592f2cd744da7b6b","topic":"不需要选片，对存储器中所有芯片都进行刷新","expanded":true,"style":{"background":"#FDD834"}}]}]}]},{"id":"6e7a8cc2-b740-415e-8b9b-8447252c37c5","topic":"内存","expanded":true,"icons":["emoji:💬"],"style":{"borderStyle":"dashed","borderColor":"#F59E0B"}}]},{"id":"9efb4da84e7aa35eb81f9a22d2","topic":"SRAM vs DRAM","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"78095a7807483107141b586a0e","topic":"图示","expanded":true,"style":{"background":"#8EDE99"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-a2c24d32a17806.png","width":551.69,"height":308.76},"children":[{"id":"f1f6beee-009b-4a50-87af-d34cd364b264","topic":"都是易失，只不过一个不需要刷新（SRAM)、一个需要刷新（DRAM)","expanded":true,"style":{"background":"#FDD834"}}]}]},{"id":"9d1a9b11e11b5b08a5ff28b89b","topic":"存储芯片的基本原理：","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"160884ae4c0b05a41927d8cfb2","topic":"栅极电容：","expanded":true,"style":{"background":"#FFABD5"},"children":[{"id":"abfcec19-0035-4d9e-8cca-2b3dfd4fa6d3","topic":"MOS管+电容","expanded":true,"style":{"background":"#FFABD5"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-b4c0cf9712c913.png","width":248.78,"height":152.92}}]},{"id":"7cb9d5f8587ae40dda7ff88473","topic":"存储体/存储单元：","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"2c5fba6a-3afa-4631-96a3-d411885f457d","topic":"图示","expanded":true,"style":{"background":"#8EDE99"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-2ad0d0e5332d6d.png","width":556.76,"height":186.89},"children":[{"id":"31756549-ff8f-4fda-ac5e-514f3a1bb334","topic":"存储体的一排连接了多个栅极电容，故CPU的一次读写单位即“一排栅极电容”，也即【一个存储字长/机器字长】","expanded":true,"style":{"background":"#8EDE99"}}]}]},{"id":"5d4b639a77699df0edf548dac1","topic":"存储芯片：","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"1ea1cbb4-6681-4bcb-afc4-6a9575ecd98f","topic":"图示","expanded":true,"style":{"background":"#FDD834"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-24d7f70cbb1ed2.png","width":693.11,"height":336.33},"children":[{"id":"4004becd-23f4-4810-b812-82322b6f5e22","topic":"存储芯片：","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"d972bbf4-9e98-4302-b3e9-b9b487f3e83e","topic":"一个存储芯片由多个字排列组成，每一排字对应一根【选通线】，即对应【MAR（地址）】中一个的数据。","expanded":true}]},{"id":"e4a051e3-1846-4b3a-b182-b6d93d788da1","topic":"控制电路：","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"6c042ed9-a829-4b59-91c2-ffe18bb9f5aa","topic":"当MAR、MDR、译码器的电平稳定过后才允许进行下一步操作","expanded":true}]},{"id":"a8107e98-4084-4bee-8655-2a6e4107a8de","topic":"片选线：","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"14cb2f22-d641-4cb3-8b2e-0145d5568c93","topic":"CS杠、CE杠(chip-select/enable)，如果此处的电平信号为低电平时，说明芯片可以工作，理应处理传递过来的命令","expanded":true}]},{"id":"50959110-1a61-4e1c-a7a7-b316cc6afa73","topic":"读/写控制线：","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"8659299a-1e5c-455b-8f9a-dcafe1ffb1e9","topic":"WE/RD杠，如果此时线是低电平，则说明允许读写，如果只有一个WE杠的话，则【低写高读】","expanded":true}]}]}]},{"id":"7e95fe50-5f7b-4c6e-a12d-8c453f86a2ba","topic":"存储芯片浓缩版：","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"ff8d7397-011c-4620-bcc6-37b3c9338d22","topic":"图示","expanded":true,"style":{"background":"#FDD834"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-66de57126b98b3.png","width":431.48,"height":303.23},"children":[{"id":"454733f9-3671-437a-86ff-42b0c42b4f0a","topic":"片选线：","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"c02f0c24-abbf-405c-9511-d2f4ce8dc401","topic":"地址复用技术：2根","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"c8920c88-59c5-4bb9-b8b1-6551ebd5a48b","topic":"DRAM","expanded":true,"style":{"background":"#8EDE99"}}]},{"id":"8110cda3-d3c1-47fb-8aaa-238375fb1990","topic":"否则：1根","expanded":true,"style":{"background":"#FF9595"}}]},{"id":"b339e89c-ad0a-4336-9c77-8177d79e24dc","topic":"读写线：","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"24fbecda-083c-45c4-9ff2-a79a3397a59c","topic":"看题目怎么说","expanded":true,"style":{"background":"#FF9595"}}]},{"id":"fe65905a-8096-43ff-b311-3b1ec8617506","topic":"地址线：","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"909180ba-396d-413d-94fe-27217230956f","topic":"地址复用：","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"67176730-1d96-4d7a-b3dc-a445552d1839","topic":"地址总线的个数/2","expanded":true,"style":{"background":"#FF9595"}}]},{"id":"ab883f88-1482-4889-9d49-7f72a7e572c1","topic":"不复用：","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"ef061a6d-1d80-4383-99d5-92140bffc23f","topic":"地址总线的个数","expanded":true,"style":{"background":"#FF9595"}}]}]},{"id":"5f9f9c2d-76cd-437b-9dad-87c0a95310e1","topic":"数据线：","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"7beb5294-1681-44e1-af62-9a737386a0e1","topic":"MDR的位数","expanded":true,"style":{"background":"#FF9595"}}]},{"id":"0eabe589-e6ea-419f-862a-d78486122adc","topic":"注意一定有【供电线】和【接地线】","expanded":true,"style":{"background":"#FF9595"}}]}]},{"id":"765a9b437a1afebc078148b2e3","topic":"总线个数：","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"4fde391c-882d-4b37-a626-fb77ec438ec8","topic":"例：某DRAM总容量为 64K * 2B，读写分开控制，问总引脚线数","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"5a0566c0-7f9e-4a22-949b-da3833b7d3ca","topic":"（DRAM默认地址复用）","expanded":true,"style":{"background":"#BA69C8"}}]},{"id":"23834452-7c20-48b5-86e9-cfb6f4670ed9","topic":"片：2，读写线2根，（地址线：16根）地址复用线：8根，数据线：16根，供电线+接地线：2根","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"7ac99ca0-a332-4eec-975a-63103a3aa868","topic":"注意这里的64K = 2^16 = 2^8 * 2^8，所以在【译码器过后的选通线】有256（行） + 256（列）=512 根线，而在【译码器前的地址总线】处应该只有8根","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"766fc24e-14af-4629-817b-9fe5a6e07fdc","topic":"如果没有地址复用技术：2^16根选通线","expanded":true}]},{"id":"b56eab90-eaae-4c7b-bebf-91a1c0071633","topic":"30根","expanded":true,"style":{"background":"#FDD834"}},{"id":"a927606b-70e0-433b-b98b-d5c66551115a","topic":"64K = 2^16(16根线)，2B = 16bit(16根线)","expanded":true,"icons":["emoji:💬"],"style":{"borderStyle":"dashed","borderColor":"#F59E0B"}}]}]},{"id":"a1e33883-f99c-428a-8e2c-615c91de380d","topic":"寻址：","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"6d5f5493-d0a8-46f8-8f27-6cd65aa71194","topic":"按字节寻址","expanded":true,"style":{"background":"#8EDE99"}},{"id":"f2a1ede7-bb69-4982-9fee-d6874b063978","topic":"按字寻址、按半字/双字寻址","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"d0890f3f-da73-49d8-84e0-53527233428a","topic":"要注意一次读写的【字长】为多少","expanded":true,"style":{"background":"#FDD834"}}]}]}]},{"id":"be9ae1d8-8b73-474d-8a0b-c6f4ef00594c","topic":"读写周期","expanded":true,"children":[{"id":"8c12db7a-df18-488b-af4d-d02d05dd0e2a","topic":"RAM的读周期","expanded":true},{"id":"a8511892-2419-46ee-a8c9-207fe5c8160e","topic":"RAM的写周期","expanded":true}]}]},{"id":"59fa51447e38352f140709a15e","topic":"只读存储器ROM","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-84a338e255dc39.svg","width":64,"height":64},"children":[{"id":"9b6b017834881125fa7c3acff4","topic":"特点：","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"4f0977c372f91a624ed298f511","topic":"不易失、断电不丢失、结构简单、位密度高","expanded":true,"style":{"background":"#FF9595"}},{"id":"b19b907f04ca02ee2a0dcb6cb8","topic":"写到主板中的，能让系统进入BIOS","expanded":true,"style":{"background":"#FF9595"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-83e0705bfac060.png","width":270.18,"height":108.07}}]},{"id":"a3a9cd4e3ddb01a32c115b4a75","topic":"类型：","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"8d391adbda3805ada9cff98bea","topic":"MROM：","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"629836b91db8d2c27877fa63b1","topic":"中文：","expanded":true,"children":[{"id":"c905fee5-d2f3-45c5-9307-9e0a56deb637","topic":"掩模式ROM(Mask)","expanded":true}]},{"id":"61bbf36fce39fa498b089a2414","topic":"特点：","expanded":true,"children":[{"id":"3fe51eea-5095-4130-8758-64b1fda3c28b","topic":"厂商按照要求再生产时直接写入，写入后任何人无法改变内容","expanded":true},{"id":"b5bc6a1c-3c28-41c8-8fb5-c95cd693a041","topic":"可靠性高、便宜、灵活性差","expanded":true}]}]},{"id":"203a198ae80aab4ec7fa5be841","topic":"PROM：","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"d43864f69cc909f5af55f863f9","topic":"中文：","expanded":true,"children":[{"id":"276db6f5-3ae7-4242-89fe-ad34c7810687","topic":"一次可编程ROM(program)","expanded":true}]},{"id":"883abbc0ebebeb77686c7b835d","topic":"特点：","expanded":true,"children":[{"id":"e2e3b0b5-18da-452d-8006-a0019b55da06","topic":"可以实现一次编程（用户可以使用专门的设备），一旦写入，不可改变","expanded":true}]}]},{"id":"64896bb669fb41f3ad61bb2170","topic":"EPROM：","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"d88bfa160eb9c60deb62a95a55","topic":"中文：","expanded":true,"children":[{"id":"997074f2-1a0e-4e45-b8f8-53979d8957a7","topic":"可擦除可编程ROM(Erase Program)","expanded":true}]},{"id":"1b5a6e91bea939137cfb780b3b","topic":"特点：","expanded":true,"children":[{"id":"3d99581b-ca2f-4eb2-95e1-21ec8d236e46","topic":"可以多次修改，编程次数有限，写入时间过长","expanded":true},{"id":"129da6b0-7f87-4e83-bcc2-26345803838b","topic":"UVEPROM紫外线擦除，(E^2)PROM电擦除","expanded":true}]}]},{"id":"bdd8fd72c2c905c35f5e992d3a","topic":"Flash：","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"ecd9bca3e44b3dd4ae69387f63","topic":"中文：","expanded":true,"children":[{"id":"e1f0cce2-9478-4ad1-b442-78df3c214a70","topic":"闪速存储器","expanded":true}]},{"id":"a498510d44e9367c3db5cb3f8a","topic":"特点：","expanded":true,"children":[{"id":"38f9d7ec-cd23-409e-9a54-9f0da3e66b08","topic":"是EPROM的改良，擦除重写速度更快（写比读慢），Flash只用单个MOS，故位密度比RAM高","expanded":true}]}]},{"id":"86cbfdd1c2ca248186cb4a6762","topic":"SSD：","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"8279bfb5f9cab655c300f81b97","topic":"中文：","expanded":true,"children":[{"id":"26d626de-2f78-4e8f-9205-fc2a076ceb1f","topic":"固态硬盘","expanded":true}]},{"id":"0d5ba48e2d99818093578b6a06","topic":"特点：","expanded":true,"children":[{"id":"805e2655-acc0-4310-a053-533aec6ed5b1","topic":"由控制单元和Flash组成，读写速度快，低功耗，价格高","expanded":true}]}]}]},{"id":"5b68a6d9b738441b4fb5c91191","topic":"OS的自举装入程序：","expanded":true,"children":[{"id":"496860fe3d3b0cafab13bacae8","topic":"引导块","expanded":true},{"id":"05c928f495fb886a07056ba766","topic":"位置：","expanded":true,"children":[{"id":"689ab44683caeed61b13285c67","topic":"主板上的ROM的BIOS芯片里","expanded":true}]},{"id":"1e0a6018-64a2-4766-86c9-07d4b9c040dd","topic":"计算机系统中，OS保存在硬盘上，其内存储器应该采用：RAM + ROM","expanded":true,"style":{"background":"#FFABD5"}}]},{"id":"b83b392455b945ed644418f434","topic":"RAM和ROM的同一编址：","expanded":true,"children":[{"id":"136b87641c2be97b37f668ddb2","topic":"连续编址","expanded":true}]},{"id":"a766541d-19b9-4e7c-8dd1-02cb28b8c700","topic":"随机存取","expanded":true,"style":{"background":"#FFABD5"},"children":[{"id":"bf0862a0-aa5b-4b33-af90-caf84b0cd574","topic":"RAM和ROM都是可以随机存取的","expanded":true,"style":{"background":"#FFABD5"}},{"id":"3bf249b1-ecc1-4ad1-9827-d9c444afa73a","topic":"不可随机存取：","expanded":true,"style":{"background":"#FFABD5"},"children":[{"id":"e8710ab1-f9df-4997-b260-e998764b6510","topic":"磁带（OS）","expanded":true,"style":{"background":"#FFABD5"}}]}]},{"id":"310a084c-272c-4d2b-a233-398ca8ae4434","topic":"考频：低","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"cc4d7d12-312e-45c4-88b9-f2bf46779134","topic":"10、15","expanded":true}]}]},{"id":"9fa9f9c833590362e4d35baaa7","topic":"双端口RAM和多模块存储器","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-249db71a608952.svg","width":64,"height":64},"children":[{"id":"7f712412-ffb1-49a1-b93d-db7a277f450a","topic":"考频：低","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"74e2a6c1-5d9a-4f86-82d0-a203a175fe6c","topic":"15、17、22","expanded":true}]},{"id":"e07ae319-1496-4437-ba84-843ffebbf6d5","topic":"双端口RAM：","expanded":true,"children":[{"id":"7213be77-5e42-40a5-b147-03a0f60b3b9b","topic":"解决问题：","expanded":true,"style":{"background":"#00A99D"},"children":[{"id":"cc11c27e-14e4-4d02-95ed-c6b172f1b927","topic":"用于优化多核CPU访问单个内存条的情况","expanded":true,"style":{"background":"#00A99D"}}]},{"id":"72476abb-5af9-4ac0-b8ef-28110a7f28fb","topic":"在同一个存储器的左右设置两个独立的端口，分别与两个CPU相连，每个端口都具有独立的地址、数据、控制线","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-0abbc8ac38d50d.png","width":379.98,"height":177.64},"children":[{"id":"bd1badb0-62d3-4374-9954-0f49ae85af9e","topic":"四种情况（读写者问题）","expanded":true,"children":[{"id":"dd6223ed-3d1a-4e57-9d75-5434396eb6eb","topic":"时间\\地址","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"d3d9f179-8439-4734-b661-4531070592ba","topic":"同一地址","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"72ab23d5-ade6-4684-adfe-5ebb5938694b","topic":"不同地址","expanded":true,"style":{"background":"#8EDDF9"}}]}]},{"id":"bf3eddac-c7f6-4634-bb82-072993aeff14","topic":"同时","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"7df889ed-941a-43d8-9886-6db7609d27e9","topic":"①都读出 --- 无冲突\n②都写入 --- 冲突\n③写+读 --- 冲突","expanded":true,"children":[{"id":"a149e436-574f-4233-a1e2-1cb4e58709c9","topic":"不会冲突","expanded":true}]}]},{"id":"96d35d43-60ff-4a72-9046-23373f0dc1ce","topic":"不同时","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"fce12bcf-4d2e-480b-90f0-97d333cca870","topic":"不会冲突","expanded":true,"children":[{"id":"154e8a4c-1207-4250-b75e-e42d1e44c9f1","topic":"不会冲突","expanded":true}]}]}]},{"id":"a067e6c6-7aec-43a4-9132-8c4eac8b394b","topic":"解决冲突办法：设置“busy”信号，由逻辑信号决定暂时关闭一个端口（使其延时），未被关闭的正常访问","expanded":true}]}]},{"id":"c51a15dd-6b4a-4182-8266-7a7e9d5fd8fe","topic":"多模块存储器：","expanded":true,"children":[{"id":"47b62036-87f9-4b4b-bd25-27121716aa30","topic":"解决问题：","expanded":true,"style":{"background":"#00A99D"},"children":[{"id":"9c52a259-af22-4368-8bf7-5762ea783ea7","topic":"在一个存取周期中，存取时间很短，恢复时间非常长","expanded":true,"style":{"background":"#00A99D"},"children":[{"id":"d15ddcb6-49eb-4a68-87d3-39b3cbc0bf00","topic":"回复时间指：整个存储体的恢复时间","expanded":true}]}]},{"id":"7bf1e614-1c5c-48bf-8dfc-c49407c8679b","topic":"多体并行","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"036efd06-71a6-4035-935f-e212cd019d92","topic":"CPU可以同时快速的取出四条指令","expanded":true,"style":{"background":"#FDD834"}},{"id":"ae31f7cf-2df9-4bf3-83c8-46c8d237d7ac","topic":"每个模块都有独立的控制电路、地址寄存器、时间寄存器、可以并行+交叉工作","expanded":true,"style":{"background":"#FFABD5"}},{"id":"e6efd227-8d96-4f07-be9d-2bc7cccf8b47","topic":"高位交叉编址","expanded":true,"children":[{"id":"833b2043-2e84-4ea0-9361-0090a214a378","topic":"高位2bit是对应不同的存储体","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-e3fe3929991c86.png","width":240.09,"height":172.19},"children":[{"id":"0ef1ca30-cf19-4287-b508-2930699ccd06","topic":"M0 : 00 xxxxxxxx\nM 1:  01 xxxxxxxx\n编程难度大","expanded":true,"children":[{"id":"c5c1eb8a-2a66-4878-b2b6-91fadab21f5d","topic":"读完一个数据后，存储体需要进行恢复，恢复完后才能读下一个","expanded":true,"style":{"background":"#FF9595"}}]},{"id":"e32dda0b-f3ba-48d1-9ae5-7e584d200a2c","topic":"举例：","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-8aedd8aebda998.png","width":71.13,"height":127.21},"children":[{"id":"e136cd84-4f53-465b-90dd-3af483bf9e2a","topic":"甘特图， 耗时 5T","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-d7ad1926cab354.png","width":229.52,"height":97.03}}]}]}]},{"id":"edfb5c90-7ab4-4274-a25a-280964f5121f","topic":"低位交叉编址","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"77285dd5-25d0-4f28-96b0-460d8f436cdd","topic":"低位2bit对应不同存储体","expanded":true,"style":{"background":"#FDD834"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-d0787e04640217.png","width":266,"height":175.34},"children":[{"id":"ce5e5253-5547-41bb-ae44-22a586767483","topic":"举例：","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-8aedd8aebda998.png","width":71.13,"height":127.21},"children":[{"id":"d93bab73-f388-4453-aad0-201b63b7253a","topic":"甘特图， 耗时 T+4r","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-3855e6f36f72a6.png","width":1938,"height":1356}}]}]}]}]},{"id":"a1ffef2b-4a12-4375-93ca-74141cc98b24","topic":"流水线式","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"9627fbef-ea90-45e3-a005-685e00d02d13","topic":"多体并行 + 低位交叉","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"c16b8fc5-a2fd-4499-99ba-4a199f3b36b8","topic":"模块存取一个字的存取周期为T，总线传送周期是r，为实现流水线方式存取，存储器交叉模块数应大于等于：m = T/r","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"510bed8f-eee7-4155-a02f-af3860d0a113","topic":"等于是最好的，不然少了浪费时间，多了浪费钱","expanded":true,"style":{"background":"#8EDDF9"}},{"id":"79c6c036-bab4-4151-ba88-32441c914ae0","topic":"每过r周期启动下一个模块，这样当最后一块传完后，第一块又能接上了。","expanded":true},{"id":"a70ae1e1-d3fd-4f37-8348-1b3cbe1e841c","topic":"存取m个字，需要T+(m-1)r的时间","expanded":true,"style":{"background":"#FF9595"}}]}]}]},{"id":"2b6b5fc4-89cf-475f-9845-616f8630894b","topic":"单体多字","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"93b82637-9d52-4138-ba6f-914c55617743","topic":"把多体并行存储器合并在了同一个存储器中，所有存储器共用控制电路、寄存器等等","expanded":true,"style":{"background":"#8EDDF9"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-3f79f0b44d1053.png","width":240.08,"height":162.39},"children":[{"id":"664f7194-0452-4465-b9e4-0befa919c678","topic":"故一次存取都需要读写一整行的信息（可能会读取多余的信息）","expanded":true,"style":{"background":"#8EDDF9"}},{"id":"2754052d-302c-4131-bf7a-f7f2468a2010","topic":"速度和多体并行的速度基本完全一致","expanded":true,"style":{"background":"#FF9595"}}]}]}]}]},{"id":"cc8b83fcc84a5daaae30da8816","topic":"主存储器和CPU的连接","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-8e07d6402c822e.svg","width":64,"height":64},"children":[{"id":"6913d491-6fc1-4e72-9d8a-233ca31c7ebb","topic":"总线信号命名：","expanded":true,"children":[{"id":"4ac2c244-6ab0-437e-9a0b-403d77509bd9","topic":"地址A0 ~ A7，数据 D0 ~ D7","expanded":true}]},{"id":"2cba33bd-530b-4091-b47d-8da57ab3b5ea","topic":"主存的基本组成","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"553ae4b8-0a63-41e2-a4c9-f5ad7bd4db92","topic":"图示","expanded":true,"style":{"background":"#8EDE99"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-d594988cc4846e.png","width":520.46,"height":206.04},"children":[{"id":"52bd33f1-4de3-4cba-aa44-7b2d2615c11c","topic":"内存条插槽内有存储器总线","expanded":true},{"id":"07c8b5a0-4ded-4f3c-a6e3-ae90a42fd4c6","topic":"内存条中的信息通过【内存条的引脚】，再通过【插槽内的引线】连接到【主板】上，通过【主板上的导线】连接到【CPU芯片】。","expanded":true},{"id":"e52c2ad1-4b13-4871-894d-d5e5552cf61c","topic":"图示","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-3abd6598a5484b.png","width":264.31,"height":171.39}}]}]},{"id":"c5f587a6-e6f3-46bd-9d9d-8bcaa0ab15d3","topic":"位扩展","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"98501422-348b-48b1-940a-746c346a2eb4","topic":"原因：芯片的字长(bit数)和CPU的字长(bit数)不统一，需要横向连接多块芯片来满足CPU的读取一次时的bit数需求","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"97131cea-4cbb-4612-bea0-d2d30e3f884b","topic":"即：扩展一次性可以读出的数据字长","expanded":true,"style":{"background":"#8EDDF9"}}]},{"id":"f7201688-03f7-4067-b4f7-d9f3d0a9a4b2","topic":"最开始只有一块芯片的时候（数据线不够）","expanded":true,"style":{"background":"#FDD834"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-bc4378b11122a8.png","width":269.66,"height":276.13},"children":[{"id":"01d5c808-37cf-4245-9e6b-b01c8727d09a","topic":"例如再连一块","expanded":true,"style":{"background":"#FDD834"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-f382591f3237d6.png","width":366.47,"height":269.68},"children":[{"id":"72065171-fcb7-4d9b-8e11-066df4ce18a9","topic":"最后连接8块芯片","expanded":true,"style":{"background":"#FDD834"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-f6cb9c159a83ed.png","width":338.04,"height":264.54},"children":[{"id":"b1adf161-9566-4736-a15e-ddf13a1ea1f3","topic":"这样就把八个8K * 1位的芯片通过【位扩展的方法】扩展为了8K * 8位的芯片","expanded":true}]}]}]}]},{"id":"95631026-d2e3-4c6c-985c-846c3636205a","topic":"字扩展","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"7cc808e3-3851-448b-adce-a3a27b59b1d3","topic":"原因：芯片的字长和CPU已经满足了，可是CPU的地址总线上还是有很多根没有充分利用。故可以通过在地址中设置片选信号来增加地址数目","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"5633580b-28d1-4b4b-9eec-f6db07ad3190","topic":"即：扩展主存字数","expanded":true,"style":{"background":"#8EDDF9"}}]},{"id":"35d3ffdf-e3ee-4f05-9549-b7b824339f9f","topic":"最开始的时候地址线还有3个引脚没有连接","expanded":true,"style":{"background":"#FDD834"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-3d13ff12d14f7d.png","width":249.63,"height":258.08},"children":[{"id":"33f3919d-123e-450c-8f5b-90a7951b565c","topic":"法一：线选法，CPU每一根多的地址线就连接着对应的芯片的CS。【这样CPU多了N根线，就可以多连接N个芯片】","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-fa86ed7e3182ff.png","width":398.53,"height":232.81},"children":[{"id":"d9a9b19b-9b99-4e79-bf9f-7d73c7f54b9f","topic":"地址空间不连续","expanded":true,"style":{"background":"#FF9595"}}]},{"id":"9c9e859c-774b-41ef-821e-f8fa62be83bc","topic":"法二：译码片选法，CPU的每一根对应的地址线都连接一个非门和一根线，这样可以控制两个芯片。【所以CPU多了N根线，可以多连接2^N个芯片】","expanded":true,"style":{"background":"#FDD834"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-7bc2d763e15fc3.png","width":481.14,"height":232.96},"children":[{"id":"399a8446-207f-4435-b554-dc7b19228e1b","topic":"译码片选法连接多个芯片(此处选择了A13,A14，所以A15无论是多少都不会改变A0-A14的地址映射）","expanded":true,"style":{"background":"#FDD834"}},{"id":"4714d7bc-9591-4c37-9cda-695e463ae211","topic":"这样就把4个8K * 8位的芯片通过【字扩展的方法】扩展为了32K * 8位的芯片","expanded":true}]}]}]},{"id":"18eb03eb28395f9c5b49b8788d","topic":"字位扩展法：","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"b8c8fb1b-dba9-40d9-be3c-4ce1723ae4ef","topic":"图示","expanded":true,"style":{"background":"#FDD834"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-6e8c5b1c1cc750.png","width":468.48,"height":239.52},"children":[{"id":"31241dcb-ca8a-4d02-ac96-f4ff4f43c044","topic":"两个芯片(16K * 4)为一组进行【位扩展】，所以机器字长为8bit(16K * 8)。再将四组通过【字扩展】连接在一起，形成(64K * 8)的存储空间","expanded":true,"style":{"background":"#FDD834"}},{"id":"5c97f033-b70a-4836-94ee-ad85b180e05d","topic":"地址空间为：\n0000 0000 0000 0000 ~ 1111 1111 1111 1111","expanded":true,"children":[{"id":"2005d576-930b-4507-9d6c-8a317f7ad459","topic":"每个地址对应一个字的数据（此处一个字=1 Byte）","expanded":true}]}]},{"id":"8da87d44fdab3267f11228edef","topic":"注意CS和WE线","expanded":true}]},{"id":"9817b7af-1945-48b5-b987-b03c3e1a022d","topic":"补充：译码器","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"b53ec757-38cb-4874-9f4f-b00392454034","topic":"普通的3-8译码器","expanded":true,"style":{"background":"#8EDDF9"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-8877c14d0f3ffe.png","width":358.46,"height":230.64},"children":[{"id":"004660fd-8a29-4b66-8688-b02a0d41079a","topic":"\"使能\"端","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"fc5392ad-0026-471e-b4df-6326d30048ac","topic":"EN使能","expanded":true,"style":{"background":"#8EDDF9"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-9524b9c38ac512.png","width":696,"height":622},"children":[{"id":"df998d71-3bf3-40c8-bcec-009de6a53366","topic":"74ls138","expanded":true,"style":{"background":"#FDD834"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-f4385924a1583a.png","width":175.84,"height":186.65}}]}]},{"id":"bcb31a3e-f137-4abd-ad4b-359b818ba9d9","topic":"MREQ","expanded":true,"children":[{"id":"d36820d6-b603-4620-93a4-076f4d842589","topic":"CPU通过控制一个使能端，来控制CPU的操作顺序","expanded":true,"style":{"background":"#FDD834"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-270e5d302ba461.png","width":312.56,"height":200.59},"children":[{"id":"b6c8b763-4685-4c04-9e62-1a0f3d265378","topic":"CPU先把地址信号传递到地址线上面去，检测到信号稳定后，CPU才会把MREQ设置为0，芯片才能进行运作","expanded":true,"style":{"background":"#FDD834"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-3784c87bd19525.png","width":316.23,"height":178.84}}]}]}]}]},{"id":"43aa23bc-5ddb-4c2f-9ffd-75b52efbcbd4","topic":"考频：中","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"9516abb9-9ccb-494b-a479-f809cf72589c","topic":"09-11、16、18、21","expanded":true}]}]},{"id":"c0c0a191-606f-463f-adee-6a0f1d60c67c","topic":"外部存储器","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-28806fd6f160a8.svg","width":60,"height":61},"children":[{"id":"f282e774-2699-4d40-b3e6-4975175f9f3d","topic":"考频：低","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"70596399-8c68-48a1-8061-3569f412cad2","topic":"13*2、15、19","expanded":true}]},{"id":"0d3e1136-0a2b-4e1c-9ee3-b7315fff7153","topic":"磁盘存储器","expanded":true,"children":[{"id":"de09c335-7bab-4210-aa79-cf42150f7c8c","topic":"磁盘的概念","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"ff9bc198-7d20-4d28-9dcb-0724b79f61c8","topic":"磁道","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"3f3f728d-5e8f-4846-8033-f0cbea47b05b","topic":"一个又一个的【同心圆】","expanded":true}]},{"id":"3256995d-cf20-4aa0-9729-ded94a2bcd51","topic":"磁道间隙","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"5662bce0-0fe2-425b-a623-2a4f2e718cc5","topic":"每两个同心圆之间的【间隙】","expanded":true}]},{"id":"d6af4cb9-4cbc-44d0-9f70-4b6c93964885","topic":"扇区","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"84f44848-0f0c-4193-8794-203711e28d4b","topic":"一个磁道可以分为若干个【扇区】","expanded":true},{"id":"f27f0fa3-25b4-449a-aee3-0ab8570e24c7","topic":"又称：磁盘块（物理上）","expanded":true,"style":{"background":"#8EDE99"}}]},{"id":"203b614a-2083-4502-8983-23852485c6f7","topic":"扇区间隙","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"897dbc63-9462-4428-b382-1ca8ca38372f","topic":"每两个扇区之间的间隙","expanded":true}]},{"id":"4e23d6b1-b957-4eed-a434-ef2d83fb026c","topic":"柱面","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"73fe6b18-7c3a-4c48-adc6-4431970c6bc7","topic":"多个磁盘垂直叠在一起时，所有磁道组成的垂直面就是柱面","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-2780be14696170.png","width":365.55,"height":331.26}}]},{"id":"4a355afa-bad0-43c2-b5e2-5c45efc3c188","topic":"块","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"c04e9f16-a159-481b-aed8-fb1564e9fd8c","topic":"物理块","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"751d0442-3280-4935-b3bc-1790c4d954c0","topic":"扇区","expanded":true,"style":{"background":"#FDD834"}},{"id":"30685290-e6cc-44a0-85c6-bd44929de7fb","topic":"物理上读写一次的基本单位","expanded":true,"style":{"background":"#FDD834"}}]},{"id":"a44ba11a-39fa-4d57-b2c5-fd29eb00e015","topic":"逻辑块","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"d5eb284a-f3bc-41e5-9102-8629d29c9576","topic":"簇","expanded":true,"style":{"background":"#FDD834"}},{"id":"586d47e7-c3b7-4b2c-9920-2a04ec5122b7","topic":"OS中存储空间分配的最小单位","expanded":true,"style":{"background":"#FDD834"}}]}]}]},{"id":"b37953bb-3b1b-4dfe-97e7-7741cc31a2e7","topic":"磁盘地址形式：","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"b6c850fa-c7d0-4d18-9595-402f2a6e1bcb","topic":"<柱面、盘面、扇区>","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"d2e0846c-0ba7-4e65-897b-6b13e8962e0f","topic":"因为移动磁头是需要很多时间的","expanded":true}]}]},{"id":"1f9eb396-5806-4d57-ba83-752b972b3896","topic":"磁盘阵列","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"129fb5ca-a35a-4d18-8704-c776224e285d","topic":"RAID （独立冗余磁盘阵列）是指将多个独立的物理磁盘组成一个独立的逻辑盘，数据在多 个物理盘上分割交叉存储、并行访问，具有更好的存储性能、可靠性和安全性。","expanded":true},{"id":"b26154b3-adb8-4963-bec5-6be821a39e9f","topic":"• RAID0：无冗余和无校验的磁盘阵列。","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"72192633-40af-4205-a0bb-38ecd7519949","topic":"把连续多个数据块交替地存放在不同物理磁盘的扇区中，几个磁盘交叉并行读写，扩大了存储容量，提高了磁盘数据存取速度，但没有容错能力","expanded":true}]},{"id":"d2357077-cf05-4845-8084-81e39866231b","topic":"• RAID1：镜像磁盘阵列。","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"e993f34c-377c-43b4-985c-ba4f01216e04","topic":"使两个磁盘同时进行读写，互为备份，若一个磁盘出现故障，可从另一磁盘中读出数据。","expanded":true},{"id":"c4990cec-d625-4893-a254-c79d693f58b4","topic":"但容量减少一半","expanded":true}]},{"id":"e8ac40af-43b4-4be3-9c1a-22a8f4426086","topic":"• RAID2：采用纠错的海明码的磁盘阵列。","expanded":true,"style":{"background":"#8EDDF9"}},{"id":"59de5306-7488-4245-8b07-d02093997999","topic":"• RAID3：位交叉奇偶校验的磁盘阵列。","expanded":true,"style":{"background":"#8EDDF9"}},{"id":"40665d26-a350-42cc-9b25-5a4f279d0a2d","topic":"• RAID4：块交叉奇偶校验的磁盘阵列。","expanded":true,"style":{"background":"#8EDDF9"}},{"id":"7ee60dd7-56f8-4098-aa2e-851c37ab2f13","topic":"• RAID5：无独立校验的奇偶校验磁盘阵列。","expanded":true,"style":{"background":"#8EDDF9"}}]}]},{"id":"a65b92fc-99f6-4964-9b64-7738c1f2bfaf","topic":"固态硬盘SSD","expanded":true,"children":[{"id":"1a85d0cf-089a-484a-bebc-9cf4407d13e8","topic":"固态硬盘","expanded":true},{"id":"c1afb4a4-2efe-45ef-a62e-f449c3fe27f2","topic":"基于闪存的存储器","expanded":true,"children":[{"id":"65ca3db9-db52-4812-b41b-22a57d458268","topic":"存储介质：NAND颗粒","expanded":true,"style":{"background":"#FDD834"}}]},{"id":"635bab54-9e8a-4c4d-a7be-5b9d41b9c133","topic":"读写速度比较：","expanded":true,"children":[{"id":"febb8fd0-ace1-489b-89bb-c57745a79033","topic":"图示","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-587b202b3b391d.png","width":720.53,"height":297.85},"children":[{"id":"5f6feb24-31a0-4e71-8cb2-0a84faa131e8","topic":"（硬件茶谈）","expanded":true}]}]},{"id":"d322f108-4642-4675-aab3-6c14f2976116","topic":"组成：","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"57ff1f31-5972-4495-a34f-3e1b2f3f25f2","topic":"闪存翻译层 + 多个闪存芯片","expanded":true,"style":{"background":"#FDD834"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-42fb1caabedb7b.png","width":706.58,"height":428.1},"children":[{"id":"1ae730a9-e0fd-45a3-a094-5405d47de5ef","topic":"读写单位","expanded":true,"children":[{"id":"71d71b75-a83f-4066-af37-8882eb26e931","topic":"CPU下令要读取一个块的内容","expanded":true},{"id":"aedb4bdd-e350-406d-bb46-b5c915a97824","topic":"SSD的读取单位：一个页","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"af8a4d23-56a7-4301-a364-984512a9684a","topic":"SSD接受到这个块的地址","expanded":true},{"id":"ae033d9c-d6ff-4c91-aeca-d1c3d789b567","topic":"SSD的闪存翻译层把它翻译为SSD中对应的数个页的地址","expanded":true},{"id":"95360780-ce84-4a18-aa28-a645f21356da","topic":"SSD把这些页的数据发到IO总线上，返回CPU","expanded":true}]},{"id":"8b1765f3-4c8b-48c6-be3c-2823046d5c05","topic":"具体大小：机械磁盘的一个块大小可能在1KB；SSD的一个页大小是512B~4KB，一个块中有32~128个页","expanded":true,"style":{"background":"#8EDE99"}}]},{"id":"5e852c0f-7c3a-45cd-b8c3-fcc3623d8b49","topic":"市面上的厂家的SSD都有一个缓存","expanded":true,"icons":["emoji:💬"],"style":{"borderStyle":"dashed","borderColor":"#F59E0B"}}]}]},{"id":"79025a93-a9e7-4a8d-9764-d18817f4feae","topic":"读写原则：","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"9f83d662-4173-43d3-9725-3a680c0dd765","topic":"读：以一个页为单位来读 ✅","expanded":true,"style":{"background":"#FF9595"}},{"id":"4c43e5cc-876c-4951-82ce-162bb71472fd","topic":"写：以一个页为单位来写","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"74c7e662-cbfd-4984-a558-652635fc0ae3","topic":"擦除：以一个块的单位来擦除","expanded":true},{"id":"ad0b23c6-9305-405c-8029-84d04e0231ff","topic":"擦除方法：先把要写那页的整块复制到另一块，然后再擦除原来那块","expanded":true,"children":[{"id":"4dab2c53-0b19-47b1-9df4-a5c8504cce88","topic":"复制过后，在闪存翻译层中会建立新的： ‘逻辑地址’ —— ‘物理地址’ 的转换关系","expanded":true}]},{"id":"18aec3ee-8c31-476a-b3c3-6c7f6e197637","topic":"擦除的缺点：","expanded":true,"children":[{"id":"fbc25d6c-e705-484c-9d44-e149ddc3db52","topic":"擦除多了会造成磨损","expanded":true}]}]}]},{"id":"07981c47-bc78-40c8-b57d-9894a49371b9","topic":"平均磨损","expanded":true,"children":[{"id":"bd9d2275-648c-4dce-a8c1-e7d403f5464b","topic":"静态平均：","expanded":true,"children":[{"id":"da9a01b6-a8b0-4597-9a2a-828a7f108fc3","topic":"SSD在进行擦除后的数据迁移的时候，会让寿命比较老的闪存块担任“读”的责任，让新的闪存块担任“写”的责任","expanded":true}]},{"id":"fd62ef39-f065-451f-bae7-f7ef85873455","topic":"动态平均：","expanded":true,"children":[{"id":"4494a571-38bf-49b6-b50e-c99e202bd922","topic":"在SSD写入新数据的时候，会优先选择磨损次数少的块进行写入","expanded":true}]}]}]}]},{"id":"30d9c9760e094de4f7d87b7985","topic":"高速缓冲存储器Cache","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-17250ac514b2bc.svg","width":64,"height":64},"children":[{"id":"ed161682-79fb-43cd-9f54-f21fa2efd830","topic":"前提","expanded":true,"children":[{"id":"82155ca3-264b-49d9-bc91-cb695a841663","topic":"局部性原理","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"b6bf21b1-de1b-4677-b15c-4b0764d0ed8f","topic":"数组访问【空间局部性】很好 👍🏻","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"3cb717e9-2255-41e5-818e-3b156a7c15ba","topic":"数组访问【空间局部性】差劲 👎🏻","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"8e586ea8-b935-4620-87dd-7a46a1a0fe54","topic":"分析：","expanded":true,"children":[{"id":"ac80fbec-36f4-4e16-8ce8-ebed943cff3e","topic":"图示","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-632ef2ede8771f.png","width":186.22,"height":417.85}}]}],"code":{"lang":"c","code":"int sumArrayCols(int a[M][N]) {\n    int i, j, sum = 0;\n    for (j = 0; j < N; j ++)\n        for (i = 0; i < M; i ++) // 后 i\n            sum += a[i][j];\n\n    return sum;\n}","tokens":[[{"text":"int","darkColor":"#74CBC4"},{"text":" ","darkColor":"#DEDBD2"},{"text":"sumArrayCols","darkColor":"#6EC0DF"},{"text":"(","darkColor":"#BAB5A8"},{"text":"int","darkColor":"#74CBC4"},{"text":" ","darkColor":"#DEDBD2"},{"text":"a","darkColor":"#EEECE6"},{"text":"[","darkColor":"#BAB5A8"},{"text":"M","darkColor":"#DEDBD2"},{"text":"][","darkColor":"#BAB5A8"},{"text":"N","darkColor":"#DEDBD2"},{"text":"])","darkColor":"#BAB5A8"},{"text":" ","darkColor":"#DEDBD2"},{"text":"{","darkColor":"#BAB5A8"}],[{"text":"    ","darkColor":"#DEDBD2"},{"text":"int","darkColor":"#74CBC4"},{"text":" i","darkColor":"#DEDBD2"},{"text":",","darkColor":"#BAB5A8"},{"text":" j","darkColor":"#DEDBD2"},{"text":",","darkColor":"#BAB5A8"},{"text":" sum ","darkColor":"#DEDBD2"},{"text":"=","darkColor":"#BAB5A8"},{"text":" ","darkColor":"#DEDBD2"},{"text":"0","darkColor":"#E2B159"},{"text":";","darkColor":"#BAB5A8"}],[{"text":"    ","darkColor":"#DEDBD2"},{"text":"for","darkColor":"#8EA4E2"},{"text":" ","darkColor":"#DEDBD2"},{"text":"(","darkColor":"#BAB5A8"},{"text":"j ","darkColor":"#DEDBD2"},{"text":"=","darkColor":"#BAB5A8"},{"text":" ","darkColor":"#DEDBD2"},{"text":"0","darkColor":"#E2B159"},{"text":";","darkColor":"#BAB5A8"},{"text":" j ","darkColor":"#DEDBD2"},{"text":"<","darkColor":"#BAB5A8"},{"text":" N","darkColor":"#DEDBD2"},{"text":";","darkColor":"#BAB5A8"},{"text":" j ","darkColor":"#DEDBD2"},{"text":"++)","darkColor":"#BAB5A8"}],[{"text":"        ","darkColor":"#DEDBD2"},{"text":"for","darkColor":"#8EA4E2"},{"text":" ","darkColor":"#DEDBD2"},{"text":"(","darkColor":"#BAB5A8"},{"text":"i ","darkColor":"#DEDBD2"},{"text":"=","darkColor":"#BAB5A8"},{"text":" ","darkColor":"#DEDBD2"},{"text":"0","darkColor":"#E2B159"},{"text":";","darkColor":"#BAB5A8"},{"text":" i ","darkColor":"#DEDBD2"},{"text":"<","darkColor":"#BAB5A8"},{"text":" M","darkColor":"#DEDBD2"},{"text":";","darkColor":"#BAB5A8"},{"text":" i ","darkColor":"#DEDBD2"},{"text":"++)","darkColor":"#BAB5A8"},{"text":" // 后 i","darkColor":"#908B7E"}],[{"text":"            sum ","darkColor":"#DEDBD2"},{"text":"+=","darkColor":"#BAB5A8"},{"text":" ","darkColor":"#DEDBD2"},{"text":"a","darkColor":"#EEECE6"},{"text":"[","darkColor":"#BAB5A8"},{"text":"i","darkColor":"#DEDBD2"},{"text":"][","darkColor":"#BAB5A8"},{"text":"j","darkColor":"#DEDBD2"},{"text":"];","darkColor":"#BAB5A8"}],[{"text":" "}],[{"text":"    ","darkColor":"#DEDBD2"},{"text":"return","darkColor":"#8EA4E2"},{"text":" sum","darkColor":"#DEDBD2"},{"text":";","darkColor":"#BAB5A8"}],[{"text":"}","darkColor":"#BAB5A8"}]]}}],"code":{"lang":"c","code":"int sumArrayRows(int a[M][N]) {\n    int i, j, sum = 0;\n    for (i = 0; i < M; i ++) // 先 i\n        for (j = 0; j < N; j ++)\n            sum += a[i][j];\n\n    return sum;\n}","tokens":[[{"text":"int","darkColor":"#74CBC4"},{"text":" ","darkColor":"#DEDBD2"},{"text":"sumArrayRows","darkColor":"#6EC0DF"},{"text":"(","darkColor":"#BAB5A8"},{"text":"int","darkColor":"#74CBC4"},{"text":" ","darkColor":"#DEDBD2"},{"text":"a","darkColor":"#EEECE6"},{"text":"[","darkColor":"#BAB5A8"},{"text":"M","darkColor":"#DEDBD2"},{"text":"][","darkColor":"#BAB5A8"},{"text":"N","darkColor":"#DEDBD2"},{"text":"])","darkColor":"#BAB5A8"},{"text":" ","darkColor":"#DEDBD2"},{"text":"{","darkColor":"#BAB5A8"}],[{"text":"    ","darkColor":"#DEDBD2"},{"text":"int","darkColor":"#74CBC4"},{"text":" i","darkColor":"#DEDBD2"},{"text":",","darkColor":"#BAB5A8"},{"text":" j","darkColor":"#DEDBD2"},{"text":",","darkColor":"#BAB5A8"},{"text":" sum ","darkColor":"#DEDBD2"},{"text":"=","darkColor":"#BAB5A8"},{"text":" ","darkColor":"#DEDBD2"},{"text":"0","darkColor":"#E2B159"},{"text":";","darkColor":"#BAB5A8"}],[{"text":"    ","darkColor":"#DEDBD2"},{"text":"for","darkColor":"#8EA4E2"},{"text":" ","darkColor":"#DEDBD2"},{"text":"(","darkColor":"#BAB5A8"},{"text":"i ","darkColor":"#DEDBD2"},{"text":"=","darkColor":"#BAB5A8"},{"text":" ","darkColor":"#DEDBD2"},{"text":"0","darkColor":"#E2B159"},{"text":";","darkColor":"#BAB5A8"},{"text":" i ","darkColor":"#DEDBD2"},{"text":"<","darkColor":"#BAB5A8"},{"text":" M","darkColor":"#DEDBD2"},{"text":";","darkColor":"#BAB5A8"},{"text":" i ","darkColor":"#DEDBD2"},{"text":"++)","darkColor":"#BAB5A8"},{"text":" // 先 i","darkColor":"#908B7E"}],[{"text":"        ","darkColor":"#DEDBD2"},{"text":"for","darkColor":"#8EA4E2"},{"text":" ","darkColor":"#DEDBD2"},{"text":"(","darkColor":"#BAB5A8"},{"text":"j ","darkColor":"#DEDBD2"},{"text":"=","darkColor":"#BAB5A8"},{"text":" ","darkColor":"#DEDBD2"},{"text":"0","darkColor":"#E2B159"},{"text":";","darkColor":"#BAB5A8"},{"text":" j ","darkColor":"#DEDBD2"},{"text":"<","darkColor":"#BAB5A8"},{"text":" N","darkColor":"#DEDBD2"},{"text":";","darkColor":"#BAB5A8"},{"text":" j ","darkColor":"#DEDBD2"},{"text":"++)","darkColor":"#BAB5A8"}],[{"text":"            sum ","darkColor":"#DEDBD2"},{"text":"+=","darkColor":"#BAB5A8"},{"text":" ","darkColor":"#DEDBD2"},{"text":"a","darkColor":"#EEECE6"},{"text":"[","darkColor":"#BAB5A8"},{"text":"i","darkColor":"#DEDBD2"},{"text":"][","darkColor":"#BAB5A8"},{"text":"j","darkColor":"#DEDBD2"},{"text":"];","darkColor":"#BAB5A8"}],[{"text":" "}],[{"text":"    ","darkColor":"#DEDBD2"},{"text":"return","darkColor":"#8EA4E2"},{"text":" sum","darkColor":"#DEDBD2"},{"text":";","darkColor":"#BAB5A8"}],[{"text":"}","darkColor":"#BAB5A8"}]]}}]},{"id":"b1da3c23-518d-4860-bf0e-a1e34764b9cf","topic":"上述问题的三个其他点：","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"53a715c3-1230-4690-912f-1f8ec27eddd9","topic":"数组访问的时间局部性：","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"ac1e44b7-d862-4d5f-a966-1c646ad8ee43","topic":"都差，因为都只访问了一次","expanded":true,"style":{"background":"#FF9595"}}]},{"id":"e36b46da-a676-4411-971a-6dc21a8753a5","topic":"for循环代码段的局部性：","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"a61820e0-307c-4490-af9d-13eb40aaf748","topic":"时间、空间都很好","expanded":true,"style":{"background":"#FF9595"}}]}]},{"id":"9836f14c-451c-4bb1-bfa8-77813f2924dd","topic":"操作系统采用页式存储","expanded":true,"children":[{"id":"3788e5ca-a17a-48dc-85a2-d723fc20ca3e","topic":"<页号、偏置值>","expanded":true}]}]},{"id":"b3c606fb-4a2d-4f4f-8ad6-25a21b1932f3","topic":"Cache的基本工作原理","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"7153a984-044b-4a2e-b3df-2f5e94736d6f","topic":"图示","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-d859d14849b7a8.png","width":641.08,"height":329.54},"children":[{"id":"c9680ea7-f252-4942-873a-7e6ed16e25fc","topic":"Cache中的内容是主存的复制（缓冲区_______）","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"73acbead-e99b-435f-86a3-15592c2d903e","topic":"可以将局部性好的内容放入到Cache中","expanded":true,"style":{"background":"#FF9595"}},{"id":"cb77dcee-ce18-43fe-a6fa-20da53b055ce","topic":"Cache命中后直接把标记后的数据部分进行读取（就可以不访问内存了）","expanded":true,"style":{"background":"#FF9595"}}]},{"id":"ec40e5d0-6f8d-4f96-91ac-f12c01db9b03","topic":"Cache的访问速度t，H为命中率，tc是cache速度，tm是访问主存速度，(1-H)后面也可以只有tm","expanded":true,"style":{"background":"#8EDE99"},"formula":{"tex":"t = H t_c + (1 - H)(t_m + t_c)","displayMode":true,"mathml":"<span class=\"katex\"><math xmlns=\"http://www.w3.org/1998/Math/MathML\" display=\"block\"><semantics><mrow><mi>t</mi><mo>=</mo><mi>H</mi><msub><mi>t</mi><mi>c</mi></msub><mo>+</mo><mo stretchy=\"false\">(</mo><mn>1</mn><mo>−</mo><mi>H</mi><mo stretchy=\"false\">)</mo><mo stretchy=\"false\">(</mo><msub><mi>t</mi><mi>m</mi></msub><mo>+</mo><msub><mi>t</mi><mi>c</mi></msub><mo stretchy=\"false\">)</mo></mrow><annotation encoding=\"application/x-tex\">t = H t_c + (1 - H)(t_m + t_c)</annotation></semantics></math></span>"}},{"id":"6a03c02c-8b0a-43b1-8c9d-9e45a3e79833","topic":"通常采用SRAM构成","expanded":true,"children":[{"id":"36c6cc7b-2ecc-467d-8700-a69be1433348","topic":"现代计算机把Cache集成在了CPU的内部","expanded":true}]},{"id":"c3882330-4eb5-4c1e-a4c7-861f95190073","topic":"速度快、成本高、集成度低","expanded":true}]}]},{"id":"6360a10c-817e-48e6-a794-33d164860751","topic":"大题看到题目第一步怎么做：","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"eb21849c-7b58-48d9-a7b9-372e23679600","topic":"下面那个地址可以不画","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-a57cfd6115647c.png","width":491.43,"height":283.26}}]},{"id":"cf2935ef-6d12-4bab-904b-82ef5a7c15fb","topic":"Cache和主存的映射关系","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-8e96857cb3fbcf.svg","width":60,"height":60},"children":[{"id":"01ad3238-a741-4706-a65c-0a5574220e3f","topic":"Cache每一行的内容","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"46cb5191-c828-499f-af37-180d3f791e4e","topic":"(计数位 + 脏位) + 有效位+标记+存储的内容","expanded":true,"style":{"background":"#FDD834"}},{"id":"2171e325-55d1-43f0-9170-9d669c36e877","topic":"【计数位】是用于LRU算法的","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"2579b70e-86c1-48b5-b577-e827781c28b7","topic":"也叫替换控制位","expanded":true},{"id":"5ac1fa8a-8a80-4fa9-8dc1-ea975d374c62","topic":"比如是2^n 路组相联，就需要n bit的计数位","expanded":true}]},{"id":"372ef5c8-c0e2-4eb2-a30b-43898f98a55d","topic":"【脏位】是用于Cache写策略的","expanded":true,"style":{"background":"#8EDDF9"}},{"id":"cfb67a2f-0472-4ea9-aaf5-65a6f69aea21","topic":"【有效位】为1说明该Cache行的内容有效，为0则不然","expanded":true,"style":{"background":"#8EDE99"}},{"id":"ce680bc9-9b33-4474-880a-22c6114167be","topic":"【标记】是用于与地址进行比对的关键字","expanded":true,"style":{"background":"#8EDE99"}},{"id":"a5c14af9-eab0-4958-814b-0d1c292d7fe3","topic":"【存储的内容】就是对应的主存页面的副本","expanded":true,"style":{"background":"#8EDE99"}}]},{"id":"e280564c-7ea7-4e16-a131-610ce6e79264","topic":"直接映射","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"b8c878eb-ec20-4602-bfa3-577e7223ef20","topic":"直接映射规则：","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"459e9367-1211-4eb9-a57f-66dac4912265","topic":"主存在Cache中的行号 = 主存块号 % Cache总块数","expanded":true,"style":{"background":"#FDD834"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-98e9a983a25cf9.png","width":1020,"height":1260}}]},{"id":"efc43abc-a84a-4d1b-ad89-c99037cefffb","topic":"映射公式","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"b4394785-d3dc-4cdd-8c30-bdddf6f7e14c","topic":"Cache中有2^c页，则主存中第 i 页对应在Cache中的行号 j","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"1b10ea4f-7da5-4497-8e00-5393ff5b913c","topic":"替换算法：如果出现冲突，则直接将块移出cache","expanded":true}],"formula":{"tex":"j = i \\bmod 2^c","displayMode":true,"mathml":"<span class=\"katex\"><math xmlns=\"http://www.w3.org/1998/Math/MathML\" display=\"block\"><semantics><mrow><mi>j</mi><mo>=</mo><mi>i</mi><mtext> </mtext><mo lspace=\"0.22em\" rspace=\"0.22em\"><mrow><mi mathvariant=\"normal\">m</mi><mi mathvariant=\"normal\">o</mi><mi mathvariant=\"normal\">d</mi></mrow></mo><mtext> </mtext><msup><mn>2</mn><mi>c</mi></msup></mrow><annotation encoding=\"application/x-tex\">j = i \\bmod 2^c</annotation></semantics></math></span>"}}]},{"id":"d0f2e9aa-0ac0-4c53-be2f-6bd97a4115ab","topic":"地址变化：","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"cb6d978c-bf36-4074-9b6e-d48370836609","topic":"大题第二步（根据地址应声规则计算正确的地址形式）","expanded":true,"style":{"background":"#FF9595"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-d09128dc9dc927.png","width":371.17,"height":276.56},"children":[{"id":"f6558105-e5ca-47c5-884d-03c3f2f86517","topic":"此时主存的地址样子","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-7cfbea02671474.png","width":229.61,"height":259.73},"children":[{"id":"5477d219-1340-476f-8eb4-f29044bf40c5","topic":"CPU访问例子（大题第三步）","expanded":true,"style":{"background":"#FF9595"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-f0b6be31f7e57f.png","width":405.65,"height":252.71}}]}]}]},{"id":"e49fc165-83ed-439f-ba47-38a0305642db","topic":"电路图","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"97dbc820-3591-4785-98d6-1fd501826174","topic":"图示","expanded":true,"style":{"background":"#FDD834"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-4e3cfe79e7b6dc.png","width":356.79,"height":280.11},"children":[{"id":"18cf2ff3-e0c7-433b-bbf3-84fa36f8f609","topic":"首先获得访问的地址<块号、块内地址>","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"25ae7baf-79d0-42f1-bf6b-bafe4a790297","topic":"<页号、偏移量>","expanded":true}]},{"id":"2dd5a68c-14f3-4e4f-b1b1-7e343190ca17","topic":"解析页号，获得最末尾的c位，【直接定位到】Cache的对应行，把前t位与当前标记位进行比较，如果相同则命中。","expanded":true,"style":{"background":"#FF9595"}}]}]},{"id":"2547ae02-f177-494d-b005-b4ee19826617","topic":"Cache每行结构：","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"771c6c37-78c3-41e9-a545-1f64add5dd93","topic":"Cache每行有 1+1+19+64*8 = 533 bit","expanded":true,"style":{"background":"#FDD834"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-2c22af418a6ce7.png","width":367.74,"height":244.55}}]},{"id":"a0e81ecd-6df3-42d4-a212-1d9814c37d0b","topic":"特点","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"ce2c5703-f8ba-4166-9ce7-f137b120a02a","topic":"简单，不够灵活，冲突率高，空间利用率低","expanded":true,"style":{"background":"#8EDE99"}}]},{"id":"8b636847-ae61-4bdf-a161-569255af8329","topic":"课后题目：","expanded":true,"style":{"background":"#FFABD5"},"children":[{"id":"9eaef461-0b15-4d4d-b9fc-c81c8f7ed24e","topic":"已知主存地址，装入Cache的对应地址","expanded":true,"style":{"background":"#FFABD5"}},{"id":"c02f3c23-dc1b-4b03-8283-b53a20d464a3","topic":"已知主存地址，问对应的Cache行的标记","expanded":true,"style":{"background":"#FFABD5"}}]},{"id":"f759ea38-6368-4248-a3ca-d5c768a89f43","topic":"例如：Cache一共有8行，页面大小为1K，地址总数为16bit","expanded":true,"style":{"background":"#FFABD5"},"children":[{"id":"ee198fe0-6d6f-4e1f-99f0-880041841d92","topic":"100, 110, 0010010011","expanded":true},{"id":"7d6b4af3-09c8-4584-ae1c-887f9b450c2f","topic":"3bit标记号、3bit行号、10bit偏置值","expanded":true},{"id":"faad54b9-f07c-43d4-a613-43a0e46016da","topic":"前3+3bit指明了内存中对应的块号（前3需要存储在Cache中，而后3是Cache当前行的行号）","expanded":true,"style":{"background":"#FFABD5"}}]}]},{"id":"38198321-cc1f-4946-b697-b9aa7df8b71d","topic":"全相联映射","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"322824c3-12ed-472b-b71a-072ab38cb7b4","topic":"映射规则：","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"f4f2f0c5-7941-4b79-8f06-aef8bad76dc1","topic":"主存中的块可以存入Cache中的任意位置","expanded":true,"style":{"background":"#FDD834"}}]},{"id":"0ffeb6d4-1fc5-417a-a3ee-3126073c363a","topic":"映射公式","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"5748ebaf-9ea1-44e6-a9bf-95cd19af14ce","topic":"【无】","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"b722ae72-f904-4d03-bb15-1b733353a9d1","topic":"查找方式：遍历所有Cache行","expanded":true,"style":{"background":"#8EDE99"}}]}]},{"id":"6c50ac8c-30db-4948-8b41-1705b702a01f","topic":"地址变化：","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"20541f89-d9e7-47fb-a53f-dddaf3d22fe1","topic":"大题第二步（根据地址映射规则计算正确的地址形式）","expanded":true,"style":{"background":"#FF9595"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-fbe523b3328648.png","width":371.81,"height":246.47},"children":[{"id":"0093e9dd-4e7a-4601-bf42-c050e41ea063","topic":"此时主存的地址样子","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-3bc1cfc20ac0cf.png","width":248.67,"height":258.92},"children":[{"id":"ca49f625-5db2-4461-b015-310771a6c535","topic":"CPU访问例子（大题第三步）","expanded":true,"style":{"background":"#FF9595"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-434393249944cd.png","width":454.67,"height":261.9}}]}]}]},{"id":"343485c1-8bdf-48a1-8e60-f97318738462","topic":"原理","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"504e596b-67aa-427f-9430-2ca9c9dbe571","topic":"首先获得访问的地址<块号、块内地址>","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"b23541cc-3a6e-4a63-9c48-15f1bb8ba3da","topic":"<页号、偏移量>","expanded":true}]},{"id":"c42f84d5-cdfe-49e1-8fe8-b039f227ef83","topic":"解析页号，【遍历】整个Cache标记，进行比较，找到标记相同的","expanded":true,"style":{"background":"#FF9595"}}]},{"id":"67a07579-3c58-431b-9bf1-59432d9aa3ed","topic":"特点","expanded":true,"children":[{"id":"d69cb0c1-73a1-4a19-a93c-46c34315b1d7","topic":"灵活、冲突率低、利用率高、命中率高","expanded":true},{"id":"f1f28100-c838-44cc-86ec-b954151346b0","topic":"比较速度慢，实现成本高，需要昂贵的TLB(相联存储器)进行地址映射","expanded":true,"style":{"background":"#8EDE99"}}]},{"id":"fb8240a0-b78b-4320-84a0-73da03709c83","topic":"Cache每行有 1+1+3+22+64*8 = 539 bit","expanded":true,"style":{"background":"#FDD834"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-46d8dcb228a216.png","width":318.36,"height":168.62},"children":[{"id":"ec7d2f05-4e27-42cc-af9c-44a7607f21cb","topic":"有效位：LRU算法需要3bit","expanded":true}]}]},{"id":"9e8a7f35-38fc-496e-a0b8-c2a58eda2264","topic":"组相联映射","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"693526ec-b06c-4373-8773-0ee5f9b33903","topic":"组相联映射规则：","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"dcee16d6-39c4-4eab-8fec-a12e3ccc5d8e","topic":"主存在Cache中的组号 = 主存块号 % Cache总组数","expanded":true,"style":{"background":"#FDD834"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-b5cde1e56f1645.png","width":1112,"height":1272}}]},{"id":"370a6880-d547-41d4-ba3c-f6d0605b9caf","topic":"N路组相联 --- Cache每个组中有N个Cache行","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"24743f08-cab4-4387-b539-82affbe34b1a","topic":"2路组相联：两个一组","expanded":true}]},{"id":"8e954fe6-1d57-4145-90a1-e88871b3db8e","topic":"映射公式","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"0558d712-f867-43d4-9a36-64f0ff4ef97d","topic":"把Cache分为大小相同的组，每个组对应了主存的一个区域的内容。组间采用直接映射，组内采用全相联映射（i 为 主存的页号，j 为 Cache的行号、Q为Cache的组数）","expanded":true,"style":{"background":"#8EDDF9"},"formula":{"tex":"j = i \\bmod Q","displayMode":true,"mathml":"<span class=\"katex\"><math xmlns=\"http://www.w3.org/1998/Math/MathML\" display=\"block\"><semantics><mrow><mi>j</mi><mo>=</mo><mi>i</mi><mtext> </mtext><mo lspace=\"0.22em\" rspace=\"0.22em\"><mrow><mi mathvariant=\"normal\">m</mi><mi mathvariant=\"normal\">o</mi><mi mathvariant=\"normal\">d</mi></mrow></mo><mtext> </mtext><mi>Q</mi></mrow><annotation encoding=\"application/x-tex\">j = i \\bmod Q</annotation></semantics></math></span>"}}]},{"id":"ac17f62a-5daa-453f-b70f-0fa519d72c06","topic":"地址变化：","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"1f40a394-e311-45c6-b40e-deff4eed530e","topic":"大题第二步（根据地址应声规则计算正确的地址形式）","expanded":true,"style":{"background":"#FF9595"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-e1db8c84b7b8d3.png","width":381.96,"height":309.3},"children":[{"id":"2a8b5357-d381-4e6b-8a21-25b1d5e7c807","topic":"此时主存的地址样子","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-dee8b4c5087247.png","width":251.84,"height":301.91},"children":[{"id":"7eebe138-e6c5-4a88-b46d-fdc6c41b56a2","topic":"CPU访问例子（大题第三步）","expanded":true,"style":{"background":"#FF9595"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-7cd464c000d905.png","width":491.21,"height":295.92}}]}]}]},{"id":"34baf678-e789-4ee2-a196-fb93fbae45e2","topic":"Cache每行结构：","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"05bcefed-0f22-427b-9f26-36e7c17ae725","topic":"Cache每行有 1+1+1+20+64*8 = 535 bit","expanded":true,"style":{"background":"#FDD834"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-a93a962172f118.png","width":385.36,"height":202},"children":[{"id":"b7fd9e0c-8bf6-4442-a449-944f77570028","topic":"查找Cache时就是查找标记阵列的标记项是 否符合要求","expanded":true},{"id":"0122fa3d-2854-4ef2-aba9-c31c93db6505","topic":"标记项组成的二维标记阵列","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-c95775b6c3e93a.png","width":323.81,"height":147.26}}]}]},{"id":"0ad08c7b-948f-4875-b87b-5688ec5d304e","topic":"奇葩的题目","expanded":true,"style":{"background":"#FFABD5"},"children":[{"id":"258f4482-4c01-493b-9d7f-dbd2bc64af91","topic":"组相联映射还可以把最末的几位作为组号","expanded":true,"style":{"background":"#FFABD5"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-b4044a8d111dd0.png","width":429.24,"height":234.21}}]}]}]},{"id":"91d3cc93-8822-46cd-93ad-adaef3b96ea3","topic":"Cache的替换算法","expanded":true,"children":[{"id":"d771229d-daf8-4475-aa10-088e7fce48ef","topic":"直接映射：","expanded":true,"children":[{"id":"f11716d1-8ccd-4750-a19c-11e2bf6d1470","topic":"冲突直接覆盖","expanded":true}]},{"id":"6a15340a-1866-468b-865f-4ed290239e72","topic":"组相联和全相联","expanded":true,"children":[{"id":"082156d5-9da7-44b8-8fca-e8caf532446e","topic":"RAND --- 随机算法","expanded":true,"children":[{"id":"6bf26055-1913-406c-844b-451f33ace99a","topic":"随机确定一个替换的块","expanded":true}]},{"id":"06bae774-c461-4218-a243-834cd9be20ef","topic":"FIFO --- 先进先出算法","expanded":true,"children":[{"id":"f4bd448f-9f95-4e4c-9c83-34eb39e86ca2","topic":"将最早调入的行调出","expanded":true},{"id":"a7d25315-ca3e-45cb-a9a0-adb41bb46c87","topic":"会出现Belady异常、抖动","expanded":true,"style":{"background":"#8EDDF9"}}]},{"id":"be939da1-f165-45c3-891a-2e6eed572787","topic":"LRU --- 最近最少使用算法","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"60897ef7-9b1b-4c3b-8472-5a73b0d8e527","topic":"堆栈类算法，在每个cache中添加一个“counter位”","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"d8997e13-5603-4505-bb35-997dfe351aa0","topic":"2^n 路组相联，就需要n bit的计数位","expanded":true,"style":{"background":"#FF9595"}}]},{"id":"7cec4720-2a65-41f2-97cb-91b684b808c7","topic":"举例","expanded":true,"style":{"background":"#FDD834"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-1e4a09ea82d070.png","width":508.6,"height":150.8},"children":[{"id":"046b6ecc-6b0d-40eb-8ebe-0e3f17ab0594","topic":"使用counter计数来模拟堆栈的实现，阴影数值越小，说明越新进入Cache","expanded":true,"style":{"background":"#FF9595"}},{"id":"e7b330fa-bb94-4744-a6b1-055ce1692c5e","topic":"counter的值是有范围的 0 ~ 2^n-1，不会超过","expanded":true,"style":{"background":"#FF9595"}}]}]},{"id":"ff82d556-819b-4668-baeb-0f0dc88b95b5","topic":"LFU --- 最不经常使用算法","expanded":true,"children":[{"id":"2bd0dbbc-deec-43ea-8150-b1f62f62e871","topic":"每行都添加一个counter位，在一段时间内，每被访问一次，counter++。换出时把counter最小的换出","expanded":true,"children":[{"id":"7f2fff10-8348-4814-a5ae-eab820e70777","topic":"没有遵循局部性","expanded":true,"style":{"background":"#8EDDF9"}},{"id":"f8f9a154-95f5-464a-8371-a36c75b1557d","topic":"counter的大小未知","expanded":true,"style":{"background":"#8EDDF9"}}]}]}]},{"id":"c19f5bda-227d-4b02-9c69-cee028da5a2c","topic":"与OS的请求分页置换算法一致","expanded":true,"icons":["emoji:💬"],"style":{"borderStyle":"dashed","borderColor":"#F59E0B"}}]},{"id":"bb59521d-5765-4097-8012-354fb66ef5e1","topic":"Cache的写策略","expanded":true,"children":[{"id":"6c2ab4e4-5c6e-46d4-89d8-addf7fe2dae1","topic":"原因：Cache存储的是主存内容的副本，当Cache内容进行变更时，需要使得Cache和主存的内容保持一致","expanded":true,"style":{"background":"#8EDDF9"}},{"id":"ca2d79fc-4be3-4197-9042-539863b3bb99","topic":"写命中","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"f2cd6909-e14e-447e-a73e-c7397accb6cd","topic":"全写法/写直通法","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"5136fa25-6bb8-4e25-880a-4de695618ef7","topic":"把数据同时写入Cache和主存","expanded":true,"style":{"background":"#8EDDF9"}},{"id":"4e8a89af-d1a9-42c5-bd73-c4103e0fb0fe","topic":"当需要进行替换时，可以不做其他操作，直接进行替换操作","expanded":true,"style":{"background":"#8EDDF9"}},{"id":"6431e592-3b0a-4bc9-a6c9-004d2d6045b1","topic":"优化【CPU对主存的访问次数过多】：","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"79aca2f4-9708-4a6b-b4db-d24e07eb47b8","topic":"写缓冲","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"8c713c5c-cb0b-4ae5-96b0-9fc91ae57a00","topic":"在Cache和主存中加入一个写缓冲，CPU写数据到写缓冲中，写缓冲再自行控制将数据写入主存","expanded":true,"style":{"background":"#FF9595"}}]}]}]},{"id":"0bb7953e-bca0-45f2-8481-d6ede9add3e9","topic":"写回法","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"04d6117d-a647-4d62-980b-a08951f507d4","topic":"CPU只对Cache进行修改","expanded":true,"style":{"background":"#8EDE99"}},{"id":"4fa6a73f-03da-4cb7-8484-0405515e80a2","topic":"在Cache的每一行中添加一个脏位","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"4a521ee4-c6dc-4ab6-8cf6-7c4f31ee17aa","topic":"如果要进行Cache块置换的时候，如果发现该行的脏位为 1，则需要把该Cache块写回内存","expanded":true,"style":{"background":"#8EDE99"}}]}]}]},{"id":"37268ff4-7746-4d4e-99fc-17f85ae70916","topic":"写不命中","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"1de70041-ebfd-4b32-b77d-85d73a1ad9b9","topic":"写分配法","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"cec834ec-d6b5-463c-a347-9e0bbba8424d","topic":"每次写不命中，都先把这个数据块写入到Cache中，然后把数据修改到Cache中，设置脏位为 1","expanded":true,"style":{"background":"#8EDE99"}}]},{"id":"b06ed5e3-9164-4fd3-bbb6-d242bd2047d4","topic":"非写分配法","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"e2d01b1e-544a-46d6-b7c7-74e5b25c08e5","topic":"每次写不命中，只写入主存，不进行调块","expanded":true,"style":{"background":"#8EDDF9"}}]}]},{"id":"50271917-7078-40a6-81f8-b6e489f5b0f8","topic":"通常搭配","expanded":true,"children":[{"id":"4e5b93ca-f52a-4671-aed4-c387dd53a914","topic":"【全非】全写法 + 非写分配法","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"8a8d66de-458c-4041-b6c9-6ec868c87f76","topic":"写命中同时写回Cache和内存，写不命中只写回内存","expanded":true,"style":{"background":"#8EDDF9"}}]},{"id":"07e0e94f-1ffb-477d-ba11-a082741598b4","topic":"【回写】写回法 + 写分配法","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"4cfd2a4b-2b0d-4122-a7ef-fc5cbd02fffa","topic":"写命中只写入Cache并修改脏位，写不命中则把块调入到Cache中，并只修改Cache","expanded":true,"style":{"background":"#8EDE99"}}]},{"id":"e6529793-6b0c-44e9-8c8a-8f41bdc61860","topic":"多级Cache的混合搭配","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"da212075-74f5-4a54-9ab2-53e07dd21c27","topic":"图示","expanded":true,"style":{"background":"#FDD834"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-171c129a5d873b.png","width":473.63,"height":87.46},"children":[{"id":"31eb35eb-8ac2-49ed-99a9-f8a9fa886120","topic":"CPU -> Cache -> L2 Cache","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"07c02ef1-e018-495f-b70f-5a2e30e3cc65","topic":"采用的是全写法 + 非写分配法（因为有写缓冲）","expanded":true}]},{"id":"0b75de41-993e-43b7-9ce7-daa01ff0c8bf","topic":"Cache -> L2 Cache -> DRAM","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"21c60a1c-6d0a-48fc-b24d-fd7be40fcf5d","topic":"采用的是写回法 + 写分配法","expanded":true}]}]},{"id":"3e8a41dd-3f6d-4ffb-8013-37db478e088b","topic":"离CPU越远，容量越大，速度越慢","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"d8498192-5dd2-4e8e-af75-f0ba39c8d5c9","topic":"Cache 存 L2 Cache 的复制\nL2 Cache 存 DRAM 的复制","expanded":true,"style":{"background":"#FDD834"}}]}]}]}]},{"id":"de505f10-1fd3-43c7-8c07-0c07e2018629","topic":"考频：超高","expanded":true,"style":{"background":"#BA69C8"},"children":[{"id":"ced4ddf6-b28a-4cd2-8044-118d4ad3a850","topic":"09*2、12、14、16、17、21、22、10大、13大、16大、20大","expanded":true}]}]},{"id":"955e10cb-da76-414f-aba2-1c89a0adae8c","topic":"虚拟存储器","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-44b04ee4db8d01.svg","width":64,"height":64},"children":[{"id":"7a8d74a9-4e5b-4374-bd34-68aaf17e97d2","topic":"考频：超高","expanded":true,"style":{"background":"#BA69C8"},"children":[{"id":"8b42465c-83f5-4342-8222-1cc7b69ef714","topic":"10、13、15*2、19、20、22、11大、18大、21大","expanded":true}]},{"id":"0a1fd9c8-7135-4408-8669-675b322a2739","topic":"虚拟存储器对应用程序员是透明的，是操作系统使用虚拟技术创造的具有主存速度辅存容量的存储器","expanded":true},{"id":"261025aa-6c49-41ea-b1dd-1a56cbd421e4","topic":"用户编程使用逻辑/虚地址来进行编程，操作系统自行将其转为对应的物理/实地址","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"88c63077-a16c-4804-bce6-8437deee59ec","topic":"虚拟存储器的三个地址空间","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-dad8eab77c70fe.png","width":427.83,"height":205.44}}]},{"id":"56ec1a25-11a0-4187-8071-83e9e8e9dd21","topic":"页式虚拟存储","expanded":true,"children":[{"id":"fc2fb1ea-8832-4f9e-9e35-d1af9912b29e","topic":"页表","expanded":true,"children":[{"id":"146fc651-3cff-4ea4-814a-b22686288e80","topic":"作用：找到逻辑地址对应的物理地址","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"7aecd8b2-18fe-4274-bb21-9d27fad7888b","topic":"虚拟地址的空间：内存 + 外存","expanded":true,"style":{"background":"#8EDE99"}},{"id":"977e6c9d-4b6f-442b-b0e0-8ff69cf9a81a","topic":"实地址的空间：内存","expanded":true,"style":{"background":"#8EDE99"}}]},{"id":"7fa502d7-6d8f-4c77-b0de-28d13d98f322","topic":"页表项","expanded":true,"children":[{"id":"fce561cb-ef06-4c55-ad48-1b197b3084d1","topic":"主存中的页表实例：<有效位、脏位、引用位、物理页号>","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-362c0fc0c3527c.png","width":440.92,"height":245.1},"children":[{"id":"5b753951-9926-414f-8bdb-35c11892e34a","topic":"有效位：装入位，表示是否已经装入内存","expanded":true},{"id":"6c6b6a5f-0e1e-4768-a3e4-f257b7141ac4","topic":"脏位：是否被修改过","expanded":true,"children":[{"id":"126869e1-a0bb-47a9-8428-a35453df5ad0","topic":"采用【写回法】","expanded":true}]},{"id":"eb3bfadc-8faa-45a9-aad2-4843e921e1dc","topic":"引用位：使用位，给置换算法用的","expanded":true},{"id":"aa19dea3-e3d4-4b56-9d69-7578509b1621","topic":"磁盘地址/页号：有效位为 1，则存的是内存页号。有效位为0，则存的是磁盘块号","expanded":true,"style":{"background":"#8EDE99"}}]}]},{"id":"f7072d34-439a-4d67-b6a7-9fffbe53c198","topic":"地址转化：","expanded":true,"children":[{"id":"8218c7c2-c3e7-4f59-a89c-240e7aef0191","topic":"图示","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-60e85a18cf70b9.png","width":342.56,"height":278.05}}]}]},{"id":"7b99c864-8654-42a3-afdc-22614514dbae","topic":"快表","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"9f112c16-f84f-40b9-8c28-03131969e684","topic":"TLB 相联存储器，由高速缓冲器组成","expanded":true,"style":{"background":"#8EDDF9"}},{"id":"224fcb41-b3b2-4c0d-9251-cf7c358ef6ee","topic":"快表项","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"75dd203b-c7f8-44f7-be9c-cdc1f00a9443","topic":"<虚页号、物理页号>","expanded":true,"style":{"background":"#8EDDF9"}}]},{"id":"71bcf842-1e3f-4e67-9e2d-5ae6e00a1db3","topic":"作用：能够更快速的进行逻辑->物理的地址转化","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"c5c529c8-652b-469a-9e66-1412c5761c72","topic":"利用局部性原理，如果在TLB中命中，就可以不用去内存中查询慢表了（少了一次内存访问）","expanded":true,"style":{"background":"#8EDDF9"}}]},{"id":"4f94c123-b292-42d0-a862-22247716b980","topic":"采用：全相联映射/组相联映射","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"98613dbb-b1f2-4c83-8b32-702082cffe88","topic":"快表同样可以采用所有Cache的映射方式和替换算法","expanded":true,"style":{"background":"#8EDDF9"}}]},{"id":"3c10d131-69ca-4f0d-a61d-fc0bb7b21fd0","topic":"TLB命中了，主存一定命中","expanded":true,"style":{"background":"#FFABD5"},"children":[{"id":"2aa3663f-9489-4f14-bae9-8151eba90407","topic":"Cache命中了，主存也一定命中","expanded":true,"style":{"background":"#FFABD5"}}]}]},{"id":"b9bba354-889f-4731-b0f2-ab6e699ff1c3","topic":"TLB + Cache 的多级存储系统","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"2e481cb3-33d1-42cf-84cb-45722b124009","topic":"第一步：虚拟地址到物理地址","expanded":true,"style":{"background":"#FDD834"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-3b1ca0328d81b7.png","width":410.57,"height":397.68},"children":[{"id":"c7cd0d3e-1de2-4faa-93b7-02ec1b020dee","topic":"第二步：物理地址的Cache表示形式","expanded":true,"style":{"background":"#FDD834"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-f552e6ab9b465f.png","width":396.73,"height":406.06},"children":[{"id":"be38d61c-6b02-47e9-9320-c46c76ad7038","topic":"CPU给出虚拟地址<虚页号 + 页内地址>","expanded":true},{"id":"7b5456a7-5f37-44ca-aea5-d7acd626ada4","topic":"OS层：","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"e0459fb5-37dd-46e9-b84f-e5abcd3a7e16","topic":"解析虚页号，查快表","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"5b39405a-e7ab-4d5b-993c-8633f0ff8de2","topic":"若命中了直接跳到合成物理地址","expanded":true,"style":{"background":"#8EDE99"}}]},{"id":"cedc8190-919a-4458-8046-aa72f23b7ce5","topic":"若没命中，首先定位到页表寄存器，获得页表始址 + 页表大小，如果页表溢出了就报错","expanded":true,"style":{"background":"#8EDE99"}},{"id":"3c546318-a605-4502-98af-0ae22a674372","topic":"随后通过(页表始址 + 一级页号)访问到对应的页目录表，找到对应的二级页表","expanded":true,"style":{"background":"#8EDE99"}},{"id":"939f3d13-3da0-4d00-932e-cdc85fac6f90","topic":"通过(二级页表表号 + 二级页号)找到对应的页表项，获得页表项中的存储的实页号","expanded":true,"style":{"background":"#8EDE99"}}]},{"id":"1cf50333-2326-4e9c-afd7-cfdc7668bc9b","topic":"把【虚拟地址】 ( 实页号 + 页内地址 ) 合成为【物理地址】","expanded":true,"children":[{"id":"95997ac8-d403-44e0-95bb-e987fd6da607","topic":"同时要更新TLB","expanded":true,"children":[{"id":"6058f01d-32f7-4def-8a83-cd8f0a6921da","topic":"在这一步的时候，页面一定在内存中了","expanded":true,"icons":["star:dark-blue"],"style":{"background":"#FDD834"}}]}]},{"id":"a0028f67-bac3-4970-a125-2debda37f89c","topic":"硬件层：","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"3266cfc9-8a07-413a-b884-801c8dfe2824","topic":"解析物理地址，得出Tag、组号、块内地址","expanded":true,"style":{"background":"#8EDDF9"}},{"id":"d2aedc69-1c86-45a7-b6c6-f5c5328d75b4","topic":"通过组号对应的Cache组，随后遍历Tag找到对应的Data，进行访问","expanded":true,"style":{"background":"#8EDDF9"}},{"id":"a18e11b7-fca8-46fe-9f21-e0568b17aedb","topic":"如果遍历了所有Tag没有找到Data，那么直接去访问主存找对应的数据","expanded":true,"style":{"background":"#8EDDF9"}}]},{"id":"8ac42d4e-c0ef-4c0d-92b0-84635bc2e591","topic":"把数据送到CPU","expanded":true}]}]}]}]},{"id":"9f270e9a-1cf2-4ec8-98e5-e4c12cae40ca","topic":"段式虚拟存储","expanded":true,"children":[{"id":"c92f6ea3-113a-4295-afaf-7d7c0a1fc5d9","topic":"与主存交换信息采用”段“","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"524d50cd-8332-424c-941c-adca0751d00f","topic":"略","expanded":true}]}]},{"id":"68885456-03ba-4532-bd8c-68ecc6e3b312","topic":"段页式虚拟存储","expanded":true,"children":[{"id":"569d95e9-6fb0-4194-a094-ac8ebd1bab54","topic":"与主存交换信息采用”页“","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"29dea277-2075-4de5-9bae-4054a8a3e9ea","topic":"略","expanded":true}]}]},{"id":"1fc51888-5704-4653-8318-48c47de8c346","topic":"Cache、TLB、页表的组合情况：","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"5cdcdf55-db37-42c5-947e-67ec640eea11","topic":"图示","expanded":true,"style":{"background":"#FF9595"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-b2371b91475b3b.png","width":561.83,"height":249.29}}]},{"id":"1fce7971-9d97-4286-9987-1997c8cc08cf","topic":"虚存 和 Cache","expanded":true,"children":[{"id":"70dafaa1-5027-469b-a95a-ea126e74a4b0","topic":"相同处","expanded":true,"children":[{"id":"5e70adc4-b752-4a0c-b3f7-280d880daa2f","topic":"都提高了系统性能，两者都有容量、价格、速度等的梯度","expanded":true},{"id":"6cac9834-07c4-4688-965a-35c319512a13","topic":"都把数据分成了若干块，虚存的块更大(页面大小) ，Cache的块更小(内存块大小)","expanded":true,"style":{"background":"#FF9595"}},{"id":"3d64df2c-d9c3-4dd6-93a8-9f39d0f8638c","topic":"都有地址映射、替换算法、更新策略","expanded":true},{"id":"ead1e985-94ce-43f3-b604-1b6e9156967b","topic":"都运用了局部性原理","expanded":true}]},{"id":"0a6104a8-abfb-4076-aa66-daa0613df870","topic":"不同处","expanded":true,"children":[{"id":"009e8395-e427-469b-9b20-6460f93619e3","topic":"Cache解决系统速度问题","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"9319fb9e-25a7-4eb1-a266-3a2b5c3236e7","topic":"虚存解决主存容量问题","expanded":true,"style":{"background":"#FF9595"}}]},{"id":"55fa57a0-2c53-4b4f-81f4-c199a5561d5d","topic":"Cache纯硬件实现，对所有程序员都透明","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"036a2e7d-6c7c-4fa5-9cf1-7eb6bdf33bb7","topic":"虚存对系统程序员不透明","expanded":true,"style":{"background":"#FF9595"}}]},{"id":"1c1e24c0-7d0c-4192-ad52-756316c164c3","topic":"Cache不命中对速度影响没有虚存不命中的影响那么大","expanded":true,"children":[{"id":"3d8687d1-dc8c-491e-987d-ed3f6aa0216e","topic":"Cache不命中：读内存","expanded":true},{"id":"5691d174-ac3b-4135-8297-b5859686b078","topic":"虚存不命中：读外存","expanded":true}]},{"id":"186c990b-f28a-4692-af83-bf61554b8fa3","topic":"Cache不命中时，CPU直接访问主存","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"48d744d2-47a5-4c69-a878-003481e5e0b0","topic":"虚存不命中时，只能先把硬盘的数据调入内存，再与CPU通信","expanded":true,"style":{"background":"#FF9595"}}]}]}]}]},{"id":"2be22230-e488-4288-a667-8a29be5e54f7","topic":"END","expanded":true}]},"relations":[{"id":"7652c369-c6db-4c52-9863-10afb3a0b5fe","from":"39a07011-e827-42e6-9474-2c0bc68e0d4c","to":"d09f5331-d3e0-47ee-9ac8-98f6a645e53d","bidirectional":false,"label":"工程难度显著减少"},{"id":"c438bb07-1b9a-4f72-a862-8a6de1b54379","from":"71d71b75-a83f-4066-af37-8882eb26e931","to":"aedb4bdd-e350-406d-bb46-b5c915a97824","bidirectional":false,"label":"闪存翻译层"},{"id":"70a795ce-b145-4ce4-91d9-a5da840519f8","from":"79c6c036-bab4-4151-ba88-32441c914ae0","to":"d93bab73-f388-4453-aad0-201b63b7253a","bidirectional":false,"label":"例如这个图"}],"summaries":[{"id":"38ff8281-4f23-4926-92c5-fc0c89cc1430","parentId":"de09c335-7bab-4210-aa79-cf42150f7c8c","start":0,"end":3,"label":""},{"id":"abf630e1-f569-4263-a099-05f769cfc90d","parentId":"07981c47-bc78-40c8-b57d-9894a49371b9","start":0,"end":0,"label":"静态平均的效果比动态平均效果更好"},{"id":"8e17465a-888a-4b7e-be36-597133f77627","parentId":"7b5456a7-5f37-44ca-aea5-d7acd626ada4","start":2,"end":3,"label":"如果过程中发现了对应的页面不在内存中，则进行缺页处理程序（换出页面、把磁盘中的页【调入到内存】，更新页表）"},{"id":"6b302a0c-511a-41c5-b286-17437216fa4a","parentId":"a0028f67-bac3-4970-a125-2debda37f89c","start":1,"end":2,"label":"如果Cache访问缺失了，则换出Cache中的一行，把对应的主存块的内容写入到Cache中，设置标记项"},{"id":"bc5380e4-2091-4a96-967f-045f554becdf","parentId":"2e481cb3-33d1-42cf-84cb-45722b124009","start":0,"end":0,"label":"也可以合起来图"},{"id":"a0d6ca80-3cc0-4841-9af0-a8795765cc39","parentId":"0a6104a8-abfb-4076-aa66-daa0613df870","start":0,"end":0,"label":"Cache - 空间换时间；虚存 - 时间换空间。"}],"boundaries":[{"id":"0eee7209-c157-4a34-b2b3-30b04d89d2c8","parentId":"5f883662ae4bbb241d8fb8fc10","start":0,"end":0,"label":"题目没说刷新时间，那就是2ms","style":{"stroke":"#FF5252"}},{"id":"0071a915-1397-499c-b4ae-6f1cf8164f2f","parentId":"ff8d7397-011c-4620-bcc6-37b3c9338d22","start":0,"end":4,"label":"一共五大部分"},{"id":"81a9193d-b7b0-4c04-9214-871ea9775f9b","parentId":"56ec1a25-11a0-4187-8071-83e9e8e9dd21","start":2,"end":2,"label":"重要考点"}]}}},{"id":"1885048b-7d79-47ca-9b2b-489e7b18cbdb","topic":"第四章 指令系统","expanded":true,"nestedMap":{"src":"kaoyan/408/computer-organization/co-00-sheet4","expanded":false,"maxHeight":260,"doc":{"format":"brushup-mindmap-v1","id":"co-00-sheet4","title":"第四章 指令系统","structure":"timeline-h","theme":"auto","root":{"id":"548a974231180a54b17db9bc5f","topic":"第四章 指令系统","expanded":true,"children":[{"id":"17da2d8c-f647-4aed-9685-ad64ba6b88fd","topic":"指令格式","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-ddb9345b2f4baa.svg","width":64,"height":64},"children":[{"id":"f83a927a-ebe4-4d99-b438-19c4e5587ea3","topic":"基本格式","expanded":true,"children":[{"id":"4a82946d-b758-4672-ae47-c2e06af9e24d","topic":"操作码 + 地址码（op + add）","expanded":true,"style":{"background":"#8EDDF9"}},{"id":"503448ec-151b-46cb-b9fe-05efa992a081","topic":"字长","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"f32c9d7f-cdf7-4d50-a6f5-103a86167c6f","topic":"指令字长","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"0d13cdaf-49aa-40c2-82a9-15c539970999","topic":"指令字长【可变】","expanded":true,"style":{"background":"#8EDDF9"}},{"id":"89b12548-3292-4104-8d9e-5ccc390f4da6","topic":"一条指令的总长度","expanded":true},{"id":"725275f8-ac3b-437e-880f-b743e45fdfa1","topic":"指令字长与机器字长无固定关系，可以使单字长、半字长、双字长","expanded":true}]},{"id":"e9286ad6-c894-4af5-a5b2-da874217bebe","topic":"机器字长","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"ea214836-d5bf-4a80-824a-fbebb74a0b06","topic":"CPU一次运算所能处理的位数","expanded":true,"style":{"background":"#8EDDF9"}}]},{"id":"b258be78-ade9-45de-be3f-90c41f50b474","topic":"存储字长","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"57431cfb-23c2-4dc8-9055-2a4eeb6dd71f","topic":"一个存储单元的位数","expanded":true,"style":{"background":"#8EDDF9"}}]}]}]},{"id":"39a4630e-0a9b-4312-9952-97bf0ee9c133","topic":"指令分类：","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"8cc2b14e-b2eb-449e-8333-865799b8bebf","topic":"零地址指令","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"b27a7b58-5e73-45cb-8c59-f634ff411a9f","topic":"OP","expanded":true,"style":{"background":"#8EDE99"}},{"id":"2ccecd3d-49e2-4c5e-801b-858edbedcc01","topic":"无操作数","expanded":true,"children":[{"id":"82acb14e-1e8e-40c7-8dd1-1e7e839e4dce","topic":"可用于不需要操作数的指令：空操作、停机、关中断","expanded":true}]},{"id":"28700b0d-6d0e-4f92-aa03-44a829e3cbd0","topic":"有操作数","expanded":true,"children":[{"id":"4bf6a722-291b-40db-aba9-bdf160b3dc09","topic":"用于堆栈计算机，把两个操作数从栈顶和次栈顶弹出，运算后再压回去","expanded":true}]}]},{"id":"b007b8c1-da5d-407a-97e1-319c0b668ab3","topic":"一地址指令","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"a6e7d0d4-cc17-4302-bf0e-9da7355ada85","topic":"OP A1","expanded":true,"style":{"background":"#8EDE99"}},{"id":"fca930d8-8943-4cbf-8b4a-cd50ebcd9893","topic":"单操作数","expanded":true,"children":[{"id":"27bb182a-69c1-42cb-be4e-38941f32a5cf","topic":"只有目的操作数的单操作数，OP(A1) -> A1","expanded":true,"children":[{"id":"f9e13f65-3587-4b0c-9623-ef845d5b01e5","topic":"三次访存：取指令，取A1，写回A1","expanded":true,"style":{"background":"#8EDDF9"}},{"id":"1ddacd13-01c1-48a7-8eb3-c771aac8a705","topic":"例如 ++, --, 取反，求补","expanded":true}]}]},{"id":"604ccea5-21d8-44f2-80de-4219e8122cdd","topic":"双操作数","expanded":true,"children":[{"id":"7811ed22-d06e-4eb2-9049-8a915eabddd1","topic":"(ACC)OP(A1) -> (ACC)","expanded":true,"children":[{"id":"bef5d299-920b-450c-b603-711445182fb7","topic":"两次访存：取指令，取A1","expanded":true,"style":{"background":"#8EDDF9"}}]}]},{"id":"d1b6424b-3d15-46ef-8b7e-c3e6d6fe423f","topic":"系统32位，若OP为8位，则A1可以寻址16M","expanded":true}]},{"id":"a7c01d75-20b6-4606-8fb4-c82123dd3a4b","topic":"二地址指令","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"04954013-77d8-43d7-96cb-a102e77ccdcb","topic":"OP A1 A2","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"9b4109ff-6f44-46f2-8079-afe3a447d573","topic":"操作码、目的、源","expanded":true}]},{"id":"dff95909-5871-4f56-8f30-fd5a15fcaeec","topic":"(A1)OP(A2) -> A1","expanded":true,"children":[{"id":"b3d8ac9c-d6c6-41aa-91a7-a65717290d5c","topic":"四次访存：取指令，取A1，取A2，写回A1","expanded":true,"style":{"background":"#8EDDF9"}}]},{"id":"0d7301a6-5013-455f-9503-f7071157191b","topic":"系统32位，若OP为8位，则可以寻址4K","expanded":true}]},{"id":"b9361b78-f288-47f3-b6a6-917d182514d0","topic":"三地址指令","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"1a113f7d-6b41-4f83-9664-0128630153a5","topic":"OP A1 A2 A3","expanded":true,"style":{"background":"#8EDE99"}},{"id":"825b6d7a-7fb6-4ef1-9632-01056da3f96c","topic":"(A1)OP(A2) -> A3","expanded":true}]},{"id":"fd8f69f3-341e-45c6-b924-71848f7c0a95","topic":"四地址指令","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"3bd3a57d-88c4-4118-ac0c-6ab4da1e1f9d","topic":"OP A1 A2 A3 A4","expanded":true,"style":{"background":"#8EDE99"}},{"id":"1f2a16a7-60c9-42e3-a694-0a0c3fa36fff","topic":"(A1)OP(A2) -> A3，A4为下一条指令的地址","expanded":true}]}]},{"id":"6b4b0dd7-8a47-45ca-bb73-09cf53d63b1e","topic":"定长操作码：","expanded":true,"children":[{"id":"dc3a6a73-97ad-434c-9f84-9f074701fe58","topic":"操作码有n bit，则一共有2^n个指令","expanded":true}]},{"id":"7e0013ee-4565-45c3-abdd-4cb22bd62658","topic":"扩展操作码：","expanded":true,"children":[{"id":"0f0ebe45-2472-4ef3-879f-7a21ab19fa66","topic":"图示","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-fba30381b57f2b.png","width":332.72,"height":389.49},"children":[{"id":"21c79fa9-eb19-4736-bb7d-18acb7ed8f09","topic":"更灵活的：动态的扩展操作码","expanded":true,"style":{"background":"#FFABD5"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-6e85887eba8ff8.png","width":516.33,"height":156.67}}]}]},{"id":"5c6b698a-dfa5-4a3f-a40e-daf5dc70a1b6","topic":"指令系统是软硬件的界面","expanded":true,"children":[{"id":"20ece0ba-95f6-41f3-b748-d3374df35d91","topic":"软件依靠指令和硬件进行交互","expanded":true}]},{"id":"de7d9e54-a362-46e3-9b38-adeed5fe9375","topic":"属于指令集体系结构（ISA）规定的有：","expanded":true,"style":{"background":"#FFABD5"},"children":[{"id":"d610b9a5-a22c-4615-aa8c-fe3ff9e35578","topic":"指令字格式和指令类型","expanded":true,"style":{"background":"#FFABD5"}},{"id":"4e01a156-cdb5-4f91-b075-ed69e757d4bd","topic":"通用寄存器个数和位数","expanded":true,"style":{"background":"#FFABD5"}},{"id":"3239647e-e9c4-496e-9db5-1d2f8917754a","topic":"没有","expanded":true,"icons":["emoji:❗"],"children":[{"id":"db69ab91-8f6b-408e-93d5-2744307980b5","topic":"CPU的时钟周期","expanded":true},{"id":"e2a34c66-dc32-4e3d-bd61-2b77ce872b84","topic":"加法器的进位方式","expanded":true}]}]},{"id":"bb41aded-48d7-4b03-b68a-6b1c9b6ac0ea","topic":"考频：低","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"436abac7-0715-4ff0-b52f-25cfd6947dbf","topic":"17、22*2","expanded":true}]}]},{"id":"93d4ab03-38c1-4993-9087-a21ad2602c97","topic":"指令寻址和数据寻址","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-54c6bb48937d38.svg","width":64,"height":64},"children":[{"id":"7f4592f7-19af-4669-8f2f-0f9f720b0055","topic":"考频：高","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"82987b72-16ff-4e05-9449-6336824fce9f","topic":"11*2、13、14、16-20","expanded":true}]},{"id":"a20c2c24-4aec-455c-92f5-9e4347e5fc98","topic":"指令寻址","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"1adc5d53-e60a-4590-9216-261fb2cf3818","topic":"顺序寻址","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"f6413cf7-4979-4969-b2db-da0a48f5b73a","topic":"PC计数器++","expanded":true,"children":[{"id":"8ff1b13b-2b29-4a2d-8fe2-990c6ecc5500","topic":"注意PC+1是加一个指令字长","expanded":true}]}]},{"id":"6dd22078-a127-404c-9524-96980f809ecb","topic":"跳跃寻址","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"678e42f4-14f7-4a75-b5c2-9f8a96295f7b","topic":"下条指令的地址码由指令给出","expanded":true},{"id":"20551a15-d661-4528-a538-de906dc5dafa","topic":"跳动地址分为绝对地址和相对地址","expanded":true}]},{"id":"040348c6-3283-4dc6-a944-23cfb94b8344","topic":"寻找下条运行\n的指令的地址","expanded":true,"icons":["emoji:💬"],"style":{"borderStyle":"dashed","borderColor":"#F59E0B"}}]},{"id":"dd6f1f7b-0360-4a0d-a25d-a9b2f0777e12","topic":"数据寻址","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"5b143d39-72c5-4161-8051-91dee78b6923","topic":"指令格式：","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"c6aec622-d87d-4d19-b466-6b5285e4e3cd","topic":"<OP，寻址特征，ADD>","expanded":true}]},{"id":"911ea132-3ffb-4879-b8a9-7213d384c626","topic":"隐含寻址","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"9bc2f913-9ceb-4a9f-9e70-5fb391e06f02","topic":"图示","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-bd37c8ae4e4443.png","width":368.34,"height":187.27},"children":[{"id":"2c8d5e97-9030-4cb4-b16b-9dc45e7a204e","topic":"即两个操作数：一个直接寻址，一个在ACC","expanded":true},{"id":"8533a288-d3d5-45fd-a4fd-4c08351482a7","topic":"给出一个操作数A的地址，与ACC进行运算","expanded":true}]},{"id":"5fd985da-cd41-4686-a25a-427314bd52c3","topic":"EA = A + ACC","expanded":true,"icons":["emoji:💬"],"style":{"fontSize":10,"borderStyle":"dashed","borderColor":"#F59E0B"}}]},{"id":"6a3eeca4-694a-4406-89a4-e8569bcc9b88","topic":"普通寻址","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"b61cd418-a802-49a8-96fe-e52b1890aee3","topic":"立即数寻址","expanded":true,"children":[{"id":"14d27916-9ae3-40bd-8170-2470589f4d8b","topic":"图示","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-ce881a888d0264.png","width":134.92,"height":80.33},"children":[{"id":"2df10efe-1c55-42d6-8fa6-c27ad6f22ec3","topic":"直接给出操作的立即数的数字","expanded":true}]},{"id":"c9820d52-5ea6-41c1-81ff-26621b48887b","topic":"无EA，#A","expanded":true,"icons":["emoji:💬"],"style":{"borderStyle":"dashed","borderColor":"#F59E0B"}}]},{"id":"f179ba6b-987b-48a6-84a8-1fcbef8b3c13","topic":"直接寻址","expanded":true,"children":[{"id":"e0d01a34-b5a1-4c8e-9a39-4e8acb6dd1d0","topic":"图示","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-b676330b7a77ab.png","width":274.44,"height":107.17},"children":[{"id":"8177cd0b-5e73-42aa-99fb-071314f28217","topic":"直接存有操作数的地址，EA = A","expanded":true},{"id":"ac6de6d9-9519-48bc-9735-22a45dc89992","topic":"优缺点","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"6e7168e8-34c1-4d12-988c-66ff45e271ce","topic":"优点：只需要一次访存就可以找到数据","expanded":true,"style":{"background":"#8EDE99"}},{"id":"a03ba1e9-a651-4acd-9339-c33501578d42","topic":"缺点：寻址的区间被A的地址所约束","expanded":true,"style":{"background":"#8EDE99"}}]}]},{"id":"f516ec39-6435-4b87-a77d-965e1b1facd0","topic":"EA = A","expanded":true,"icons":["emoji:💬"],"style":{"borderStyle":"dashed","borderColor":"#F59E0B"}}]},{"id":"024e74f1-490b-47e7-b8d0-2ce36a9dd4c7","topic":"间接寻址","expanded":true,"children":[{"id":"d35826a2-95a4-4e77-9545-b5372b15e6c8","topic":"图示","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-18ea70d104a086.png","width":409.69,"height":180.19},"children":[{"id":"7a9ec9e9-b249-4528-ada8-b83386af1811","topic":"可能存在多次间接寻址","expanded":true,"children":[{"id":"86158a6c-72c7-4811-a751-57f7e5760c07","topic":"多次间接寻址需要设置一个bit位来指明是否是最后一次寻址","expanded":true,"style":{"background":"#FF9595"}}]},{"id":"9a67989e-d747-4de7-874c-a83186c49776","topic":"优缺点","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"5e3d1b10-63bb-4e0f-b3c9-7ece9e44e574","topic":"可扩大寻址范围（理论可以访问到任何一个数据）","expanded":true,"style":{"background":"#8EDDF9"}},{"id":"91f544ee-1a19-4971-afff-05a2d45152a2","topic":"需要多次访存，访问速度过慢","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"7e0ee40c-f56e-489f-8a90-31e134dfcc35","topic":"不常用，题中谈及”扩大寻址范围“通常都指寄存器间接寻址","expanded":true,"style":{"background":"#8EDE99"}}]}]},{"id":"b1dd6db3-1cd8-4be4-b702-007ae6dca115","topic":"在【间址周期的末尾】需要把找到的真正地址覆盖到原本指令的形式地址中","expanded":true,"style":{"background":"#FFABD5"}}]},{"id":"df9f2b74-b011-448c-bd97-a58aae9be9fb","topic":"EA = (A)","expanded":true,"icons":["emoji:💬"],"style":{"borderStyle":"dashed","borderColor":"#F59E0B"}}]}]},{"id":"232e4adf-c8af-4acd-827c-37df49da7f50","topic":"寄存器寻址","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"b04747cf-1c03-4b20-90b1-cf0e109e4f30","topic":"寄存器寻址","expanded":true,"children":[{"id":"4fa4f19b-f089-4f1d-883f-a17d918106d0","topic":"图示","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-43786df4e37b63.png","width":127.4,"height":164.26},"children":[{"id":"2c7e268c-2e51-4943-87a3-7a9db2668d94","topic":"数据码部分的是寄存器编号，寄存器中存有操作数","expanded":true},{"id":"f31b2be7-fa9a-4cc7-a42f-b73966c3010e","topic":"优缺点","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"48f2d1e3-44a9-4cf1-b226-de873c38eb84","topic":"优点：不需要访存找到数据","expanded":true,"style":{"background":"#8EDE99"}},{"id":"5275d041-f68c-45cd-a1d5-f00c99368896","topic":"缺点：寄存器数目少","expanded":true,"style":{"background":"#8EDE99"}}]}]},{"id":"90b8d83f-4d68-4092-b67b-2bf0fce738fa","topic":"EA = Ri","expanded":true,"icons":["emoji:💬"],"style":{"borderStyle":"dashed","borderColor":"#F59E0B"}}]},{"id":"d35c12cb-0500-4dde-ba3e-82ee6cfa2ed6","topic":"寄存器间接寻址","expanded":true,"icons":["star:red"],"children":[{"id":"24b1ae73-ffda-4119-8f5a-42f4a350250b","topic":"图示","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-40fb7fe5e4794a.png","width":247.9,"height":212.48},"children":[{"id":"7e79f59e-bb72-4d7a-a988-bfde63b2ffbd","topic":"数据码部分是指明的寄存器编号，寄存器中存有操作数的地址","expanded":true}]},{"id":"ae1b1b2f-78b6-4c16-a60c-0bd8e27ef6c3","topic":"EA = (Ri）","expanded":true,"icons":["emoji:💬"],"style":{"borderStyle":"dashed","borderColor":"#F59E0B"}}]}]},{"id":"6ac23435-b842-40c9-8cdf-c035960d1ed5","topic":"偏移寻址","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"efe8043a-01f2-451d-8dc5-b764df5962da","topic":"相对寻址","expanded":true,"children":[{"id":"6781076a-0d1f-44de-b2d7-e774164d5f92","topic":"图示","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-a654ed5298f291.png","width":302.05,"height":161.96},"children":[{"id":"d43fd361-2f09-49f5-b44d-c05f520f1736","topic":"A是一个补码偏移量","expanded":true},{"id":"86e84412-e321-4f06-ae8a-b78629490df3","topic":"EA = (PC) + A","expanded":true,"children":[{"id":"2e815e10-4f16-48e0-90b0-2a669aafefe1","topic":"注意此时的PC已经移动到了下一条指令处，因为是【取指完成后立马PC++】","expanded":true,"style":{"background":"#FDD834"}}]},{"id":"88f76d09-0fed-48a4-a53a-3a8d94991bd0","topic":"数据码部分是PC偏移量","expanded":true},{"id":"3d0ec2da-ef90-4ca0-b84c-27820537acfb","topic":"便于【程序浮动】，所以相对寻址广泛用于转移指令","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"61e2e07e-2484-45ab-8740-5c5966be34ce","topic":"for、while、goto","expanded":true},{"id":"4eedd8d8-fd8b-467f-aacc-129513271c3d","topic":"程序浮动：一段代码在程序内部跳转","expanded":true,"style":{"background":"#7986CB"}}]}]},{"id":"6edeb6ac-81df-437b-8a9c-ca5e358fd4c1","topic":"EA = (PC) + A","expanded":true,"icons":["emoji:💬"],"style":{"fontSize":10,"borderStyle":"dashed","borderColor":"#F59E0B"}}]},{"id":"8acaa8a8-982f-4705-9e5f-76d0a88e6c06","topic":"基址寻址","expanded":true,"children":[{"id":"54a108a2-89f0-4751-aa58-cbd13a3b1876","topic":"图示","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-a98a67e76fc6ee.png","width":493.22,"height":173.9},"children":[{"id":"bf97514d-26e3-4ed7-99ab-4fe2ba30f0d1","topic":"EA = (BR) + A","expanded":true,"children":[{"id":"34e326a5-a5b3-46a9-ab76-20c110a98a70","topic":"其中可以是BR，也可以是Ri","expanded":true,"style":{"background":"#FF9595"}}]},{"id":"74db80eb-4527-48fa-94d2-8b8b0887b4cb","topic":"有利于多道程序设计，可以【编制浮动程序】","expanded":true,"children":[{"id":"66d6b20a-7efc-4ea4-af8c-a39418d1365a","topic":"编制浮动程序：一个程序在内存中浮动","expanded":true,"style":{"background":"#7986CB"}}]}]},{"id":"a3c39465-2879-407e-a8bb-2cb4c5891fdb","topic":"EA = (BR) + A","expanded":true,"icons":["emoji:💬"],"style":{"fontSize":10,"borderStyle":"dashed","borderColor":"#F59E0B"}}]},{"id":"6802b690-f2d1-485d-b35f-5f9b4e9cdeae","topic":"变址寻址","expanded":true,"children":[{"id":"10532695-3ddd-491b-ac6a-fb30eae14087","topic":"图示","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-2d9d173a97f803.png","width":252.8,"height":160.65},"children":[{"id":"a63fd646-835c-4997-875c-9a5b4172727d","topic":"IX用户可以编程设置","expanded":true},{"id":"5d83fa17-c568-43aa-b5f1-79b5c9bb803d","topic":"面向用户的，可以方便的设置A为某个数组的首部地址，然后执行EA = A + (IX)","expanded":true}]},{"id":"4ed9a28a-14a4-489b-8496-71a72efad9be","topic":"EA = (IX) + A","expanded":true,"icons":["emoji:💬"],"style":{"fontSize":10,"borderStyle":"dashed","borderColor":"#F59E0B"}}]}]},{"id":"bd9721c2-3cad-426c-a389-4df158c6a49d","topic":"堆栈寻址","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"e5bfe297-6ac9-4b75-bd4d-40afe0c80f46","topic":"模拟堆栈来存储地址，寄存器堆栈分为硬堆栈和软堆栈","expanded":true,"children":[{"id":"dd27df08-4610-41cb-a5c0-5d456a8fa6e0","topic":"硬：","expanded":true,"children":[{"id":"97870755-672c-40a4-acb7-7b2d2d972eb2","topic":"使用寄存器实现的","expanded":true}]},{"id":"a196c38c-4da5-4493-abd2-11a615d0ab1d","topic":"软：","expanded":true,"children":[{"id":"7e2e0a32-0421-492e-9c66-0646816c7508","topic":"在一个主存区域中实现的","expanded":true}]}]}]}]},{"id":"73461e48-eae9-44cb-8014-fcf586cb013a","topic":"访存次数总结：","expanded":true,"children":[{"id":"dbddc04c-ab85-45ab-a602-48c0128b4b9e","topic":"图示","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-652b0c32468f8d.png","width":481.42,"height":239.35}}]}]},{"id":"8b9f7546-431b-4d45-972c-ac4621f0f993","topic":"X86汇编指令","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-9e593d6b1135b0.svg","width":64,"height":64},"children":[{"id":"7267a2b8-8d53-43e3-884e-c08285e07389","topic":"X86默认字长 32bit","expanded":true},{"id":"8adaa0ac-7d5e-4ecd-83bd-d6fbbe378e99","topic":"寄存器只有Ri、PC、PSW是程序员可见的","expanded":true,"style":{"background":"#FFABD5"}},{"id":"706ee668-0081-4061-830d-d5da242d5560","topic":"有关寄存器","expanded":true,"children":[{"id":"9246389a-3c39-406e-bda4-7e4ff576f24f","topic":"A","expanded":true,"children":[{"id":"e55f630a-d2a0-4313-b393-74ab1114027c","topic":"累加器EAX","expanded":true}]},{"id":"056e33a8-92d4-488e-a333-86e8c9b14496","topic":"B","expanded":true,"children":[{"id":"1bc4dd3b-6328-40bd-a6ae-03fdcba233ba","topic":"基地址EBX","expanded":true}]},{"id":"90379b0c-acb3-494a-abbe-056b342be498","topic":"C","expanded":true,"children":[{"id":"2d6bd294-8a64-48d8-9429-c98f04d3a9c8","topic":"计数ECX","expanded":true}]},{"id":"6fd0128e-a414-47fc-8fd6-36ad301ca825","topic":"D","expanded":true,"children":[{"id":"a9822a5d-7805-4950-baac-cd438dd0e6c7","topic":"数据EDX","expanded":true}]},{"id":"81463c5f-1d05-452d-8a1a-e48a6e43f41e","topic":"变址ESI、EDI","expanded":true},{"id":"93447435-5498-48a3-938d-61773f8841b3","topic":"堆栈基EBP","expanded":true},{"id":"964dfba7-f49d-427d-8767-54e329bed17a","topic":"堆栈顶ESP","expanded":true}]},{"id":"82126894-0141-446c-b9c2-bc702da808e5","topic":"寻址模式","expanded":true,"children":[{"id":"a852d4f9-4310-4b86-b09b-4c68a9d1612e","topic":"mov + 目的地址 + 源地址","expanded":true},{"id":"b1caf415-6b79-489e-be04-109454d4c62e","topic":"数据类型大小：","expanded":true,"children":[{"id":"2027e42f-49d1-4ebb-abc3-860136f25794","topic":"DB、DW、DD","expanded":true,"children":[{"id":"7065478e-1eb5-4c06-b804-0cfb9a86dcea","topic":"DB：字节","expanded":true},{"id":"bd22272b-fde5-4118-98b6-220c50457355","topic":"DW：字","expanded":true},{"id":"15289fe9-07a3-4f18-a4bf-9f58a589cc7b","topic":"DD：双字","expanded":true}]}]}]},{"id":"024b3729-9007-4842-9e81-7fa0c4b2ae3a","topic":"常用指令","expanded":true,"children":[{"id":"3fd16658-eb0f-4abc-891d-87e9e0d6e3de","topic":"mov dst src","expanded":true},{"id":"fcc3b563-149c-48b3-af1f-1898913bb244","topic":"push pop","expanded":true,"children":[{"id":"dd5fdb81-011a-417a-9b91-a3775c47b4b8","topic":"ESP","expanded":true,"style":{"background":"#8EDE99"}}]},{"id":"331b0a1c-50e4-4643-b3e4-a56118862fc5","topic":"add/sub dst src","expanded":true},{"id":"85b68e36-2114-43e7-8f06-690eb47cc0f6","topic":"inc/dec","expanded":true,"children":[{"id":"b513e314-e43a-425e-8ed6-9cfa28d6b042","topic":"++ / --","expanded":true,"style":{"background":"#8EDE99"}}]},{"id":"e1a9407a-012d-4962-b996-01bd0de51c4a","topic":"imul dst src","expanded":true,"children":[{"id":"63c1fdaa-6c61-4609-a254-422e33af7154","topic":"相乘","expanded":true,"style":{"background":"#8EDE99"}},{"id":"39cf0bb3-e0bc-418c-979c-2c5a2a4092eb","topic":"imul reg src1 src2","expanded":true,"style":{"background":"#8EDE99"}}]},{"id":"d9208e9c-232a-4b3d-9826-62ff9b097845","topic":"idiv + 除数","expanded":true,"children":[{"id":"ca2e77d4-357b-4be6-b23a-bfe831ff0ab4","topic":"被除数在edx:eax中","expanded":true,"style":{"background":"#8EDE99"}}]},{"id":"c41b748d-af75-47ea-a434-c2cc0c858ef7","topic":"and/or/xor","expanded":true},{"id":"a4825831-a20c-469a-a071-4793175bf017","topic":"not","expanded":true,"children":[{"id":"54b16a83-1dc7-4dc2-95c1-0443382c139a","topic":"位翻转","expanded":true,"style":{"background":"#8EDE99"}}]},{"id":"d7a9a21e-dd75-4830-a8d6-f900eeedf746","topic":"neg","expanded":true,"children":[{"id":"e1840383-fded-4903-a025-0ff122d3d075","topic":"取负","expanded":true,"style":{"background":"#8EDE99"}}]},{"id":"a0a24547-4813-4f54-be89-70e8482df1b8","topic":"shl/shr","expanded":true,"children":[{"id":"f77270a0-741b-4a91-aeae-23613324b5c7","topic":"shift + left/right","expanded":true,"style":{"background":"#8EDE99"}}]},{"id":"dffc209f-29b7-4f65-aa59-8db2b54b11f4","topic":"jmp/jcondtion","expanded":true,"children":[{"id":"a0f017e7-e434-4c5a-913f-779ad643e14c","topic":"实现程序控制","expanded":true,"style":{"background":"#FFABD5"}},{"id":"7d5e8c68-44c0-45fd-a16c-434ad00ccb9a","topic":"jcondition：","expanded":true,"children":[{"id":"6566e513-83c7-46ae-b50b-949ca852952e","topic":"jle","expanded":true,"children":[{"id":"1928124b-732b-4800-a064-ce9668744aa9","topic":"jl","expanded":true,"children":[{"id":"b97de3cb-9af3-4287-b2f5-92ba40735b8f","topic":"jge","expanded":true,"children":[{"id":"b174d121-d912-432a-8c11-f5ba4c6ea22b","topic":"jg","expanded":true,"children":[{"id":"73389738-d405-48b1-bf73-8c445ae208b6","topic":"je","expanded":true,"children":[{"id":"3faceaa2-2f27-4b75-aec6-761ed69aa9ce","topic":"jne","expanded":true,"children":[{"id":"b8e20d03-a5ca-4d22-b721-8655d3c25367","topic":"jz","expanded":true}]}]}]}]}]}]}]}]},{"id":"42f7a1d6-98b5-4597-a344-343d03468d41","topic":"cmp","expanded":true},{"id":"2491dbb1-5d5b-40a8-9f97-b6ddd4267698","topic":"call ret","expanded":true}]},{"id":"c26bf063-5740-4668-9e0a-503d2e618854","topic":"jcondition的FLAG","expanded":true,"children":[{"id":"71d126d5-a54d-4582-bce3-93ac194a4c21","topic":"PSW中的几个标志位","expanded":true},{"id":"22b1da8f-5049-459f-b590-9e0a65730339","topic":"CF","expanded":true,"children":[{"id":"c93f705a-573c-4cf7-814b-a27398c06f9c","topic":"借位/错位标志","expanded":true,"style":{"background":"#8EDDF9"}},{"id":"a376d4a8-e467-44c3-bca5-61bfd5ed6e51","topic":"最高位出现了进位/借位的时候就是CF = 1","expanded":true,"style":{"background":"#8EDDF9"}}]},{"id":"8f284e02-3c46-45ef-9a8c-4b4cadb9db67","topic":"ZF","expanded":true,"children":[{"id":"3d4d3301-c3ec-4b23-a0e6-25a1f018e711","topic":"零标志位","expanded":true,"style":{"background":"#8EDDF9"}},{"id":"0fae253b-b83e-4607-9d2e-da302d23ec3c","topic":"结果为0的时候，ZF = 1","expanded":true,"style":{"background":"#8EDDF9"}}]},{"id":"2c9b963b-5473-466c-964e-ec6d1beee391","topic":"OF","expanded":true,"children":[{"id":"6c8d9d0c-487a-425a-ac20-7e2e0655bda1","topic":"溢出标志位","expanded":true,"style":{"background":"#8EDDF9"}},{"id":"5470fac5-cec7-4e52-870e-9abeb9fd94b7","topic":"结果溢出了，OF = 1","expanded":true,"style":{"background":"#8EDDF9"}}]},{"id":"8abd0c84-de86-46f0-ba88-712f48067ea8","topic":"SF","expanded":true,"children":[{"id":"59843c4c-deac-4f2d-8439-948ae7aa52c6","topic":"符号标志位","expanded":true,"style":{"background":"#8EDDF9"}},{"id":"7ebbba52-edbb-4dca-8eda-fb385752f062","topic":"如果运算结果为负，则SF = 1","expanded":true,"style":{"background":"#8EDDF9"}}]}]},{"id":"6bda00b8-ea9c-40c1-85f0-3c7655b20aac","topic":"例题举例：","expanded":true,"children":[{"id":"225690b7-b035-4dc3-8296-4f2161fa29c5","topic":"递归函数 C 语言代码","expanded":true,"children":[{"id":"92e56e56-8cf0-4d5d-b0ef-b748539cd340","topic":"函数调用汇编代码","expanded":true,"children":[{"id":"3373f6a0-a607-43e4-a90d-0c94eeb83c8e","topic":"考题：","expanded":true},{"id":"975afc76-012c-4e11-b0e6-c6bf0af667b6","topic":"1. 考C语言：递归次数","expanded":true,"style":{"background":"#8EDE99"}},{"id":"9c20566f-fc6e-49f2-ab4e-7bfb334778e6","topic":"2. 指令概念：条件转移指令、（无条件跳转指令、函数调用、函数返回）→ 一定出现程序跳转","expanded":true,"style":{"background":"#8EDE99"}},{"id":"02ab7e2f-b749-44b0-b148-ce24598c97d8","topic":"3. 虚地址计算：17条指令的地址；相对寻址：PC的偏移量；大端小端","expanded":true,"style":{"background":"#8EDE99"}},{"id":"90e9152d-02be-4f5a-b58b-a394058f59bd","topic":"4. 数据溢出：long和int","expanded":true,"style":{"background":"#8EDE99"}},{"id":"ca98a2e3-680e-4411-88e4-a058ad562a0a","topic":"5. 带标记的乘法器OF判断；异常处理：溢出陷入指令。","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"8b102121-c4ac-40eb-8e6b-311b0fb651f1","topic":"并且告诉了R[eax] = R[eax] * R[ecx]","expanded":true}]}],"code":{"lang":"asm","code":"// 汇编形式：\nint f1(int n) {\n    1   00401000    55                  push ebp\n        ... ...\n        if(n>1)\n    11  00401018    83 7D 08 01         cmp dword ptr[ebp+8], 1\n                                        # 比较n和1, ptr[ebp+8] = n\n    12  0040101C    7E 17               jle f1+35h(00401035)\n                                        # 发现 n <= 1, 跳转\n        return n*f1(n-1);\n    13  0040101E    8B 45 08            mov eax, dword ptr[ebp+8]\n                                        # n > 1的话, 就把n放入到eax中\n    14  00401021    83 E8 01            sub eax, 1\n                                        # eax -= 1(eax = n-1)\n    15  00401024    50                  push eax\n                                        # 放入堆栈顶\n    16  00401025    E8 D6 FF FF FF      call f1(00401000)\n                                        # 回去执行f1\n        ... ...\n    19  00401030    0F AF C1            imul eax, ecx\n                                        # 结束了, eax = eax * ecx\n    20  00401033    EB 05               jmp f1+3Ah(0040103a)\n                                        # 无条件跳出去\n        else return 1;\n    21  00401035    B8 01 00 00 00      mov eax, 1\n}\n        ... ...\n    26  00401040    3B EC               cmp ebp, esp\n        ... ...\n    30  0040104A    C3                  ret\n                                        # return","tokens":[[{"text":"// 汇编形式：","darkColor":"#DEDBD2"}],[{"text":"int","darkColor":"#BAB5A8"},{"text":" f1(","darkColor":"#DEDBD2"},{"text":"int","darkColor":"#BAB5A8"},{"text":" n) {","darkColor":"#DEDBD2"}],[{"text":"    ","darkColor":"#DEDBD2"},{"text":"1","darkColor":"#E2B159"},{"text":"   ","darkColor":"#DEDBD2"},{"text":"00401000","darkColor":"#E2B159"},{"text":"    ","darkColor":"#DEDBD2"},{"text":"55","darkColor":"#E2B159"},{"text":"                  ","darkColor":"#DEDBD2"},{"text":"push","darkColor":"#BAB5A8"},{"text":" ","darkColor":"#DEDBD2"},{"text":"ebp","darkColor":"#E2B159"}],[{"text":"        ... ...","darkColor":"#DEDBD2"}],[{"text":"        if(n>","darkColor":"#DEDBD2"},{"text":"1","darkColor":"#E2B159"},{"text":")","darkColor":"#DEDBD2"}],[{"text":"    ","darkColor":"#DEDBD2"},{"text":"11","darkColor":"#E2B159"},{"text":"  ","darkColor":"#DEDBD2"},{"text":"00401018","darkColor":"#E2B159"},{"text":"    ","darkColor":"#DEDBD2"},{"text":"83","darkColor":"#E2B159"},{"text":" ","darkColor":"#DEDBD2"},{"text":"7D","darkColor":"#E2B159"},{"text":" ","darkColor":"#DEDBD2"},{"text":"08","darkColor":"#E2B159"},{"text":" ","darkColor":"#DEDBD2"},{"text":"01","darkColor":"#E2B159"},{"text":"         ","darkColor":"#DEDBD2"},{"text":"cmp","darkColor":"#BAB5A8"},{"text":" ","darkColor":"#DEDBD2"},{"text":"dword","darkColor":"#8EA4E2"},{"text":" ptr[","darkColor":"#DEDBD2"},{"text":"ebp","darkColor":"#E2B159"},{"text":"+","darkColor":"#DEDBD2"},{"text":"8","darkColor":"#E2B159"},{"text":"], ","darkColor":"#DEDBD2"},{"text":"1","darkColor":"#E2B159"}],[{"text":"                                       ","darkColor":"#DEDBD2"},{"text":" # 比较n和1, ptr[ebp+8] = n","darkColor":"#908B7E"}],[{"text":"    ","darkColor":"#DEDBD2"},{"text":"12","darkColor":"#E2B159"},{"text":"  0040101C    7E ","darkColor":"#DEDBD2"},{"text":"17","darkColor":"#E2B159"},{"text":"               ","darkColor":"#DEDBD2"},{"text":"jle","darkColor":"#BAB5A8"},{"text":" f1+","darkColor":"#DEDBD2"},{"text":"35h","darkColor":"#E2B159"},{"text":"(","darkColor":"#DEDBD2"},{"text":"00401035","darkColor":"#E2B159"},{"text":")","darkColor":"#DEDBD2"}],[{"text":"                                       ","darkColor":"#DEDBD2"},{"text":" # 发现 n <= 1, 跳转","darkColor":"#908B7E"}],[{"text":"        return n*f1(n-","darkColor":"#DEDBD2"},{"text":"1","darkColor":"#E2B159"},{"text":")","darkColor":"#DEDBD2"},{"text":";","darkColor":"#908B7E"}],[{"text":"    ","darkColor":"#DEDBD2"},{"text":"13","darkColor":"#E2B159"},{"text":"  0040101E    8B ","darkColor":"#DEDBD2"},{"text":"45","darkColor":"#E2B159"},{"text":" ","darkColor":"#DEDBD2"},{"text":"08","darkColor":"#E2B159"},{"text":"            ","darkColor":"#DEDBD2"},{"text":"mov","darkColor":"#BAB5A8"},{"text":" ","darkColor":"#DEDBD2"},{"text":"eax","darkColor":"#E2B159"},{"text":", ","darkColor":"#DEDBD2"},{"text":"dword","darkColor":"#8EA4E2"},{"text":" ptr[","darkColor":"#DEDBD2"},{"text":"ebp","darkColor":"#E2B159"},{"text":"+","darkColor":"#DEDBD2"},{"text":"8","darkColor":"#E2B159"},{"text":"]","darkColor":"#DEDBD2"}],[{"text":"                                       ","darkColor":"#DEDBD2"},{"text":" # n > 1的话, 就把n放入到eax中","darkColor":"#908B7E"}],[{"text":"    ","darkColor":"#DEDBD2"},{"text":"14","darkColor":"#E2B159"},{"text":"  ","darkColor":"#DEDBD2"},{"text":"00401021","darkColor":"#E2B159"},{"text":"    ","darkColor":"#DEDBD2"},{"text":"83","darkColor":"#E2B159"},{"text":" E8 ","darkColor":"#DEDBD2"},{"text":"01","darkColor":"#E2B159"},{"text":"            ","darkColor":"#DEDBD2"},{"text":"sub","darkColor":"#BAB5A8"},{"text":" ","darkColor":"#DEDBD2"},{"text":"eax","darkColor":"#E2B159"},{"text":", ","darkColor":"#DEDBD2"},{"text":"1","darkColor":"#E2B159"}],[{"text":"                                       ","darkColor":"#DEDBD2"},{"text":" # eax -= 1(eax = n-1)","darkColor":"#908B7E"}],[{"text":"    ","darkColor":"#DEDBD2"},{"text":"15","darkColor":"#E2B159"},{"text":"  ","darkColor":"#DEDBD2"},{"text":"00401024","darkColor":"#E2B159"},{"text":"    ","darkColor":"#DEDBD2"},{"text":"50","darkColor":"#E2B159"},{"text":"                  ","darkColor":"#DEDBD2"},{"text":"push","darkColor":"#BAB5A8"},{"text":" ","darkColor":"#DEDBD2"},{"text":"eax","darkColor":"#E2B159"}],[{"text":"                                       ","darkColor":"#DEDBD2"},{"text":" # 放入堆栈顶","darkColor":"#908B7E"}],[{"text":"    ","darkColor":"#DEDBD2"},{"text":"16","darkColor":"#E2B159"},{"text":"  ","darkColor":"#DEDBD2"},{"text":"00401025","darkColor":"#E2B159"},{"text":"    E8 D6 FF FF FF      ","darkColor":"#DEDBD2"},{"text":"call","darkColor":"#BAB5A8"},{"text":" f1(","darkColor":"#DEDBD2"},{"text":"00401000","darkColor":"#E2B159"},{"text":")","darkColor":"#DEDBD2"}],[{"text":"                                       ","darkColor":"#DEDBD2"},{"text":" # 回去执行f1","darkColor":"#908B7E"}],[{"text":"        ... ...","darkColor":"#DEDBD2"}],[{"text":"    ","darkColor":"#DEDBD2"},{"text":"19","darkColor":"#E2B159"},{"text":"  ","darkColor":"#DEDBD2"},{"text":"00401030","darkColor":"#E2B159"},{"text":"    0F AF C1            ","darkColor":"#DEDBD2"},{"text":"imul","darkColor":"#BAB5A8"},{"text":" ","darkColor":"#DEDBD2"},{"text":"eax","darkColor":"#E2B159"},{"text":", ","darkColor":"#DEDBD2"},{"text":"ecx","darkColor":"#E2B159"}],[{"text":"                                       ","darkColor":"#DEDBD2"},{"text":" # 结束了, eax = eax * ecx","darkColor":"#908B7E"}],[{"text":"    ","darkColor":"#DEDBD2"},{"text":"20","darkColor":"#E2B159"},{"text":"  ","darkColor":"#DEDBD2"},{"text":"00401033","darkColor":"#E2B159"},{"text":"    EB ","darkColor":"#DEDBD2"},{"text":"05","darkColor":"#E2B159"},{"text":"               ","darkColor":"#DEDBD2"},{"text":"jmp","darkColor":"#BAB5A8"},{"text":" f1+","darkColor":"#DEDBD2"},{"text":"3Ah","darkColor":"#E2B159"},{"text":"(0040103a)","darkColor":"#DEDBD2"}],[{"text":"                                       ","darkColor":"#DEDBD2"},{"text":" # 无条件跳出去","darkColor":"#908B7E"}],[{"text":"        else return ","darkColor":"#DEDBD2"},{"text":"1","darkColor":"#E2B159"},{"text":";","darkColor":"#908B7E"}],[{"text":"    ","darkColor":"#DEDBD2"},{"text":"21","darkColor":"#E2B159"},{"text":"  ","darkColor":"#DEDBD2"},{"text":"00401035","darkColor":"#E2B159"},{"text":"    B8 ","darkColor":"#DEDBD2"},{"text":"01","darkColor":"#E2B159"},{"text":" ","darkColor":"#DEDBD2"},{"text":"00","darkColor":"#E2B159"},{"text":" ","darkColor":"#DEDBD2"},{"text":"00","darkColor":"#E2B159"},{"text":" ","darkColor":"#DEDBD2"},{"text":"00","darkColor":"#E2B159"},{"text":"      ","darkColor":"#DEDBD2"},{"text":"mov","darkColor":"#BAB5A8"},{"text":" ","darkColor":"#DEDBD2"},{"text":"eax","darkColor":"#E2B159"},{"text":", ","darkColor":"#DEDBD2"},{"text":"1","darkColor":"#E2B159"}],[{"text":"}","darkColor":"#DEDBD2"}],[{"text":"        ... ...","darkColor":"#DEDBD2"}],[{"text":"    ","darkColor":"#DEDBD2"},{"text":"26","darkColor":"#E2B159"},{"text":"  ","darkColor":"#DEDBD2"},{"text":"00401040","darkColor":"#E2B159"},{"text":"    3B EC               ","darkColor":"#DEDBD2"},{"text":"cmp","darkColor":"#BAB5A8"},{"text":" ","darkColor":"#DEDBD2"},{"text":"ebp","darkColor":"#E2B159"},{"text":", ","darkColor":"#DEDBD2"},{"text":"esp","darkColor":"#E2B159"}],[{"text":"        ... ...","darkColor":"#DEDBD2"}],[{"text":"    ","darkColor":"#DEDBD2"},{"text":"30","darkColor":"#E2B159"},{"text":"  0040104A    C3                  ","darkColor":"#DEDBD2"},{"text":"ret","darkColor":"#BAB5A8"}],[{"text":"                                       ","darkColor":"#DEDBD2"},{"text":" # return","darkColor":"#908B7E"}]]}}],"code":{"lang":"c","code":"// C语言代码:\nint f1(int n) {\n    if(n > 1)\n        return n*f1(n-1);\n    else\n        return 1;\n}","tokens":[[{"text":"// C语言代码:","darkColor":"#908B7E"}],[{"text":"int","darkColor":"#74CBC4"},{"text":" ","darkColor":"#DEDBD2"},{"text":"f1","darkColor":"#6EC0DF"},{"text":"(","darkColor":"#BAB5A8"},{"text":"int","darkColor":"#74CBC4"},{"text":" ","darkColor":"#DEDBD2"},{"text":"n","darkColor":"#D5C5AA"},{"text":")","darkColor":"#BAB5A8"},{"text":" ","darkColor":"#DEDBD2"},{"text":"{","darkColor":"#BAB5A8"}],[{"text":"    ","darkColor":"#DEDBD2"},{"text":"if","darkColor":"#8EA4E2"},{"text":"(","darkColor":"#BAB5A8"},{"text":"n ","darkColor":"#DEDBD2"},{"text":">","darkColor":"#BAB5A8"},{"text":" ","darkColor":"#DEDBD2"},{"text":"1","darkColor":"#E2B159"},{"text":")","darkColor":"#BAB5A8"}],[{"text":"        ","darkColor":"#DEDBD2"},{"text":"return","darkColor":"#8EA4E2"},{"text":" n","darkColor":"#DEDBD2"},{"text":"*","darkColor":"#BAB5A8"},{"text":"f1","darkColor":"#6EC0DF"},{"text":"(","darkColor":"#BAB5A8"},{"text":"n","darkColor":"#6EC0DF"},{"text":"-","darkColor":"#BAB5A8"},{"text":"1","darkColor":"#E2B159"},{"text":");","darkColor":"#BAB5A8"}],[{"text":"    ","darkColor":"#DEDBD2"},{"text":"else","darkColor":"#8EA4E2"}],[{"text":"        ","darkColor":"#DEDBD2"},{"text":"return","darkColor":"#8EA4E2"},{"text":" ","darkColor":"#DEDBD2"},{"text":"1","darkColor":"#E2B159"},{"text":";","darkColor":"#BAB5A8"}],[{"text":"}","darkColor":"#BAB5A8"}]]}}]},{"id":"fc6c5a78-fa80-420b-bcb9-aee9e6dbcfb4","topic":"AT&T和Intel的汇编格式","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"0282dc9f-e7a6-466f-a2f5-acdc54338950","topic":"汇编语法格式区分","expanded":true,"style":{"background":"#FF9595"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-739cfe26843d16.png","width":871.27,"height":199.42}},{"id":"1f591f99-01af-4eea-ba97-ce340e60a54f","topic":"22","expanded":true,"icons":["emoji:💬"],"style":{"borderStyle":"dashed","borderColor":"#F59E0B"}}]},{"id":"8f0c74c0-387a-4b1d-a8b8-25df83fee9ac","topic":"考频：低","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"06a38eca-4dff-4cd8-873c-e21b102d3832","topic":"17大、19大*2","expanded":true}]}]},{"id":"60b5d955-e0b8-4f60-ae1f-a45e5659f246","topic":"CISC、RISC","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-7829a669c2e4ad.svg","width":64,"height":64},"children":[{"id":"597d40d6-2214-4419-8f24-3f279c6d189e","topic":"考频：低","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"084c0dfd-a95f-4eba-b19c-ae17bf859f9b","topic":"09、11","expanded":true}]},{"id":"5ddcf126-bf97-4d6c-9806-bdb6b0fae4bb","topic":"CISC","expanded":true,"children":[{"id":"4de67dac-98f8-495c-9d6b-4284d95f1ad0","topic":"Complex 复杂指令集","expanded":true}]},{"id":"50494404-13ae-44f1-8372-9e43a9622fd6","topic":"RISC","expanded":true,"children":[{"id":"990a76b0-bcb8-45e5-b96f-f7c363b1f916","topic":"Reduced 精简指令集","expanded":true}]},{"id":"a3e5b5da-4d81-422c-b88c-ecf09415a07d","topic":"对比：","expanded":true,"children":[{"id":"d3c5e429-89b4-481e-b369-d18689749adb","topic":"图示","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-284d031a78b3c6.png","width":724.96,"height":417.67}}]}]},{"id":"661b73ff-049e-431a-bd73-ae2fb504d288","topic":"END","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-b5376195b1f162.svg","width":64,"height":64}}]},"summaries":[{"id":"4ce1d84f-69d1-4ab7-b716-00310ba33fd1","parentId":"503448ec-151b-46cb-b9fe-05efa992a081","start":1,"end":2,"label":"固定"},{"id":"d3d05805-7c2b-4479-979f-c64d5f3d0524","parentId":"706ee668-0081-4061-830d-d5da242d5560","start":0,"end":3,"label":"32位：E__X\n低16位：__X\n__X的高8位：__H\n__X的低8位：__L"},{"id":"019def60-9fa3-4e2f-a85e-332c68beeb44","parentId":"706ee668-0081-4061-830d-d5da242d5560","start":5,"end":6,"label":"这两个寄存器不能乱用"}]}}},{"id":"8e17389b-27fa-4f25-bb01-a5dd85c02766","topic":"第五章 中央处理器","expanded":true,"nestedMap":{"src":"kaoyan/408/computer-organization/co-00-sheet5","expanded":false,"maxHeight":260,"doc":{"format":"brushup-mindmap-v1","id":"co-00-sheet5","title":"⭐️第五章 中央处理器","structure":"timeline-h","theme":"auto","root":{"id":"3febb530007a418fc7c26a99d8","topic":"中央处理器","expanded":true,"children":[{"id":"132215d2-fdb7-43b8-9bb2-01ead8823d3b","topic":"CPU的功能、基本结构","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-7e55e4bc65271a.svg","width":60,"height":60},"children":[{"id":"8a6fd50f-f1be-4af4-80ff-4a91ed1d4809","topic":"具体功能","expanded":true,"children":[{"id":"ee544f13-a1c2-4f49-8ef0-b9328cb2cf5f","topic":"指令控制","expanded":true,"children":[{"id":"1bb572f5-fa9e-4263-94f1-f5b1300f7156","topic":"完成取指、分析指令、执行指令","expanded":true}]},{"id":"86d273c3-725a-4d1e-b862-b2d1a265e19c","topic":"操作控制","expanded":true,"children":[{"id":"4a5ccb3b-f2b6-40f9-899d-0a9f6d2017d6","topic":"一条指令由若干操作（微指令）组合实现，CPU管理产生每条指令的操作信号","expanded":true}]},{"id":"52cfe0a1-a917-418e-b31a-2cb235ebbc02","topic":"时间控制","expanded":true,"children":[{"id":"c402dece-6ebf-49e1-82ff-f638b96b8c67","topic":"对各种操作加以时间上的控制","expanded":true}]},{"id":"a497583b-7bde-419c-ae9e-272612d5262e","topic":"数据加工","expanded":true,"children":[{"id":"874bcda2-2460-468d-9a7c-8989c241e427","topic":"对数据提供算术和逻辑运算","expanded":true}]},{"id":"5acc0541-d42a-42d3-9d2d-1862e95d8003","topic":"中断处理","expanded":true,"children":[{"id":"e9ba76a3-15d5-41c6-80ad-bb89c76556e8","topic":"对计算机运行过程中的异常情况和特殊情况进行处理","expanded":true}]}]},{"id":"8ebf17c5-81f6-495f-bba8-9eb806ff4ace","topic":"CPU的基本结构","expanded":true,"children":[{"id":"42182f9e-d3b2-452b-8470-c06a02b65249","topic":"运算器","expanded":true,"children":[{"id":"91798d7e-a111-4d81-90a5-30386015e408","topic":"运算器是计算机的数据加工中心","expanded":true,"style":{"background":"#8EDE99"}},{"id":"835ebbe7-5d84-4cff-8bd5-bb06c01b6546","topic":"组成部分","expanded":true,"children":[{"id":"50e6117b-b37e-409d-85b1-48f330d02e5c","topic":"算术逻辑单元ALU","expanded":true,"children":[{"id":"a0134260-7538-4c29-8057-638e3770f4b0","topic":"进行算术/逻辑运算","expanded":true}]},{"id":"67198d5c-51eb-4bd9-b544-2a6bbbafb297","topic":"暂存寄存器","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"f23e046e-6fdb-4e46-8d8c-a67abc5d4970","topic":"用于暂存从主存读来的数据","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"2735676a-266b-40fd-886a-ec0782e540f7","topic":"例如ACC需要R0和R1的数据，就先把R0读入到暂存寄存器，然后把R1和暂存寄存器中的数同时写入到ACC中","expanded":true,"style":{"background":"#8EDDF9"}}]}]},{"id":"015d0149-32e9-4d7d-a8a2-a4b41e2aadf9","topic":"累加寄存器ACC","expanded":true,"children":[{"id":"c869d1c1-ed2f-4edf-bd67-b06c22e570f4","topic":"一个通用寄存器，用于存放ALU运算的结果，也可以作为运算的输入端","expanded":true}]},{"id":"fb630d3f-0250-4e41-a701-1a073c1beb52","topic":"通用寄存器组","expanded":true,"children":[{"id":"ad7ca77c-2942-4943-bd5f-8ae21042b510","topic":"A","expanded":true,"children":[{"id":"22005b2c-7f77-49d6-9660-d8a34b8c207c","topic":"累加器EAX","expanded":true}]},{"id":"91a7a8bb-fda0-4100-8090-04be7f3e1b88","topic":"B","expanded":true,"children":[{"id":"335b32ff-a9c0-4bd6-8f0f-feefd7118b06","topic":"基地址EBX","expanded":true}]},{"id":"2fcdbebb-fddb-41a4-844a-50b4f113c1fb","topic":"C","expanded":true,"children":[{"id":"5768d417-f971-450b-b975-916d92cfe516","topic":"计数ECX","expanded":true}]},{"id":"4fdb9992-2be2-4acb-abfa-6c937b471f3b","topic":"D","expanded":true,"children":[{"id":"bfba3254-7109-4c55-9ffa-856c28533035","topic":"数据EDX","expanded":true}]},{"id":"8167ad96-6342-4e2f-b24c-9590c55432b5","topic":"变址ESI、EDI","expanded":true},{"id":"8108fdc1-40df-4dbd-8a24-8f37ff1a3cd5","topic":"堆栈基EBP","expanded":true},{"id":"3aed7745-7ae4-497e-859f-51d555d48467","topic":"堆栈顶ESP","expanded":true}]},{"id":"3e62fc2a-1879-44f2-b07f-8fc677fde1d6","topic":"程序状态字寄存器PSW","expanded":true,"children":[{"id":"373eb5dd-34c3-4715-8985-02f832808849","topic":"由OF、ZF、SF、CF组成","expanded":true}]},{"id":"778b8937-8053-4794-926c-22d3128e02be","topic":"移位器","expanded":true,"children":[{"id":"b07eb9a3-143a-4770-bcef-082de8377035","topic":"对操作数或运算结果进行移位的运算","expanded":true}]},{"id":"35eb06b7-1603-4531-ad23-d29c07bde4e0","topic":"计数器CT","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"e57bc996-ce9a-4d4d-beb3-9bb6915a6348","topic":"控制乘除运算的操作步数","expanded":true,"style":{"background":"#8EDDF9"}}]}]}]},{"id":"836402cf-4a1c-4997-b356-a66643109f49","topic":"控制器","expanded":true,"children":[{"id":"f937b43b-78ed-4b60-98c6-6713a45a1a13","topic":"基本功能：执行指令，每条指令的执行由控制器发出的一组微操作实现","expanded":true,"style":{"background":"#8EDE99"}},{"id":"4beb3814-c769-4ea0-b469-320e61e64886","topic":"组成部分：","expanded":true,"children":[{"id":"df073ae9-256a-40bd-982d-d4f144d169cd","topic":"PC程序计数器","expanded":true,"children":[{"id":"5a1b9fde-63b0-4f52-9d16-6d04c99461bd","topic":"指出下一条指令在主存中的地址","expanded":true,"style":{"background":"#FDD834"}},{"id":"049c305d-192e-475d-a01b-dca686debd1e","topic":"CPU根据PC的内容去主存取指令","expanded":true},{"id":"7fa0fc2e-e3a1-46ab-8b2b-423bb668d193","topic":"PC具有自增功能","expanded":true,"style":{"background":"#FF9595"}}]},{"id":"1b3ca307-67e2-4dc8-a776-7d001d3c49c6","topic":"IR指令寄存器","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"2eab0132-541b-47e3-8155-a16327d55274","topic":"保存当前执行的那个指令","expanded":true,"style":{"background":"#8EDDF9"}}]},{"id":"0fb4df77-70a9-447b-806e-4fd0ff6cf66b","topic":"指令译码器","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"bbe4ece0-5608-4cd7-9ec5-401d8c4023e1","topic":"对操作码字段进行译码，向控制器提供操作信号","expanded":true,"style":{"background":"#8EDDF9"}}]},{"id":"ff908edc-db6c-428b-be1e-29333f64eaf1","topic":"MAR存储器地址寄存器","expanded":true,"children":[{"id":"cbb347af-2bd3-453c-990b-c24323a2a9dc","topic":"存放要访问的主存单元的地址","expanded":true}]},{"id":"f9039edc-d50e-48c3-82d4-fa908e61de0f","topic":"MDR存储器数据寄存器","expanded":true,"children":[{"id":"f0da29cc-3531-40ba-af67-1e0d44322ba2","topic":"存放向主存写/从主存读的数据","expanded":true}]},{"id":"dbba6817-cfc0-4d63-a007-e2db50565d3b","topic":"时序系统","expanded":true,"children":[{"id":"4baa840f-3dc9-47cc-9f60-83180a2bfe6d","topic":"用于产生各种时序信号，由统一时钟(CLOCK)分频得到","expanded":true}]},{"id":"1c2595bf-3676-4322-ac65-479cacd4a9f2","topic":"微操作信号发生器","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"65aadb82-9d83-411e-96dc-83bc393bf897","topic":"根据IR、PSW、时序信号产生的控制整个计算机系统所需的各种控制信号","expanded":true,"style":{"background":"#8EDDF9"}},{"id":"7d9b3f19-31c7-4ade-8c49-f3eeee047b26","topic":"分为：","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"7377dfff-5d4b-43f1-8ae3-290814d803e0","topic":"组合逻辑型","expanded":true,"style":{"background":"#8EDDF9"}},{"id":"0d9a30d2-9e9b-4acb-be4f-45a224ad3e32","topic":"存储逻辑型","expanded":true,"style":{"background":"#8EDDF9"}}]}]}]}]},{"id":"a16845e0-1249-4340-a869-9fc74757d8ae","topic":"计算机可以划分为：","expanded":true,"style":{"background":"#FFABD5"},"children":[{"id":"412a898e-604f-44a7-823d-2ee8fb5c4464","topic":"控制部件","expanded":true,"style":{"background":"#FFABD5"},"children":[{"id":"5e6f1330-4a12-4e9c-8fa2-50ace264feb0","topic":"控制器：","expanded":true,"style":{"background":"#FFABD5"},"children":[{"id":"29ed7efb-5b26-411f-856c-36b5bbc83d35","topic":"PC、IR、MAR、MDR、ID、时序、微操作信号发生器(CU的第一步)","expanded":true,"style":{"background":"#FFABD5"}}]}]},{"id":"5637021c-fe65-4b3f-9cf6-287fae886893","topic":"执行部件","expanded":true,"style":{"background":"#FFABD5"},"children":[{"id":"9cb13136-888a-4a6c-8e82-9fac0875672e","topic":"运算器：","expanded":true,"style":{"background":"#FFABD5"},"children":[{"id":"50d9873e-254b-4f32-8469-462ae7ae27f8","topic":"ALU、ACC、Reg(寄存器组)、X(暂存寄存器)、PSW、CT、移位器","expanded":true,"style":{"background":"#FFABD5"}}]},{"id":"fb83ea9c-1604-4fea-9c9b-06fdf87da427","topic":"存储器","expanded":true},{"id":"cbb77823-d217-4b0b-be56-57c449510036","topic":"外围设备","expanded":true}]}]},{"id":"785c18c4-f8c5-446a-88dd-47753ca81cf7","topic":"内存寄存器","expanded":true,"style":{"background":"#FFABD5"},"children":[{"id":"b50eae25-8de9-4721-a4d4-f8c957f29147","topic":"用户透明（不可编程）","expanded":true,"style":{"background":"#FFABD5"},"children":[{"id":"ed731517-4d0c-4a9e-8f5e-57b2ff79f05b","topic":"MAR、MDR、IR","expanded":true,"style":{"background":"#FFABD5"}}]},{"id":"357e82f4-cbea-4263-b822-947d83dfbd92","topic":"用户不透明（可编程）","expanded":true,"style":{"background":"#FFABD5"},"children":[{"id":"4ea20b94-3c8d-41b5-8429-e11593d43a83","topic":"<Reg>、PSW、PC","expanded":true,"style":{"background":"#FFABD5"}}]}]}]},{"id":"58087fb5-a46a-4170-a9f1-6f9936cbe81b","topic":"考频：低","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"1ebec1d5-7de5-4dbc-9bab-d53c08c0e5bc","topic":"10、16","expanded":true}]}]},{"id":"ee98e053-89a6-4904-934a-19ad18297fe1","topic":"指令执行过程","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-29fe79c2b71a86.svg","width":60,"height":60},"children":[{"id":"2e97b328-b263-4c13-8694-8637f26a8164","topic":"考频：低","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"7342629f-84c2-4b91-9597-a2e0ecffd3fb","topic":"09、11","expanded":true}]},{"id":"a24f795f-3411-4ebe-849e-e0d474b13377","topic":"指令周期","expanded":true,"children":[{"id":"ce3f8916-1963-482e-9476-2cd49f219f14","topic":"CPU从主存取出一条指令并执行的时间：指令周期","expanded":true,"style":{"background":"#FF9595"}},{"id":"e7694f16-325d-456a-bd04-79dddab8ecbf","topic":"4+2大联系不同：","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"34979da9-0d7a-4906-91ff-6ddd8a3c87ee","topic":"【指令】","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"9b447c66-5bbc-4904-ae59-29fc8e525481","topic":"【指令周期】","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"51af1c44-2997-43ef-93fd-9e2778d2c6db","topic":"【机器周期】","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"af3513cf-1a83-4f05-9c9b-a8e721814b9e","topic":"【时钟周期/节拍】","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"665b4889-55dc-4735-a6bd-25c248d4db01","topic":"【微操作】","expanded":true,"style":{"background":"#FFABD5"},"children":[{"id":"c8b526c7-e506-49a2-a488-d3b79c3c25d7","topic":"【微周期】","expanded":true,"style":{"background":"#FFABD5"},"children":[{"id":"804a38d9-4f5a-4641-9a44-64ec2273b942","topic":"一般是一个时钟周期","expanded":true,"icons":["emoji:💬"],"style":{"borderStyle":"dashed","borderColor":"#F59E0B"}}]}]}]}]}]}]}]},{"id":"fa551894-d153-4344-ad29-a1e6518a1f5a","topic":"微操作与指令：","expanded":true,"children":[{"id":"9db2e779-f7ad-4f18-935f-13be9729729b","topic":"要完成一个机器周期，需要多个节拍/时钟周期，而一个节拍内完成的操作就是“微操作”","expanded":true}]},{"id":"dc242fea-e78b-4ac4-b0c3-31b634920716","topic":"其中：","expanded":true,"children":[{"id":"d24f3ea7-67e2-4dc3-9d01-f8bc9dce4fe5","topic":"定长的机器周期","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-95c769c8435707.png","width":512.12,"height":135.64}},{"id":"b43253a9-cade-4741-8637-2270c9a88fbf","topic":"不定长的机器周期","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-f47568899d445e.png","width":408.88,"height":146.54}}]},{"id":"65db625d-f9bd-447b-ac93-30449d945d45","topic":"举例：","expanded":true,"children":[{"id":"efcd01a8-6758-46bc-bfd9-bb35d30121c7","topic":"取指、执行、多执行、间址、中断","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-69731e8dd8ca21.png","width":522.31,"height":327.1},"children":[{"id":"0cd77852-0d80-45f3-87a2-74a588597f73","topic":"每个指令周期内的机器周期数可以不等，每个机器周期内的节拍数也可以不等。","expanded":true,"style":{"background":"#FF9595"}},{"id":"637820e8-e338-4617-90e9-62350b7fb3a8","topic":"只有检测到了中断请求，才会有“中断周期”","expanded":true,"style":{"background":"#FF9595"}},{"id":"cd872a6e-dda0-4284-a987-35b68526b0c8","topic":"中断请求是随时都可到来的","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"d42d32e8-34b5-48b2-9951-b10c5afe2ab4","topic":"只会在执行周期末尾进行中断检测，并且没有检测到中断的话会跳过中断周期","expanded":true,"style":{"background":"#FDD834"}}]}]}]}]},{"id":"342571c8-dab1-4fe2-92f6-a3ccfc9daab2","topic":"取指周期","expanded":true,"children":[{"id":"8e99cfa6-fed9-4c61-8be3-06d98636d32f","topic":"取值周期控制流","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-ae83db4523e75b.png","width":392.14,"height":199.52},"children":[{"id":"d277086c-17a8-4a40-a2f1-61c11f042150","topic":"1. (PC) -> MAR --- ①","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"69eda959-7409-4604-8e72-19c19e97c450","topic":"把PC寄存器中的值读入到MAR中","expanded":true}]},{"id":"d47d4039-9bee-454c-af27-37d2f086a220","topic":"2. 1 -> R --- ④⑤","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"e773a772-3c98-49bf-95ba-a07f48c891c2","topic":"CU发出控制信号，经主线传到主存，这里是读信号","expanded":true}]},{"id":"286e2c5a-a146-480e-900d-ea54e87fd262","topic":"3. M(MAR) -> MDR --- ②③⑥⑦","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"fccdbdfd-6b0a-454a-92bd-18655132749d","topic":"主存中地址为(MAR)的数据送入到MDR中","expanded":true}]},{"id":"fd942ff2-8d85-41a3-b603-02fea09bc020","topic":"4. (MDR) -> IR --- ⑧","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"bbed4676-8c16-4cdd-936e-9c67cd309648","topic":"把取得的指令放入到IR中","expanded":true}]},{"id":"826bf196-0245-46d2-911a-f5d75b97d271","topic":"5. (PC) + 1 -> PC --- ⑨","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"8dd0403c-e463-4913-96fd-91ac5b74374a","topic":"CU发出控制指令，PC自增","expanded":true}]}]}]},{"id":"78950bcf-5ee2-4a36-991b-81a6c0135dba","topic":"间址周期","expanded":true,"children":[{"id":"84b8dfdf-e32a-4b30-a2f2-87991b9cae2a","topic":"一次间址周期数据流","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-ec69668c484afe.png","width":391.87,"height":194.75},"children":[{"id":"d8afa7a4-ec1a-407d-9b21-28741803769d","topic":"1. Ad(IR)/Ad(MDR) -> MAR --- ①","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"a605bb4f-bf48-43dc-a0f6-621de86203c6","topic":"这里也可以是Ad(MDR) -> MAR？可以，在唐朔飞计算机组成原理中（第三版），有Ad(MDR)的原图和原描述","expanded":true,"style":{"background":"#FF5252"},"children":[{"id":"1725b7ae-5696-4381-a41e-10bab5f9b452","topic":"图示","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-5ce6024dd14951.png","width":390.18,"height":241.13}},{"id":"506fa143-6cef-445d-b550-c36d64013526","topic":"图示","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-f90410857239be.png","width":405.78,"height":41.66}},{"id":"8a40ede3-8d7c-4340-a072-438363845ee9","topic":"注意只在间址周期","expanded":true,"icons":["emoji:💬"],"style":{"borderStyle":"dashed","borderColor":"#F59E0B"}}]}]},{"id":"0f0c998a-3902-424a-b932-9e093b6739b5","topic":"2. 1 -> R  --- ④⑤","expanded":true,"style":{"background":"#8EDDF9"}},{"id":"2f173e80-8a61-49c9-ac6d-e28eb5173cc5","topic":"3. M(MAR) -> MDR --- ②③⑥⑦","expanded":true,"style":{"background":"#8EDDF9"}},{"id":"df812818-93f5-47de-97cf-caa3cbb740e0","topic":"4. (MDR) -> IR","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"14771830-87d2-4214-acea-64bde1e63d60","topic":"可以有，也可以无。修改IR的Add部分（IR的OP部分不变，只改地址）","expanded":true}]}]}]},{"id":"09b57a71-fdab-42b4-b1e8-c5e20038bdd0","topic":"执行周期","expanded":true,"children":[{"id":"1263f333-fb80-4da3-bd55-b1e88b2d22c1","topic":"不同指令的周期不同，没有固定的","expanded":true}]},{"id":"6b310037-0cf5-424c-89f7-2e41cd19c02a","topic":"中断周期","expanded":true,"children":[{"id":"eb4b8ab8-ec84-4248-af90-5d15d29c4a43","topic":"图示","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-9f48db671c2d8f.png","width":397.52,"height":207.38},"children":[{"id":"5ded0dd5-bb0b-408b-8f03-e5ac7ceba529","topic":"1. (SP) - 1 -> SP，(SP) -> MAR --- ①②","expanded":true,"children":[{"id":"ccc1e843-f107-4e58-8af5-31d971451c85","topic":"检测到中断信号后，首先CU先让堆栈顶部SP-1，然后CU把SP中存的当前的地址送入到MAR中","expanded":true},{"id":"678ff1ed-eac7-4396-8cfe-ed0132ed7bf6","topic":"此处是SP - 1的原因是计算机的堆栈都是从顶至下的","expanded":true,"icons":["emoji:💬"],"style":{"borderStyle":"dashed","borderColor":"#F59E0B"}}]},{"id":"37ca7fff-e0f8-4460-9310-ac224706fc49","topic":"2. 1 -> W --- ④⑤","expanded":true,"children":[{"id":"2a6800c5-d0d9-4057-a393-b7e676e6c636","topic":"CU告诉主存要进行写操作","expanded":true}]},{"id":"90d63daa-a5f5-401a-8c3f-32cfca1a36e6","topic":"3. (PC) -> MDR --- ⑥⑦⑧","expanded":true,"children":[{"id":"d3c25668-ab88-4d5e-82ea-f5890d6fd1c9","topic":"PC的数据写入到MDR中，随后主存通过MAR、MDR中的数据把PC的地址写入到SP指向的位置","expanded":true},{"id":"1f168427-384b-4e89-8f25-f6f77f260e20","topic":"MDR -> M(MAR)","expanded":true,"style":{"background":"#ADADAD"},"children":[{"id":"c3aae6b3-b075-41ca-a285-fbc95b0ade37","topic":"个人感觉还差了一步","expanded":true,"style":{"background":"#ADADAD"}}]}]},{"id":"44c08b60-7d9c-46f3-a379-98742c842ac5","topic":"4. 向量地址 -> PC --- ⑨","expanded":true,"children":[{"id":"d7d97245-86dc-4cdf-bc89-64e53ed0edea","topic":"CU获得中断向量的向量地址，送入PC","expanded":true}]}]},{"id":"c511cf2e-a766-48bd-bbb6-9010b465c536","topic":"中断周期要做的事情只是硬件的操作（即中断隐指令的所有内容），引出中断向量对应的处理程序后，就交由软件执行","expanded":true,"style":{"background":"#FFABD5"}},{"id":"d95f768a-7d2d-4ac2-a237-51b9534b1d3d","topic":"执行中断时保存的内容不只有一个PC","expanded":true,"style":{"background":"#FF9595"}}]},{"id":"8d1663d4-0f6c-437f-88d0-fbd9329355d5","topic":"指令执行方案","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"b043d737-15ab-4caa-a6b8-c40bc0176415","topic":"单指令周期","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"75f64862-1de3-45bc-aa57-62103f111b25","topic":"所有指令都用相同的时间执行","expanded":true},{"id":"8270cfc7-d2d4-4cb0-8787-1384daff6c90","topic":"指令间串行执行","expanded":true},{"id":"322f1696-9e96-4195-bf9f-6aa9bd9d6d54","topic":"指令周期取决于最长的指令的执行时间","expanded":true},{"id":"4e015fac-15ef-4891-b6f5-55fc32930656","topic":"降低整个系统的运行速度","expanded":true}]},{"id":"d1606cad-402e-47fd-bdff-0b2d39b2d277","topic":"多指令周期","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"b4bdf278-adec-4633-b04a-01a029a73eb0","topic":"对不同类型的指令选用不同的执行步骤","expanded":true},{"id":"ac8e9e5f-9878-42f0-8495-0c73c757d66e","topic":"指令间串行","expanded":true},{"id":"04a8728d-bc69-450f-8284-ecaacc6ec15d","topic":"每个指令的执行时间可以不同，按【时钟周期】来进行分配","expanded":true}]},{"id":"f09052ad-8039-4aa5-8118-5a1ff8a48a3b","topic":"流水线方案","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"050cdc2c-f901-40a0-9e1e-becee91bdee1","topic":"指令间可以并行执行的方案","expanded":true}]}]}]},{"id":"087f1c64-cf9b-443d-99e8-69cf93eed650","topic":"【数据通路】的功能、基本结构","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-9f20dc51c27b13.svg","width":60,"height":60},"children":[{"id":"bd67fbd0-3803-42ee-bbc9-4d71dec5eef1","topic":"数据通路的功能","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"45a9dbab-1bdd-4d7a-b7fe-6e4a4511f557","topic":"数据通路：数据在功能部件之间传送的路径","expanded":true,"style":{"background":"#8EDE99"}},{"id":"9066d349-4f14-4da9-9cd8-9d7e64b903fb","topic":"数据通路部件：通路上的部件","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"07728692-1775-4cae-8ec8-260248a8e143","topic":"如ALU、通用寄存器、状态寄存器等等","expanded":true}]},{"id":"ff93ed13-e01a-48db-a31e-b671b8486e07","topic":"执行/功能部件：在数据通路中专门进行数据运算的部件","expanded":true,"style":{"background":"#8EDE99"}}]},{"id":"66fc09c1-5da0-4a36-8db4-426234b6f3b3","topic":"数据通路的基本结构","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"a48f24a5-86ad-446c-96a9-755c5a6cf94c","topic":"CPU内部单总线方式","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"17feb541-2c5e-43d0-b425-ba49ad058fe4","topic":"各个部件对于总线的使用是独占的，同一时刻只能两个部件进行数据交换（一个in，一个out）","expanded":true,"style":{"background":"#FF9595"}},{"id":"da58d081-2f92-45f7-ba03-9e56159e983a","topic":"图示","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-de755cae0bd666.png","width":273.8,"height":525.74},"children":[{"id":"8d007bb5-2cfe-4e61-a9a4-01164907f836","topic":"图示","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-5e23c3d73c83a3.png","width":264.12,"height":536.86},"children":[{"id":"f998d799-a660-4c99-a6d4-4e70e66f392a","topic":"其中所有的寄存器的in out控制命令全是由CU发出的","expanded":true},{"id":"d0d9222d-b168-4e86-96d2-ce767319dea4","topic":"寄存器之间的数据流动","expanded":true,"children":[{"id":"01d1bcc8-5d45-4ee2-ae69-eefc17d9b9fe","topic":"例如：PC -> MAR\n1. (PC) -> Bus -> MAR， [ PCout有效，MARin有效 ]\n2. (PC) + 1 -> PC","expanded":true}]},{"id":"e9310f8b-b432-4894-9209-8195b974a26e","topic":"主存和CPU之间的数据传送","expanded":true,"children":[{"id":"6f795a6b-6f4b-41ae-9b35-c7c11c302efb","topic":"例如：从主存读取指令\n 1. (PC) -> Bus -> MAR，[ PCout，MARin有效 ]\n2. 1 -> R，(PC) + 1 -> PC\n3. MEM(MAR) -> MDR，[ MARoutE MDRinE 有效 ] \n4. (MDR) -> IR，[ MDRout，IRin ] 有效","expanded":true,"children":[{"id":"da325077-35fe-4125-81d3-9df24766c7a5","topic":"MARoutE 和主存交互","expanded":true,"style":{"background":"#FFABD5"}},{"id":"46c25ec8-474d-4244-9ac0-2e50ddaff885","topic":"MDR in/out E 和主存交互","expanded":true,"style":{"background":"#FFABD5"}}]}]},{"id":"62e73248-c822-4b39-87cb-a18aad7640ab","topic":"执行运算","expanded":true,"children":[{"id":"3f9440e9-1a76-45da-9d0f-d527c84eedc1","topic":"例如：执行加法运算 ACC + (ad(IR))，第一个加数在ACC或R0中，另一个加数的地址是IR的地址码\n 1. Ad(IR) -> Bus -> MAR，[ IRout ,MARin 有效]\n2. 1 -> R\n3. MEM(MAR) -> MDR，[ MARoutE MDRinE 有效 ]\n4. (MDR) -> Bus -> Y，[ MDRout Yin 有效 ]\n5. (ACC/R0) + (Y) -> Z，[ACCout/R0out Zin有效，CU发送加法指令]\n6. Z -> ACC/R0，[Zout ACCin/R0in有效]","expanded":true,"children":[{"id":"c10e693b-1a0b-49ce-a65b-c717ab1b9be6","topic":"这里的Y是一个暂存寄存器，因为单总线同时只能有一个数据流向。如果设置多总线，则可以不用该暂存寄存器","expanded":true,"style":{"background":"#FFABD5"}}]}]},{"id":"1e557f56-b9dc-46a9-8454-1caee566b3d8","topic":"例题：ACC (R0), R1","expanded":true,"note":"翻译一下就是((R0)) + (R1) -> (R0)，把R0内的地址间接寻址一次，然后和R1中的内容进行相加，最后存回到R0对应的地址中（为什么这里最后是(R0)而不是((R0))，因为如果只是向R0中写数据，就只写->R0就可以了）\n\n【故一共有三个阶段：取指阶段、间址阶段、执行阶段】\n\t【  1. 取指阶段】\n(PC) -> Bus -> MAR,  PCout MARin\n1 -> R, (PC) + 1 -> PC\nM(MAR) -> MDR, MARoutE MDRinE\n(MDR) -> IR, MDRout IRin\n\t【 2. 间址阶段】\n(R0) -> Bus -> MAR, MARin R0out\n1 -> R\nM(MAR) -> MDR, MARoutE MDRinE\n(MDR) -> Y, MDRout Yin\n\t【 3. 执行阶段】\n(R1) + (Y) -> Z, R1out Yout ALU发出加法控制信号\n(Z) -> MDR, Zout MDRin\n1 -> W\nMDR -> M(MAR), MDRout MARinE"},{"id":"7a8369c8-f920-471e-a1a8-34b08538624b","topic":"蓝色：补充；红色：更改","expanded":true,"icons":["emoji:💬"],"style":{"borderStyle":"dashed","borderColor":"#F59E0B"}}]}]},{"id":"6a1964d9-a42e-497b-b26a-1457ba7a08f3","topic":"内部总线&系统总线","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"3af4f32a-285f-4e98-8efe-d79fedead0e4","topic":"内部总线","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"701ee164-1876-42d1-b318-c00a8bcc5ad1","topic":"CPU连接各寄存器和各运算部件之间的总线","expanded":true,"style":{"background":"#FF9595"}}]},{"id":"a49f211c-3ddd-4aaa-b524-44ff09c0303d","topic":"系统总线","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"64f40cd2-48f7-48f6-81d2-e09e54fbc0bc","topic":"同一台计算机系统的各部件，例如CPU、内存、通道之间的总线","expanded":true,"style":{"background":"#FF9595"}}]}]}]},{"id":"774cef22-0a60-4565-8ae1-3a54b7a98d2c","topic":"CPU内部多总线方式","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"a413835b-3165-4ceb-b052-216331dceaac","topic":"多个总线可以一定程度提升效率","expanded":true}]},{"id":"a38f777b-7a87-479f-8fd5-e0e44acfea57","topic":"CPU专用数据通路方式","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"22c87735-ee1c-4d75-a3f3-c723f8fd8fd3","topic":"造价比较高，但是可以支持指令流水线","expanded":true,"style":{"background":"#FF9595"}},{"id":"af092d2f-de0a-4199-bb8b-4268f6840119","topic":"基本结构 + 一个取指周期的例子","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-339e9dce8944a0.png","width":555.22,"height":278.54},"children":[{"id":"b47449bc-10c1-49cc-98aa-6e35472cd32b","topic":"例题","expanded":true,"style":{"background":"#FF9595"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-a6814b57b079dc.png","width":299.51,"height":269.56},"children":[{"id":"f0ae4522-407f-49e2-8697-774901e19f51","topic":"确定蓝色是哪个？MAR、PC、IR、MDR","expanded":false,"style":{"background":"#FF9595"},"children":[{"id":"6efc9aca-3ce3-46fa-bcbe-20ea099d642b","topic":"A：MDR","expanded":true},{"id":"8001588c-0788-445c-acf4-695028bd0d97","topic":"B：IR","expanded":true},{"id":"16380dae-c093-41e3-9160-dec844fb5131","topic":"C：MAR","expanded":true},{"id":"4498fd46-8109-445d-9d10-2d4a65934210","topic":"D：PC","expanded":true}]},{"id":"c1d6e3f8-ed55-43ff-a049-07cceeb58399","topic":"只有MAR和M是单向的","expanded":true,"style":{"background":"#FDD834"}},{"id":"0d9ace5a-13b4-4585-9957-fc9a266838d3","topic":"有自增的是PC","expanded":true,"style":{"background":"#FDD834"}},{"id":"7bd2b17c-3b59-4d88-ad15-961926a89899","topic":"IR和MDR是可以和M双向的","expanded":true,"style":{"background":"#FDD834"}},{"id":"7c40b903-28de-42db-9c20-5f86321a7a72","topic":"MDR不会直接到PC，IR可以直接到PC","expanded":true,"style":{"background":"#FDD834"}}]}]}]}]},{"id":"bf11349e-ebdd-415b-b500-c64f4a49f691","topic":"考频：中","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"8ec21414-6736-447a-b3fd-bee610e29e14","topic":"16、21、09大、15大、22大","expanded":true}]}]},{"id":"7c19bb81-2810-462b-9f7f-9e315d6f8e7a","topic":"控制器各部件之间的连接","expanded":true,"children":[{"id":"fdbf1e42-a945-4f7a-923d-544f280f13b3","topic":"考频：低","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"eb39f167-92f8-4634-a6b5-3f4b83896750","topic":"17、19、21","expanded":true}]},{"id":"2f0bcf82-bd35-4120-9353-7061dbf16fdf","topic":"CPU的三总线结构","expanded":true,"children":[{"id":"bff6566c-e560-451f-b693-e79b6c32531e","topic":"数据总线DB、地址总线AB、控制总线CB","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-7008cffde7ea38.png","width":536.97,"height":296.81},"children":[{"id":"fa296b72-b6b7-470d-8dd2-f4c20208559f","topic":"运算器部件","expanded":true,"children":[{"id":"a30b5369-58d3-4f9e-8ddc-c4c35c79b1ed","topic":"通过数据总线连接","expanded":true,"style":{"color":"#7986CB","shape":"underline","fontSize":14},"children":[{"id":"b7b60968-7240-482d-836c-5c557c699c8b","topic":"主存、IO设备之间传输数据","expanded":true}]}]},{"id":"1b03827d-44c8-4788-9e22-889c91d0331a","topic":"IO设备","expanded":true,"children":[{"id":"4c9aad79-22ed-4114-b8f8-1e94bcb26ac4","topic":"通过接口电路连接","expanded":true,"style":{"color":"#7986CB","shape":"underline","fontSize":14},"children":[{"id":"eb8ba96e-fe47-4bc8-9be1-284eddcc464f","topic":"总线","expanded":true}]}]},{"id":"20e047c1-7ad6-4e58-9a29-59f3bfb84251","topic":"主存、IO设备","expanded":true,"children":[{"id":"a8c1c685-2fcc-482d-9aff-84ed0b583e11","topic":"通过AB接受","expanded":true,"style":{"color":"#7986CB","shape":"underline","fontSize":14},"children":[{"id":"a9c1f33d-7385-430c-84c4-39c5f7aebc0c","topic":"地址信息","expanded":true}]},{"id":"baae6e4b-af21-4120-8643-02bd9ed19ef5","topic":"通过CB获得","expanded":true,"style":{"color":"#7986CB","shape":"underline","fontSize":14},"children":[{"id":"7a4ec31f-c214-4c10-992f-58a55eeb7bce","topic":"控制信号","expanded":true}]},{"id":"03166fba-51fc-48f5-8f57-c0464ed70104","topic":"通过DB","expanded":true,"style":{"color":"#7986CB","shape":"underline","fontSize":14},"children":[{"id":"42cde565-7aaf-412a-b822-5512c5822699","topic":"与其他部件传送数据","expanded":true}]}]},{"id":"474f36aa-b244-44e4-9866-efc50416005b","topic":"控制器","expanded":true,"children":[{"id":"2144564c-63ac-41e4-9655-2d58a6876dcb","topic":"通过DB","expanded":true,"style":{"color":"#7986CB","shape":"underline","fontSize":14},"children":[{"id":"c5d82560-d245-4431-8ccb-968eec13710f","topic":"接受指令信息","expanded":true}]},{"id":"69c704a1-50eb-4592-a106-0d450818b702","topic":"从运算器部件","expanded":true,"style":{"color":"#7986CB","shape":"underline","fontSize":14},"children":[{"id":"5d7faabf-7d7e-4c2e-9a31-a31bb0d17ea1","topic":"接受转移指令","expanded":true}]},{"id":"51a99853-2731-48ef-a376-69dfe563c32b","topic":"通过AB","expanded":true,"style":{"color":"#7986CB","shape":"underline","fontSize":14},"children":[{"id":"89d98ca9-bac3-4e1a-8d0e-a872f965a3a0","topic":"送出指令地址","expanded":true}]},{"id":"374a9165-a5d1-4532-95c6-6dc1ccff6f3f","topic":"向系统中的各部件提供运行所需的控制信号","expanded":true}]}]}]},{"id":"04f0fb05-be8c-42ce-b5ff-5c3196b0682d","topic":"硬布线、微程序","expanded":true,"children":[{"id":"ac3b0329-7cc1-4e16-b973-4f3210e12f89","topic":"看后节","expanded":true}]}]},{"id":"46530f28-be14-42e7-abc1-cd960def4b18","topic":"硬布线","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-718e219686daac.svg","width":61,"height":60},"children":[{"id":"5edb0063-0b95-4da9-a3e3-5cb85802567f","topic":"只能适用于RISC架构，执行速度超级快，扩展起来很复杂","expanded":true,"style":{"background":"#FDD834"}},{"id":"7f468902-e9b0-4ad0-94c1-8aac912383c2","topic":"四大机器周期","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"7f5b1fc2-c905-4766-a66c-aaf985c10312","topic":"FE 取指周期、IND 间址周期、EX 执行周期、INT 中断周期","expanded":true,"style":{"background":"#8EDE99"}}]},{"id":"ee9927ec-d0af-4543-bca6-81272ff84908","topic":"微指令的内容","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"318a6c6f-cb62-4db5-80ec-c6e1529c862e","topic":"特点一：每个周期中有多个微操作/微指令，很多微操作/微指令是可以并行的完成的（特别是多总线结构的时候）","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"bb0e4df8-a18d-4432-9f1e-b505fbbcf92e","topic":"三个原则","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"8e6cb7a6-f666-4834-8a2a-26692d36f14f","topic":"原则一：微操作的先后顺序不得随意更改","expanded":true,"style":{"background":"#FF9595"}},{"id":"0a108d27-58e3-4825-a3af-4f886548733b","topic":"原则二：被控对象不同的微操作尽量安排在一个节拍内完成","expanded":true,"style":{"background":"#FF9595"}},{"id":"d2af8ae1-d2e0-4d28-abee-2e43d9be37fe","topic":"原则三：占用时间较短的微操作尽量安排在一个节拍内完成并【允许有先后顺序】","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"76cb35b7-0801-471e-b4e8-ed9835cd47b3","topic":"时间较短：不用访问主存","expanded":true}]}]},{"id":"c44debf4-f2e8-479e-a1b5-369cf81e0b12","topic":"例如：取指周期","expanded":true,"children":[{"id":"b9e9f321-0693-452e-a4ef-156d7c40d1ea","topic":"取指周期微操作节拍","expanded":true,"children":[{"id":"33b71af1-f77f-4311-835d-72c69c6ff08b","topic":"M(MAR) → MDR 从主存取数据，用时较长，因此必须一个时钟周期才能保证微操作的完成","expanded":true,"style":{"background":"#8EDE99"}},{"id":"89cd68d3-4f0b-4393-b536-ab28fe19f52b","topic":"MDR → IR是CPU内部寄存器的数据传送，速度很快，因此在一个时钟周期内可以紧接着完成 OP(IR)。","expanded":true,"style":{"background":"#8EDE99"}}],"code":{"lang":"plaintext","code":"T0  (1) PC -> MAR\nT0  (2) 1 -> R            // 存储器空闲后\nT1  (3) M(MAR) -> MDR     // (1)之后（安排在一个节拍内）\nT1  (6) (PC)+1 -> PC      // (1)之后（安排在一个节拍内）\nT2  (4) MDR -> IR         // (3)之后\nT2  (5) OP(IR) -> ID      // (4)之后","tokens":[[{"text":"T0  (1) PC -> MAR"}],[{"text":"T0  (2) 1 -> R            // 存储器空闲后"}],[{"text":"T1  (3) M(MAR) -> MDR     // (1)之后（安排在一个节拍内）"}],[{"text":"T1  (6) (PC)+1 -> PC      // (1)之后（安排在一个节拍内）"}],[{"text":"T2  (4) MDR -> IR         // (3)之后"}],[{"text":"T2  (5) OP(IR) -> ID      // (4)之后"}]]}},{"id":"51003ce5-4cc3-4bd4-939b-310a5b21ee06","topic":"多个不涉及主存的数据传输可以在一个时钟周期内完成","expanded":true}]},{"id":"ee6a67fd-1b78-4641-b05b-25f373393e8f","topic":"微指令产生微操作信号","expanded":true,"icons":["emoji:💬"],"style":{"borderStyle":"dashed","borderColor":"#F59E0B"}}]},{"id":"dd543538-3499-45cc-aee7-7e918aecb65c","topic":"特点二：同一个微操作可能在不同指令、不同阶段被多次使用","expanded":true,"style":{"background":"#8EDE99"}},{"id":"a6676c9f-f434-44f1-bf57-83dbadc549be","topic":"特点三：使用定长的节拍来进行微操作的设计","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"618ba6a2-ec77-46a4-a9fd-6e218e6bafe7","topic":"一个机器周期三个节拍","expanded":true}]}]},{"id":"41269949-30db-449d-8d04-6224539cc375","topic":"确定一条微指令\n四大要素：","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"dae5c9d5-a2e6-4641-9010-7b3f1dbcb72d","topic":"微操作通过【指令的OP部分、当前处于哪个机器周期、当前机器周期的节拍号、PSW的状态】来确定","expanded":true,"style":{"background":"#8EDDF9"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-843ca4e9421d79.png","width":546.47,"height":257.58}},{"id":"5d18bca3-27d5-45e9-9f97-139633e84b27","topic":"确定指令操作码：","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"d80b9475-f5f0-457b-863a-37b64904ebfe","topic":"图示","expanded":true,"style":{"background":"#8EDDF9"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-ebc00f0c29c0e4.png","width":152.3,"height":208.32},"children":[{"id":"1be02394-c5b9-401a-875c-0eca6e94d5c9","topic":"把IR通过OP译码器连接到CU上，使得CU可以得知当前是哪一个操作指令","expanded":true,"children":[{"id":"22683c07-1468-464a-922c-d573137e7f2d","topic":"如何对应，可以参考（译码器）：","expanded":true}]}]}]},{"id":"58d321f5-f4fa-4229-bd71-114f79dea318","topic":"确定机器周期：","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"eb9376e9-53f1-47b4-85cb-394b36637d63","topic":"图示","expanded":true,"style":{"background":"#8EDDF9"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-02c921cbcbf845.png","width":279.18,"height":76.02},"children":[{"id":"7d5cb9a4-e1e7-4381-a067-10f2b1db3ae1","topic":"通过在CU内部的四个触发器的值来确定","expanded":true,"style":{"background":"#8EDDF9"}},{"id":"1eb3ae07-afb5-495e-a989-aa699189bf97","topic":"根据四个触发器哪个值为1来确定","expanded":true}]}]},{"id":"19c42250-b597-4854-8217-51bae3a6a833","topic":"确定节拍号：","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"810e5c81-3a81-4bf1-9871-c7ea4fd4a176","topic":"图示","expanded":true,"style":{"background":"#8EDDF9"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-8261f3416adeef.png","width":317.33,"height":187.62},"children":[{"id":"6143b171-cc9c-40b5-bff6-753c6bc37dc0","topic":"通过连接的节拍发生器，来得知当前是哪一个节拍，且节拍不停的循环往复发出","expanded":true}]}]},{"id":"a9beac76-efaf-4aac-bcbd-757b7f1b4a59","topic":"确定标志信息：","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"956fba0c-664c-471b-9bac-bc3b658b1d75","topic":"图示","expanded":true,"style":{"background":"#8EDDF9"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-af43e327c9a6a0.png","width":364.73,"height":89.62},"children":[{"id":"b26889b1-6df1-443a-8987-8d60b14651e0","topic":"来自PSW、ACC等，也可能来自IO、主存","expanded":true}]}]},{"id":"65408eb4-f458-4ae7-9e99-ef32bd5aec98","topic":"最后CU输出微操作：","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"0ecd4851-a219-4e22-9c5a-8bcc548d5539","topic":"图示","expanded":true,"style":{"background":"#8EDDF9"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-67d499e90f579a.png","width":290.62,"height":196.69}}]},{"id":"ee9d8c85-2442-4630-8984-f346a36a5321","topic":"完整图","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"f6b5aa15-dccd-45e6-9d1d-7c1c82791d38","topic":"图示","expanded":true,"style":{"background":"#8EDE99"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-e7f7d0d5a3dba4.png","width":490.02,"height":251.53}}]}]},{"id":"7b132bc2-9879-41ed-8eea-3d3fc4e8e8bd","topic":"如何通过要素\n确定微指令：","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"f8b2170e-93e4-4ab1-a558-fea3aa666757","topic":"考虑所有可能的指令情况，写出对应的微操作所需要的四要素：","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"cf82936f-15d4-439c-9bfb-59eaa489cf84","topic":"例如：取指周期T0时刻的(PC) -> MAR","expanded":true,"style":{"background":"#8EDDF9"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-0d345c46260286.png","width":316.29,"height":163.99},"children":[{"id":"d208f523-66b8-4ec1-a6dd-29bf90309d0c","topic":"然后把所有情况考虑充分后。举个例子：可能出现的所有M(MAR) -> MDR的情况：","expanded":true,"style":{"background":"#8EDDF9"}},{"id":"5847cef7-1fb5-468b-a071-7fe6b29fce9a","topic":"例如：M(MAR) -> MDR","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-8b1dead8032a1d.png","width":657.5,"height":311.71}},{"id":"7ab2f545-f3ba-4cfc-863b-61c718ca1e8c","topic":"此处C1就对应了PCout和MARin","expanded":true,"icons":["emoji:💬"],"style":{"borderStyle":"dashed","borderColor":"#F59E0B"}}]}]}]},{"id":"da104852-a623-47f3-825e-1c937ef92d8b","topic":"操作时间表：","expanded":true,"children":[{"id":"72fc1a5e-fb88-4677-9d16-99233b465578","topic":"图示","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-f57e02d6d26133.png","width":403.87,"height":224.61}},{"id":"15396010-d3a6-4534-882b-c226a91fa49b","topic":"图示","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-369047e6a30e6b.png","width":407.99,"height":231.41}}]},{"id":"ea47b6c7-b702-4b8f-8092-0b1a8b74a2da","topic":"根据操作时间表，把所有重复的微操作命令信号给归纳总结出来，合成一个电路","expanded":true,"style":{"background":"#8EDE99"}},{"id":"19e01ce2-89e9-44a6-83d8-c3c96944725a","topic":"考频：低","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"668e9cd5-eb6e-4645-96e4-1781265f7911","topic":"09","expanded":true}]}]},{"id":"fa6e3d3c-6c63-4c91-b614-d0c1b2f44bef","topic":"微程序","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-fb96c55c1fee10.svg","width":60,"height":60},"children":[{"id":"0261ae27-140d-4fa0-9309-e1735380f594","topic":"考频：低","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"557c9f04-0589-4393-a1cc-45e5e7c9f8e9","topic":"09、12、14","expanded":true}]},{"id":"914ecd17-2aef-4e7c-83df-91c7efc4bc79","topic":"引用了软件的思想","expanded":true,"children":[{"id":"c10fc0e8-aca5-4887-b777-01add427f782","topic":"把程序运行的【指令划分为多个微指令】，然后在CPU中再套娃一层CPU","expanded":true,"children":[{"id":"93374263-888b-4536-8c80-fd64a7790067","topic":"也可以称为【机器指令是多个微指令的封装】","expanded":true},{"id":"f9f82be0-4a0e-4a4b-a49b-de7ce43ecfc6","topic":"微指令 = n * 微操作","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"56a34383-5c5d-4b10-9ecd-68c3aa2d4097","topic":"微指令是微程序独有的概念","expanded":true,"style":{"background":"#FDD834"}}]},{"id":"41321d4f-6213-460f-8cbb-c7d2c2235a75","topic":"微程序、微程序组、微指令、（微操作、微命令）","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"9abaea9b-b2ec-4dd1-aaa2-ed3e44ed2293","topic":"微程序：实现一条机器指令的程序","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"e0f2a7ef-677e-4455-a48b-b4630f9cfedc","topic":"耗费一个指令周期","expanded":true}]},{"id":"bd664876-f25b-4aff-91be-5678f826584b","topic":"微程序组：一条机器指令在不同机器周期执行一个微程序组","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"dad14b53-8f44-44b8-97e2-66b5b1ddbefc","topic":"耗费一个机器周期","expanded":true},{"id":"869e6bef-e95b-47bc-83f3-2c97804c5f6f","topic":"例如指令A的取值、间址阶段有不同的微程序组","expanded":true}]},{"id":"65b49e80-b818-4dce-8912-0823ba7ca1c8","topic":"微指令：","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"47a8705e-2e0d-4451-9415-dc254e7f4866","topic":"多个微操作的合集，是微程序的‘代码’","expanded":true,"children":[{"id":"fe9d41e3-4819-4baf-b54e-eea6f08cafa6","topic":"代码","expanded":true,"style":{"background":"#8EDE99"}}]}]},{"id":"19fad629-3676-4104-aa01-53176255da36","topic":"微操作、微命令：","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"932e2561-b836-4cf4-9985-9c8689e282f4","topic":"微命令是微操作的控制信号；微操作是微命令的执行过程。 [ 例如（PC)->MAR ]","expanded":true}]}]}]}]},{"id":"d2505444-8f96-42f8-ac5e-e08e691b97ac","topic":"微指令的结构","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"b547a75c-505a-4f71-b434-6e42ef744e9a","topic":"图示","expanded":true,"style":{"background":"#8EDE99"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-a53f70931111fa.png","width":384.66,"height":132.31},"children":[{"id":"8ab6e888-f818-4ca0-9413-37ffa7f86ba2","topic":"控制信号 + 下地址","expanded":true,"style":{"background":"#8EDE99"}}]}]},{"id":"c01c2edf-d5e0-4936-9d5a-68d4c55b32fa","topic":"微程序控制器\n（微CPU）部件","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"b21bc738-73ad-4ce7-b108-35e1521d5c53","topic":"微程序的CU","expanded":true,"style":{"background":"#FFABD5"}},{"id":"575c6111-cb51-479d-a67c-1053f9d44507","topic":"微地址形成部件","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"7c92370d-05b8-4247-ae7a-9c4937ef7b21","topic":"根据IR中的指令的OP部分，来指出该指令的微程序的起始地址","expanded":true}]},{"id":"f067d74e-0406-4c92-a6c8-be9b02073bd1","topic":"顺序逻辑","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"e0b3b7b7-771c-4da7-9c48-ece4adbfe8b5","topic":"连接有：众多标记","expanded":true,"children":[{"id":"98c2421f-7e22-44bb-84b5-b49c56f95937","topic":"例如 LDA A和 LDA (A)","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"fd7c0a4c-c10e-4038-a70c-db2059a76dd4","topic":"第一个就不用间接寻址，第二个就需要间接寻址","expanded":true,"style":{"background":"#8EDDF9"}}]},{"id":"fd57e52b-8c63-44c9-baa7-5e3e0eca97fd","topic":"根据指令地址码的寻址特征来判断如何进行寻址","expanded":true}]},{"id":"012d5053-2b48-4a65-945b-c87ebfccb055","topic":"连接有：CLK","expanded":true,"children":[{"id":"0ae8cea8-cd0d-4ade-8104-cc6475a2702a","topic":"时钟信号","expanded":true}]}]},{"id":"774e292a-b4b9-4256-8a2f-c818bd961bb3","topic":"CM - 控制存储器","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"e579012d-72d3-4bfd-b157-ee147e3138ec","topic":"控存，由ROM组成，用来存各种指令的微程序段（就像存在内存中的程序的指令一样）","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-2cfc043c52802e.png","width":249.77,"height":230.74}}]},{"id":"081c8518-80da-434d-86a9-e578bb350a9e","topic":"CMAR - 微地址寄存器","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"969a2371-476c-458d-8221-77ab5c7197b5","topic":"别名：μPC，是 MAR 和 PC 功能的结合体","expanded":true}]},{"id":"e009da46-9664-4f9f-8cbf-3ef0ef5d77e3","topic":"地址译码","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"5900ba47-87f6-41be-b4f2-1a670e5517f7","topic":"将地址码转为存储单元的控制信号","expanded":true}]},{"id":"aa01a8f7-21d8-4246-ba88-e19846c3fead","topic":"CMDR - 微指令寄存器","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"9797f313-373b-42c6-aec5-61c699754432","topic":"别名：μIR，是 MDR 和 IR 功能的结合体，CMDR的【位数】和【最长的微指令的字长】应该相同","expanded":true}]}]},{"id":"1b1c2ca2-3e59-4791-a120-19f05bdbf7a2","topic":"微程序控制器\n的处理流程：","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"c7e617bf-5383-4a59-a8aa-9d97f3a3fe1d","topic":"图示","expanded":true,"style":{"background":"#8EDE99"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-ac76c2fd9e4622.png","width":395.36,"height":286.15},"children":[{"id":"61d9d4a6-9ef1-47bd-9477-2f87647315b0","topic":"1. 获得【IR中的OP部分】","expanded":true,"style":{"background":"#8EDE99"}},{"id":"d36f8059-ee7b-4a14-94c4-9425e399c913","topic":"2.【微地址形成部件和顺序逻辑配合】生成了微程序的起始地址，放入到CMAR中","expanded":true,"style":{"background":"#8EDE99"}},{"id":"841286d2-a455-4521-a3a2-181ca239b762","topic":"3. CMAR中的地址通过地址译码指明到控制存储器CM","expanded":true,"style":{"background":"#8EDE99"}},{"id":"cf27d158-969e-4e22-bd11-2fffdaf1509d","topic":"4. 把对应的微指令取到CMDR中，微指令分两个部分：","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"2141aa21-03e6-42e8-bc39-a244db66d8c0","topic":"μOP 控制信号","expanded":true,"children":[{"id":"8e81ffd8-6ed4-40f5-ae76-b63fa535b400","topic":"用来发送控制信号到CPU内部和系统总线","expanded":true}]},{"id":"64be4c74-cadb-4ac0-81a9-e7df979d755e","topic":"+","expanded":true},{"id":"794d6778-7ca6-471e-a44f-fe1d1469e47c","topic":"下地址","expanded":true,"children":[{"id":"e62c6ecc-b63a-4d05-968a-3d29cb195a30","topic":"指明下一条需要执行的微指令地址","expanded":true}]}]}]}]},{"id":"6e0e4c1a-7ad3-4e30-bcee-695a6bb4fa44","topic":"CM中的微指令序列","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"0219901c-2070-43da-884d-97e449f8be70","topic":"图示","expanded":true,"style":{"background":"#8EDE99"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-f61dd27b55c467.png","width":309.54,"height":339.41},"children":[{"id":"9adb5071-f7b4-401d-a84d-9ab249a1d107","topic":"特点","expanded":true,"children":[{"id":"fd63924a-eaf4-484b-9ee0-45804c3f494f","topic":"取指周期、间址周期、中断周期是所有指令共享的","expanded":true},{"id":"a217489f-04f8-4826-9143-10ac0a8fdc3b","topic":"取指周期的最后一条指令的下地址是3，但是在间址开始阶段，微指令形成部件会根据标记信息来控制要不要执行间址周期","expanded":true,"style":{"background":"#8EDDF9"}}]},{"id":"113661db-a251-4aa2-9616-d0b936b8f66a","topic":"例如：LDA X","expanded":true,"style":{"background":"#8EDE99"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-eda05f72c446a1.png","width":606,"height":360}},{"id":"70531172-3dff-471f-b999-697229838020","topic":"考试的边边角角：如果系统中存在N条指令，那么我们应该至少设计N+1个微程序","expanded":true,"style":{"background":"#FFABD5"},"children":[{"id":"354bcdbf-168b-4ccb-ba4a-c3c23f8f5542","topic":"古代、微型CPU可以不提供执行间址、中断","expanded":true,"style":{"background":"#FFABD5"}}]}]}]},{"id":"abbfed9d-b465-4792-8e7a-4b82a77e4b56","topic":"微指令的分类","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"4bb654a4-5410-4e7d-a62b-7ae05bb6cd04","topic":"在硬布线中，一个微操作就对应一个微命令，所以线是一一对应的。而在微程序中，一个微指令对应多个微操作","expanded":true,"style":{"background":"#8EDE99"}},{"id":"eef08d6a-6700-4e52-b272-450ff333367b","topic":"水平型微指令","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"abf1896d-44e5-43eb-b082-bc2fde5e077a","topic":"图示","expanded":true,"style":{"background":"#8EDDF9"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-36e3f1f6464f40.png","width":353.29,"height":39.76}},{"id":"aefd12c8-727e-48c0-b4dd-29082984916b","topic":"优点：","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"1d052cee-80aa-4857-89fe-ebfe52173b0c","topic":"微程序指令条数少、执行速度快","expanded":true}]},{"id":"e192e7e5-5f7d-458c-9185-6cd8f0c32904","topic":"缺点：","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"e7076f60-43f1-4e6a-92dd-f62b9ef930d1","topic":"微指令长，编写难度大","expanded":true}]}]},{"id":"bba10628-275b-4740-b682-fbcd2f028cc7","topic":"垂直型微指令","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"ff79cbf7-4c30-4ca4-bc4d-fbaa997b87a1","topic":"图示","expanded":true,"style":{"background":"#8EDDF9"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-e88334f6f10971.png","width":350.34,"height":48.02}},{"id":"4172e125-8817-4b4d-91f1-e397a5648eac","topic":"优点：","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"52dd66c9-4228-48ca-aa3b-9d3f5db745a8","topic":"微指令短，易于编写","expanded":true}]},{"id":"410c6536-ce25-4143-9635-2e2880b7883c","topic":"缺点：","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"2ade24d1-c951-4b37-a5fb-d2f1e3120f91","topic":"微程序指令条数多，性能比较低","expanded":true}]}]},{"id":"7358a9e7-22f0-4e01-8061-04996a9525b8","topic":"混合型微指令","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"eb294088-9a46-4c2e-acb4-dd613eb222d3","topic":"上面两种的折中","expanded":true,"children":[{"id":"a80591c3-e865-41e8-b9d9-046f918c3400","topic":"在垂直的基础上，增加上一些并不复杂的并行","expanded":true}]}]},{"id":"fa02160e-ff8e-4aaa-82a2-63f80aff1fb5","topic":"了解","expanded":true,"icons":["emoji:💬"],"style":{"borderStyle":"dashed","borderColor":"#F59E0B"}}]},{"id":"1de472f7-1bea-498c-8425-bcd147eea4dd","topic":"微指令的编码方式","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"24fafc4c-64d6-4f9d-acf9-7ed6fb92e9a2","topic":"μOP部分","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"9c4c6f13-f448-47f4-abe9-460e73b33383","topic":"直接编码方式","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"e3c355ec-b64f-439d-ace5-c36abbd257b3","topic":"一个bit的 0、1对应一个微操作的运行和不运行","expanded":true,"style":{"background":"#8EDDF9"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-8ad455971f570d.png","width":375.22,"height":110.33}},{"id":"3260a774-3498-4895-b268-5a48150882b8","topic":"优点：","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"b73d792f-86bb-46aa-9db0-9c2c2ac570a9","topic":"简单直观、执行速度快、操作并行性好","expanded":true,"style":{"background":"#FF9595"}}]},{"id":"9b8f995c-ae62-4e6a-ba35-42a36e1e1f1d","topic":"缺点：","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"7153e79f-103a-494d-93bc-5515dc74e420","topic":"微指令过长，如果有n条微操作，就需要n个bit位","expanded":true,"style":{"background":"#8EDE99"}}]}]},{"id":"63325414-ab6b-4005-aa46-b2f1e6b295e1","topic":"字段编码方式","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"669a627d-98e3-4813-bcf2-f648c257975e","topic":"图示","expanded":true,"style":{"background":"#8EDDF9"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-a0642be6994895.png","width":258.44,"height":163.72},"children":[{"id":"7f1fc337-2b58-41a5-9774-177cd0bdabeb","topic":"如果一个类中的bit数为3，则说明该类一共可以对应 8 个微操作（其中一定包含一个空操作），故有7条有效微操作","expanded":true,"style":{"background":"#8EDDF9"}},{"id":"a4cc92aa-cc1a-42c6-a7d6-ba821dcd124f","topic":"每个小段信息位不要太多，不然译码难度大","expanded":true,"style":{"background":"#8EDDF9"}},{"id":"bb0920fe-48ad-4b0c-8353-fec3351ff263","topic":"互斥：微操作不可在同一节拍内进行","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"332ef2ab-0a50-4717-8c69-6fa9dc8539cc","topic":"把互斥的微操作放在同一个类 --- 不可并行","expanded":true,"style":{"background":"#FDD834"}},{"id":"94c01d8d-9ad8-482c-96d2-fc10f7343723","topic":"不互斥(相容)的微操作放在不同的类 --- 可并行","expanded":true,"style":{"background":"#FDD834"}}]}]},{"id":"8a3e605d-6f89-4d4a-9ffd-4e2a5735d671","topic":"优点：","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"bec90110-347c-4445-9231-838b84b96fe8","topic":"可以缩短编码字长","expanded":true,"style":{"background":"#FF9595"}}]},{"id":"05faabe7-0346-460e-b700-6c792971b4c6","topic":"缺点：","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"2c5f02c5-8762-484f-9595-3f4abadc12e0","topic":"每个微指令都必须通过译码后才能产生微操作，速度比直接编码慢","expanded":true,"style":{"background":"#8EDE99"}}]}]},{"id":"2fb5be77-6efa-4883-9bf2-e32fe1877bf7","topic":"字段间接编码方式\n（隐式编码）","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"dc81a4d7-6f66-4f0b-b663-f356fa50a023","topic":"字段编码方式中，译码后不会直接发出微命令，而是需要多个译码结果来决定","expanded":true,"style":{"background":"#8EDE99"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-e9ed05f130f1a4.png","width":288.99,"height":197.84}},{"id":"d7f227ad-4e74-453f-bccc-c92dc97908cd","topic":"优点：","expanded":true,"children":[{"id":"1ba1f361-f85c-4262-b916-bf1efaeda8e3","topic":"进一步缩短字长","expanded":true}]},{"id":"9e739204-22c5-4123-b4d8-7e8fe818e9e5","topic":"缺点：","expanded":true,"children":[{"id":"22aabf55-b9f7-4b90-bbb4-a3c048ff962f","topic":"更慢了","expanded":true}]}]}]},{"id":"dc13c576-2fee-4e13-9a52-20b258022d25","topic":"下地址部分","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"f005c999-7235-4cac-a8ae-f464a9de2c64","topic":"断定方式","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"1dca8a2f-0930-4979-b497-f20b57ca4dc7","topic":"下地址写的哪条就运行哪条","expanded":true,"style":{"background":"#FF9595"}}]},{"id":"abd4ef37-d739-4c31-b3e7-5781b54c3b2a","topic":"根据OP形成","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"a6f583f4-1b8e-46e1-b2fd-939435bfb35d","topic":"根据【机器指令】的OP部分来指明操作码","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"25ea4d75-9e66-4ff0-b53e-ce348e770978","topic":"就是这个","expanded":true,"style":{"background":"#FF9595"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-ac32b84f9f7d29.png","width":122.93,"height":97.81}}]}]},{"id":"172a8b3a-98b4-46c2-b47c-85ce7850737e","topic":"增量计数法","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"269bc91f-c7cc-42bc-b6d3-708ebe9af875","topic":"(CMAR) + 1 -> CMAR","expanded":true,"style":{"background":"#FF9595"}}]},{"id":"e33edc7c-9e77-4fa7-b36a-ab442fa3ea32","topic":"分支转移","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"00b2ee89-d67a-40b4-9696-e299618ba75b","topic":"比较像JCondition","expanded":true,"style":{"background":"#8EDDF9"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-bd457da17c3af3.png","width":267.34,"height":39.18},"children":[{"id":"b00bc9f7-270f-4112-a167-1d7a61aa8f51","topic":"根据各种标记决定是否转移","expanded":true}]}]},{"id":"edc9d132-0e94-4eeb-b7a0-beae8c378bc9","topic":"测试网络","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"0e39c616-18f4-44a6-9d02-b51672ce8f5e","topic":"顺序逻辑部件就是测试网络","expanded":true,"style":{"background":"#8EDDF9"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-6a5ce681f22a5b.png","width":381.27,"height":180.5},"children":[{"id":"9377145a-c9c8-4397-96a6-d5369dfe293f","topic":"测试网络可以决定是否有间址、中断操作","expanded":true}]}]},{"id":"c9f4f039-90ed-4d24-bedb-d1df1302e651","topic":"硬件产生","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"1ce8ffde-8daf-427f-8f93-dd1a6be3f581","topic":"每个程序的【第一条微指令的入口地址】是专门由硬件产生的。每个程序的【中断程序】也是相同的，故也可以用硬件记录","expanded":true,"style":{"background":"#8EDDF9"}}]}]}]},{"id":"ff07b606-aaf4-4049-bbe1-d8aeb745d1ce","topic":"设计一个微程序控制单元","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"8563987c-d96c-4418-9824-3f0291c5316f","topic":"1. 分析每个阶段的微操作序列","expanded":true,"style":{"background":"#8EDE99"}},{"id":"ec226e9c-2ea3-4c87-acbb-f09a4153db9f","topic":"2. 写出对应机器指令的微操作命令","expanded":true,"style":{"background":"#8EDE99"}},{"id":"a54f02b5-91ea-4350-a2e1-879d36eeaf10","topic":"3. 写出......对应的节拍","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"09acdb3a-6a9e-4b92-bd0f-1f2ca5f1953e","topic":"扩充节拍","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"2242ae84-7e4c-4b1a-a0d5-9d95315f5563","topic":"第一条/中断是硬件自动产生的","expanded":true,"style":{"background":"#FDD834"}},{"id":"be05f17c-13ad-4644-b296-c5118f812430","topic":"扩充①：微指令运行结束后，把“下地址”存入到CMAR中，即每两个节拍之间会消耗一个节拍来执行Ad(CMDR) -> CMAR","expanded":true,"style":{"background":"#FF9595"}},{"id":"52cdcf7b-d50b-48f0-9928-f28048ba06b3","topic":"扩充②：【取指周期的】微程序运行结束后，需要把OP(IR)存入到CMAR中即：OP(IR) -> 微地址形成部件 -> CMAR","expanded":true,"style":{"background":"#BA69C8"}}]}]},{"id":"aea08a6e-7579-472a-a4d3-e057c7f6fada","topic":"4. 确定微指令格式","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"0df8938e-57aa-4fb3-95f5-bc0830584d3e","topic":"μOP","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"b9454aeb-a165-4063-bba3-9495db99eac1","topic":"确定有【多少个微操作】，然后选一种编码方式，最后确定位数","expanded":true,"style":{"background":"#8EDDF9"}}]},{"id":"a3f7d23f-1f56-47d6-97bc-18b33865145f","topic":"下地址","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"cba668cd-e9ed-42d5-ae96-1801b5b4f573","topic":"根据有【多少条微指令】来决定地址的位数","expanded":true,"style":{"background":"#8EDDF9"}}]}]},{"id":"61d2872c-5ce8-48ea-a0d0-deaaec240fc5","topic":"5. 确定码点","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"7bedfc04-d438-48ba-95e2-17ca1dfa6c7f","topic":"根据【一条微指令】里面的【微操作】来编写码点","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"4bbf885d-c477-47cb-b2c8-ef22e18e5bb3","topic":"例如：直接编码可以确定哪一个bit为1 哪一个为0","expanded":true}]}]}]},{"id":"db42b0cd-2e26-45b9-8d9c-bf75176a8367","topic":"拓展：","expanded":true,"style":{"background":"#FFABD5"},"children":[{"id":"3321599c-cd58-40ad-8f80-6bc9b175fdce","topic":"兼容性微指令：几个微指令可以同时出现","expanded":true,"style":{"background":"#FFABD5"}},{"id":"500c0d52-80e9-4684-aff6-8969f915079e","topic":"静态&动态","expanded":true,"style":{"background":"#FFABD5"},"children":[{"id":"841704eb-e284-4577-b873-307e85fa8fa3","topic":"静态微程序：","expanded":true,"style":{"background":"#FFABD5"},"children":[{"id":"358164ba-2e35-435e-bef0-f12232e9146f","topic":"微程序无需改变，采用 ROM","expanded":true}]},{"id":"f0ec5716-5e5c-4237-aa78-56cdd5b2c370","topic":"动态微程序：","expanded":true,"style":{"background":"#FFABD5"},"children":[{"id":"c2a6ff56-8b5e-4655-91a4-072e5fdfbb63","topic":"通过改变微指令和微程序改变机器指令有利于仿真，采用EPROM","expanded":true}]}]},{"id":"397f4db1-7dcd-42cc-ba72-999f850a471b","topic":"毫微程序设计","expanded":true,"style":{"background":"#FFABD5"},"children":[{"id":"bc5a512a-8a7f-4786-81b2-6f890fb18176","topic":"微程序设计","expanded":true,"style":{"background":"#FFABD5"},"children":[{"id":"da4eb7ba-0d5c-469b-9ca7-36d673be6039","topic":"微程序解释机器指令","expanded":true}]},{"id":"5b2cb93e-44ba-49c3-b800-5faf02b60ed2","topic":"毫微程序设计","expanded":true,"style":{"background":"#FFABD5"},"children":[{"id":"fc0ab951-3d9b-45d0-935f-0dc23205493a","topic":"毫微程序解释微程序","expanded":true,"children":[{"id":"08406653-51fa-4e47-a49a-068a91c52a9b","topic":"再套娃","expanded":true}]}]}]}]},{"id":"3f72e3d6-8643-4abc-be47-0a82061c1a32","topic":"硬布线、微程序区别：","expanded":true,"children":[{"id":"f1b56e83-af87-460c-965a-b5d2c9509fe7","topic":"图示","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-b377cc51a46a75.png","width":660.37,"height":249.08}}]},{"id":"f2c61bda-60e0-4713-a99b-035235d68409","topic":"总结：","expanded":true,"icons":["star:red"],"style":{"background":"#FDD834"},"children":[{"id":"b432c83c-64dc-4387-abdb-2fb9cf96976a","topic":"微程序模式","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"08765e51-adf4-4438-ad9a-9dedb66a00b5","topic":"图示","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-33b6afd00330cd.png","width":542.88,"height":681.2}}]},{"id":"e2963c90-b774-494c-8e7f-2db037698cbd","topic":"< --- >","expanded":true,"style":{"background":"#FDD834"}},{"id":"7b2568bf-efe5-4801-ac17-93750b4e45bf","topic":"硬布线模式","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"cda68a78-bc06-4161-8458-b3bc8e0edf15","topic":"图示","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-ada655479d4b0a.png","width":593.16,"height":458.84}}]}]}]},{"id":"442af0f3-9b8a-48d6-985e-f1c93bb0ca2c","topic":"指令流水线","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-a19b35cfc9db91.svg","width":60,"height":61},"children":[{"id":"b8301edd-2ab7-4f19-bedf-879237c7c7e3","topic":"指令流水定义","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"2f2d608a-95ea-4cb6-930d-8b7ea14184ac","topic":"一般指令是分为\n【取指、分析（间址+其他）、执行】三个阶段","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"5f5a2425-4c09-477b-8bb8-d4ebc07df305","topic":"其中取指分析执行三个阶段使用的硬部件是可以不同的，故可以并行执行","expanded":true}]},{"id":"b613c83b-58bb-4b0d-af60-73be8f5a0587","topic":"传统方式：","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"d0193e97-c880-4408-a215-23929408619c","topic":"设取指、分析、执行3个阶段的时间都相等，用t表示，按以下几种执行方式分析n条指令的执行时间：","expanded":true},{"id":"c66246d0-2cc6-4a7c-8795-5cedb644bf2f","topic":"图示","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-1f72638d5fed2a.png","width":386.13,"height":74.51}},{"id":"1b8a8296-c2ed-4aed-ab32-3435f8503901","topic":"优缺点：","expanded":true,"children":[{"id":"167783c4-3927-4a66-982e-0010e7e90a28","topic":"优点：控制简单，硬件代价小","expanded":true,"style":{"background":"#8EDDF9"}},{"id":"08f93d0a-768d-4463-a934-0e2aff2dad6f","topic":"缺点：执行指令速度慢，CPU任何时刻只有一条指令在执行，部件利用率很低","expanded":true,"style":{"background":"#FF9595"}}]}]},{"id":"b8025369-6ba8-4c10-89d8-1d3af3a02f94","topic":"流水线方式：","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"2a2e8043-694e-4f08-a1de-1f6e4c2eef1f","topic":"一次重叠：","expanded":true,"children":[{"id":"04f3bceb-8726-4575-86c2-ee5592ced526","topic":"图示","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-7212de0d5ba874.png","width":426.62,"height":98.26},"children":[{"id":"9f6f6232-c4ec-42c7-ac37-1c12124d5a57","topic":"优点：","expanded":true,"children":[{"id":"c5fa1341-6551-485e-989c-47a833c75fe7","topic":"程序的执行时间缩短了1/3， 各功能部件的利用率明显提高。","expanded":true}]},{"id":"6f512cdf-99ed-4571-8960-6db271feee03","topic":"缺点：","expanded":true,"children":[{"id":"aa46fc04-22f1-4bdf-8ed7-ae9a10d13a91","topic":"需要付出硬件上较大开销的代价，控制过程也比顺序执行复杂了。","expanded":true}]}]}]},{"id":"55f661b1-9ffe-474a-9490-3e914fbba256","topic":"两次重叠：","expanded":true,"children":[{"id":"5671dd62-6053-4bb7-b87c-1d1fee83846f","topic":"图示","expanded":true,"style":{"background":"#FDD834"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-f8544109df1843.png","width":416.94,"height":123.8},"children":[{"id":"16946fcf-1aaa-497d-ba2b-90a7b3df5776","topic":"与顺序执行方式相比，指令的执 行时间缩短近2/3。这是一种理想的指令执行方式，在正常情况下， 处理机中同时有3条指令在执行。","expanded":true,"style":{"background":"#FDD834"}}]}]}]}]},{"id":"00e8fce7-d34c-4c35-825d-e72cb275589f","topic":"指令流水线\n的表示方式","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"51852eae-8185-4d65-9efc-5abbeeb724b1","topic":"执行过程图、时空图","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"758c536c-1b8b-40f5-b0e5-39f468c739c1","topic":"指令执行过程图","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-20ce4fe359283f.png","width":380.65,"height":140.05},"children":[{"id":"0c54315a-3e1a-45e3-8d8f-16f4f8366131","topic":"时空图","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-cb5b90a9b42d03.png","width":400.76,"height":149.41}}]}]}]},{"id":"7faca2a9-aa00-4be1-939a-1316c4dcd7be","topic":"流水线的性能指标","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"140c0137-f188-418e-96c1-9cde5b904c1b","topic":"图示","expanded":true,"style":{"background":"#8EDE99"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-52ee6586b9db28.png","width":579.42,"height":249.34}},{"id":"129cf5ba-7748-4e5f-bda7-d015e0a630e1","topic":"装入时间 & 排空时间","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"94488aa5-2bd0-42e9-8f57-383e33c67fdb","topic":"例上图：前4个Δt是装入时间，后四个Δt是排空时间","expanded":true}]},{"id":"0129d166-c08f-4ba3-b65e-3ac8ac0bba4b","topic":"吞吐率：","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"5be77aba-66ad-4014-9c78-c0c8f245eb8c","topic":"单位时间内完成的任务的数量：TP = n / Tk","expanded":true,"children":[{"id":"fcef6546-b410-425a-9439-9c4fde7b0eb2","topic":"TP吞吐率、n 完成任务数、Tk 时间","expanded":true},{"id":"a25feda1-36a0-4582-a463-b306b12d8858","topic":"流水线吞吐率","expanded":true,"formula":{"tex":"TP = \\frac{n}{(k + n - 1)\\Delta t}","displayMode":true,"mathml":"<span class=\"katex\"><math xmlns=\"http://www.w3.org/1998/Math/MathML\" display=\"block\"><semantics><mrow><mi>T</mi><mi>P</mi><mo>=</mo><mfrac><mi>n</mi><mrow><mo stretchy=\"false\">(</mo><mi>k</mi><mo>+</mo><mi>n</mi><mo>−</mo><mn>1</mn><mo stretchy=\"false\">)</mo><mi mathvariant=\"normal\">Δ</mi><mi>t</mi></mrow></mfrac></mrow><annotation encoding=\"application/x-tex\">TP = \\frac{n}{(k + n - 1)\\Delta t}</annotation></semantics></math></span>"}},{"id":"1abbccd0-ec36-475c-b916-1d8f8b976764","topic":"一般取Δt为一个时钟周期 ---> 即一个节拍能完成一个机器周期的所有微操作","expanded":true}]}]},{"id":"838cfbbd-a59f-470b-b2f8-664a285446f7","topic":"加速比：","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"48f6ecb7-c4c5-47e5-b72e-fe264cd0ad1b","topic":"不使用流水线的时间 T ➗ 使用流水线的时间 T","expanded":true,"children":[{"id":"f1f92ebf-c202-48e0-88e1-6b8153cae8e2","topic":"流水线加速比","expanded":true,"formula":{"tex":"\\frac{k * n * \\Delta t}{(k + n - 1) * \\Delta t}","displayMode":true,"mathml":"<span class=\"katex\"><math xmlns=\"http://www.w3.org/1998/Math/MathML\" display=\"block\"><semantics><mrow><mfrac><mrow><mi>k</mi><mo>∗</mo><mi>n</mi><mo>∗</mo><mi mathvariant=\"normal\">Δ</mi><mi>t</mi></mrow><mrow><mo stretchy=\"false\">(</mo><mi>k</mi><mo>+</mo><mi>n</mi><mo>−</mo><mn>1</mn><mo stretchy=\"false\">)</mo><mo>∗</mo><mi mathvariant=\"normal\">Δ</mi><mi>t</mi></mrow></mfrac></mrow><annotation encoding=\"application/x-tex\">\\frac{k * n * \\Delta t}{(k + n - 1) * \\Delta t}</annotation></semantics></math></span>"}}]}]},{"id":"01a44f42-c088-4baf-91e2-a5e8f619e8f6","topic":"流水线的效率：","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"ac5610c2-fe49-4140-a5ff-40cefe08ef0d","topic":"1 - 红色区域面积 ➗ 蓝色区域面积","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-dedb06a4e81609.png","width":548.83,"height":228.42},"children":[{"id":"4452c6b7-4753-48cc-800a-edbb1cda1bd7","topic":"流水线效率","expanded":true,"formula":{"tex":"1 - \\frac{k(k - 1)\\Delta t}{k(k + n - 1)\\Delta t} = \\frac{k n \\Delta t}{k(k + n - 1)\\Delta t}","displayMode":true,"mathml":"<span class=\"katex\"><math xmlns=\"http://www.w3.org/1998/Math/MathML\" display=\"block\"><semantics><mrow><mn>1</mn><mo>−</mo><mfrac><mrow><mi>k</mi><mo stretchy=\"false\">(</mo><mi>k</mi><mo>−</mo><mn>1</mn><mo stretchy=\"false\">)</mo><mi mathvariant=\"normal\">Δ</mi><mi>t</mi></mrow><mrow><mi>k</mi><mo stretchy=\"false\">(</mo><mi>k</mi><mo>+</mo><mi>n</mi><mo>−</mo><mn>1</mn><mo stretchy=\"false\">)</mo><mi mathvariant=\"normal\">Δ</mi><mi>t</mi></mrow></mfrac><mo>=</mo><mfrac><mrow><mi>k</mi><mi>n</mi><mi mathvariant=\"normal\">Δ</mi><mi>t</mi></mrow><mrow><mi>k</mi><mo stretchy=\"false\">(</mo><mi>k</mi><mo>+</mo><mi>n</mi><mo>−</mo><mn>1</mn><mo stretchy=\"false\">)</mo><mi mathvariant=\"normal\">Δ</mi><mi>t</mi></mrow></mfrac></mrow><annotation encoding=\"application/x-tex\">1 - \\frac{k(k - 1)\\Delta t}{k(k + n - 1)\\Delta t} = \\frac{k n \\Delta t}{k(k + n - 1)\\Delta t}</annotation></semantics></math></span>"}}]}]}]},{"id":"1f8b58b2-ef2a-41c3-9946-64fe07f62568","topic":"-------------------------------------------------分隔符----------------------------------------------------","expanded":true,"style":{"color":"#EEEEEE","background":"#7986CB"}},{"id":"2ca67b2c-344e-43c5-9c54-45c02871cdfd","topic":"指令流水线\n的影响因素","expanded":true,"children":[{"id":"a7d1ab90-5a0e-4c84-938e-afd885dfd4f8","topic":"机器周期分段：","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"11c00852-c815-4ba9-b8ad-1b8c513a99db","topic":"FE 取指 -> ID 译码 -> EX 执行 -> M 访存 -> WB 写回","expanded":true,"style":{"background":"#8EDE99"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-2bc1f3c4cec0c6.png","width":551.97,"height":232.43},"children":[{"id":"e59e9f2e-2673-4591-a3d6-44e1e3b4e24c","topic":"五段式流水线","expanded":true},{"id":"8242789b-c89a-4f94-9615-925beb255774","topic":"MIPS架构(RISC)的经典模型","expanded":true},{"id":"ce54077b-7ecb-4b81-bdff-e72a35462392","topic":"每个阶段的时间设置为一样，以最长的时间看齐，所以每个阶段的末尾都添加了【锁存器】，用来存储产生的结果，以确保可以准时发出","expanded":true}]},{"id":"c2944351-0547-4418-a619-885e4d65bdb9","topic":"Cache分为：","expanded":true,"children":[{"id":"06421cee-1c95-4a5f-82f9-973b7da34505","topic":"指令Cache","expanded":true},{"id":"d1979d5a-4e9c-4049-990b-8150e57b7223","topic":"数据Cache","expanded":true}]},{"id":"3c64655e-96c2-4271-ba1e-8dc588600812","topic":"各阶段含义：","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"3d8cc172-b610-4249-b1f7-dd160b8ef986","topic":"FE 取指阶段","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"46263a94-2085-4d82-a0b0-1daebbb25605","topic":"访问指令Cache，把指令存到锁存","expanded":true},{"id":"d1b8d3ee-7ed2-404c-a7b1-6eacef830872","topic":"如果存在立即数，就把立即数放入到 Imm 锁存器中","expanded":true}]},{"id":"ee216b20-93cf-40dd-a513-760fc66f3342","topic":"ID 译码阶段","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"d77f92aa-f5cf-4dc2-a0cc-eb7cbae4a260","topic":"把操作数从寄存器组中取出，放入到AB锁存器中","expanded":true,"children":[{"id":"c90a22d0-f88c-43b9-b9e2-a9221f30628e","topic":"在RISC中所有的指令操作数都只来自于寄存器","expanded":true}]}]},{"id":"43a01c5f-32de-47fd-9f84-8c7f1f884745","topic":"EX 执行阶段","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"d8b969f2-9266-4a37-87e3-f1107e5f06ba","topic":"在ALU中进行运算，把运行结果然后到锁存器","expanded":true}]},{"id":"99c46efd-450a-4d07-a14a-a5992571b7ad","topic":"M 访存阶段","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"99b38216-ecee-459a-9882-adc14e3f9728","topic":"把运行结果写入到数据Cache中","expanded":true}]},{"id":"bbdc93aa-50d1-49c4-a7a8-a42caf8772ac","topic":"WB 写回阶段","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"186a09ba-e1c2-4771-b4bd-5a89b93ccf6a","topic":"把运行结果写回到寄存器中","expanded":true}]}]}]},{"id":"f1eb858e-5f19-40c9-b6f9-6dcc1eae61c5","topic":"流水线冲突：","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"16a9207a-a725-41f5-81cc-ca281c1c9a22","topic":"资源冲突（结构相关）","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"7e396d1e-cab6-40d8-a013-93c3deac428b","topic":"类比OS的互斥","expanded":true},{"id":"935c385d-9afa-4b58-96de-4ed3a3e51fc4","topic":"图示","expanded":true,"style":{"background":"#8EDDF9"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-bc009f5828fd47.png","width":478.87,"height":262.88},"children":[{"id":"f577ed29-d135-4645-9451-58e370650ef0","topic":"IF的Mem和M的Mem的访问冲突了","expanded":true},{"id":"ad52b055-975f-401d-86f1-409d12cbeffd","topic":"解决办法","expanded":true,"children":[{"id":"725bddb9-282e-4cb0-9738-fbd656e538c5","topic":"1. 相关指令暂停一个周期","expanded":true,"style":{"background":"#8EDDF9"}},{"id":"1e1b9155-0232-4af1-aeb4-991f7f9cc40b","topic":"2. 重复配置资源：例如Mem分为Im和Dm","expanded":true,"style":{"background":"#FDD834"}}]}]}]},{"id":"0068528b-13fa-43a2-bff4-4721ba3f48c0","topic":"数据冲突（数据冲突）","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"f2b9333d-483e-4eb6-bbaa-293f5c23a092","topic":"类比OS的同步","expanded":true,"children":[{"id":"02aafd67-174f-444d-bdf6-a688e57a3527","topic":"最常考的部分","expanded":true,"style":{"background":"#FDD834"}}]},{"id":"5f0f8262-9963-4919-a594-fbf92ca46798","topic":"图示","expanded":true,"style":{"background":"#FDD834"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-accc0de673b296.png","width":485.67,"height":237.02},"children":[{"id":"16a372f5-c3c8-43eb-b5ef-f31928f37d04","topic":"同一个Reg没有按照要求的顺序修改数据","expanded":true},{"id":"b6e824c1-7500-40de-8e85-43c69188710d","topic":"解决办法","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"1e453de8-ba65-4d49-a432-c54b7326de9f","topic":"1. 硬件阻塞 (stall)，插入气泡","expanded":true,"style":{"background":"#FF9595"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-12dbd8eb7a2311.png","width":417.97,"height":206.47},"children":[{"id":"92c85d41-a2f7-4f39-afbe-94fa6d83c1e4","topic":"2. 软件插入(NOP)，插入空指令","expanded":true,"style":{"background":"#FF9595"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-b3bc887e70b34f.png","width":427.17,"height":209.9}}]},{"id":"11947d27-7217-49f2-96fc-b9f5cce5cac9","topic":"3. 数据旁路技术，把ALU的输出端和输入端相接，这样在执行阶段后就可以直接使用上次的运算结果了","expanded":true,"style":{"background":"#FF9595"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-e944c738bac816.png","width":415.05,"height":206.5},"children":[{"id":"de9042ae-58c8-4174-99f3-2dce59a6d716","topic":"4. 编译优化，编译器来优化，效果好、难度大。例如后面有一些不需要r1结果的指令，可以提前来运行。","expanded":true,"style":{"background":"#FF9595"}}]}]}]}]},{"id":"940fbcc7-8539-417a-9081-40b39fcebb1f","topic":"控制冲突（控制冲突）","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"f027d177-6f35-4648-aa95-fbf06996fa14","topic":"因为转移指令或其他改变PC值的指令而导致断流","expanded":true,"style":{"background":"#8EDE99"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-746f539b71222d.png","width":428.83,"height":204.44},"children":[{"id":"9fe1d2aa-41bd-4a25-81bf-8ea0320e23ad","topic":"PC转移指令的\n解决办法","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"fcaa9e30-7366-4785-8f8a-dfcf8c0e8751","topic":"1. 转移指令预测","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"328a21ab-4ba3-4463-a4a0-d6791fa4488a","topic":"每次转移指令来的时候都预测一次到底是否会执行。分为简单预测（无脑猜true & false），动态预测（根据历史情况预测）","expanded":true}]},{"id":"6c0d2554-ca82-4983-a3ff-b82eb618d9df","topic":"2. 预测成功和不成功两个方向上的指令","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"c6079c5b-cffe-4801-b7ed-e0b541fdf169","topic":"需要硬件的支持","expanded":true}]},{"id":"f8bd5bb7-a5c5-4a70-aaec-f7fd0fe6bce4","topic":"3. 提前加快指令码的形成","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"c750439c-ef7d-451e-a7ff-aeafdb45e8e3","topic":"需要硬件的支持","expanded":true}]},{"id":"3d948a07-2353-4933-b125-96147d9f1d46","topic":"4. 提高猜测的猜准率","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"0f0b3d7e-1672-405d-93e7-b4c7411263a5","topic":"优化法 1","expanded":true}]}]}]}]}]}]},{"id":"70de3845-f52f-48a1-9be7-b3e08ef68bfa","topic":"举例说明五种类型指令：","expanded":true,"children":[{"id":"4a0d101a-746f-4b11-ab39-7adf983d6e5f","topic":"运算类指令","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"1acc0b31-5b52-4b07-a2cc-2f147ac651fa","topic":"① IF取指 ② ID译码&取值 ③ EX 执行 ④ 空过  ⑤ WB 写回寄存器","expanded":true,"style":{"background":"#8EDDF9"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-69ac71d199fc0f.png","width":625.75,"height":256.35},"children":[{"id":"de082f61-47a7-4254-9adf-f1a56aa65517","topic":"运算类指令：","expanded":true,"children":[{"id":"576fd4d3-2ffc-4e5f-a28e-01cc5bc2dc93","topic":"IF：根据PC从指令Cache中取指令到IF段的锁存器中","expanded":true,"style":{"background":"#FF9595"}},{"id":"62917326-45fa-43c4-80e7-91d88bad9dd5","topic":"ID：取IF中的op操作数到ID段锁存器","expanded":true,"style":{"background":"#FF9595"}},{"id":"8e1aaf25-d0cf-4cb5-bc2c-1625c7b7678e","topic":"EX：运算，结果放入EX锁存器","expanded":true,"style":{"background":"#FF9595"}},{"id":"31683fe5-c4cc-448e-8c9a-af34327908aa","topic":"M：空段","expanded":true,"style":{"background":"#8EDDF9"}},{"id":"3e9a0032-7b45-4c0a-95c9-1e203ed14e62","topic":"WB：将运算结果写回指定的寄存器","expanded":true,"style":{"background":"#FF9595"}}]},{"id":"4dcec23e-4062-421c-aef9-600955f0161c","topic":"Rs是源操作数，Rd是目的操作数","expanded":true,"style":{"background":"#FDD834"}},{"id":"e1a225e0-a4b4-4b4e-a910-3e3fa5670edd","topic":"指令举例","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"97988ddf-21f8-44ca-b9b6-b1f9411a6538","topic":"ADD Rs, Rd","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"700ba369-593f-467c-a107-a0656b5fe2fa","topic":"(Rs) + (Rd) → Rd","expanded":true}]},{"id":"23d32ec9-cae8-40d6-a16a-b674a618e573","topic":"ADD #996, Rd","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"d30cab1c-2a4c-4d8c-814e-248771f71027","topic":"996 + (Rd) → Rd","expanded":true}]},{"id":"1d8540ed-8dc4-4e2b-98da-953897310079","topic":"SHL Rd","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"22bb327f-717c-4800-bd15-615da3134750","topic":"(Rd) <<< 2 → Rd","expanded":true}]}]},{"id":"8094e5d1-f7c7-4c41-8089-a98a37918eb8","topic":"RISC运算只有Reg参与，没有M阶段","expanded":true,"style":{"background":"#FFABD5"}}]}]},{"id":"b522da3c-8eda-4f4a-ba23-ba0e7823b951","topic":"LOAD指令","expanded":true,"children":[{"id":"e3b0d08a-f83d-42ff-8155-4cb066c103c9","topic":"① IF取指 ② ID译码&取值 ③ EX 执行 ④ M 访存  ⑤ WB 写回寄存器","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-2bc1f3c4cec0c6.png","width":634.23,"height":267.07},"children":[{"id":"92f7a294-60ed-4d10-803f-cd2a4d943694","topic":"LOAD指令：","expanded":true,"children":[{"id":"b32d96d2-0fe2-4046-baef-5e598733f968","topic":"IF：根据PC从指令Cache中取指令到IF段的锁存器中","expanded":true,"style":{"background":"#FF9595"}},{"id":"9dbe1346-fa06-452b-9d55-03e75f05a007","topic":"ID：将BR基址寄存器的值放到A，将偏移量放到Imm","expanded":true,"style":{"background":"#FDD834"}},{"id":"d50a9c86-546a-4335-8acc-c55012788210","topic":"EX：运算，得到有效的地址 A + Imm","expanded":true,"style":{"background":"#FDD834"}},{"id":"803ba56f-ce73-426f-bb05-f90e49b6c26a","topic":"M：从数据Cache中取数据，放到锁存器","expanded":true,"style":{"background":"#FF9595"}},{"id":"1df25817-aa33-4ee3-b097-bfb1d0b921b1","topic":"WB：将运算结果写回指定的寄存器","expanded":true,"style":{"background":"#FF9595"}}]},{"id":"65be98c0-77d4-4152-af89-253f83c9a122","topic":"指令举例","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"2f0b66d4-bf77-4dde-b9a8-0a1503c96ad9","topic":"LOAD Rd, 996(Rs)","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"26afab40-09f6-4976-9235-185dd5fb9589","topic":"(996+(Rs)) → Rd","expanded":true}]},{"id":"85b1906c-9c58-4256-bb92-98a1afd84b97","topic":"LOAD Rd, mem","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"250fcdb2-f915-4682-a745-1770470ea0d0","topic":"(mem) → Rd","expanded":true}]}]},{"id":"c755ac95-ea54-45fa-bbf9-5fc34920ffaf","topic":"RISC处理器中只有“LOAD”和“STORE”指令才能访问主存","expanded":true,"style":{"background":"#FFABD5"}}]}]},{"id":"de6daaaa-5639-4c09-a030-6f06acb96be6","topic":"STORE指令","expanded":true,"children":[{"id":"3c11a529-dc2f-4084-8afd-3dcbb617fe08","topic":"① IF取指 ② ID译码&取值 ③ EX 执行 ④ M 访存  ⑤ 空段","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-8641c2fe540b84.png","width":625.24,"height":260.03},"children":[{"id":"1ae1ea0d-17c2-4398-bdac-8090ef6f95ef","topic":"STORE指令：","expanded":true,"children":[{"id":"b0670696-9782-44ab-b020-143974dbf9a5","topic":"IF：根据PC从指令Cache中取指令到IF段的锁存器中","expanded":true,"style":{"background":"#FF9595"}},{"id":"1c9dce57-2c22-4979-9d2e-4dd9b105de2c","topic":"ID：将BR基址寄存器的值放到A，将偏移量放到Imm，将要存的数放到B","expanded":true,"style":{"background":"#FDD834"}},{"id":"f22ad337-ac4b-4d86-8a8c-edbb15e54444","topic":"EX：运算，得到有效的地址 A + Imm，把B的值放进去","expanded":true,"style":{"background":"#FDD834"}},{"id":"9b6c9eeb-37c8-4896-872b-4d94780e2b25","topic":"M：从数据Cache中取数据，放到锁存器","expanded":true,"style":{"background":"#FF9595"}},{"id":"c3bd1e2d-df67-4c44-abdb-68a88175bc63","topic":"WB：空段","expanded":true,"style":{"background":"#8EDDF9"}}]},{"id":"890f1f37-adc7-4d7e-bb4d-2f8355da8c42","topic":"指令举例","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"d4f2a1d9-927d-4823-b5f3-9204da24aebe","topic":"STORE Rs, 996(Rd)","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"b67855c0-7d9c-4e6e-9873-39fa64c0c91e","topic":"Rs → (996+(Rd))","expanded":true}]},{"id":"6d86651d-4448-4763-8c15-fac946c4a418","topic":"STORE Rs, mem","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"a1b74a2d-3671-4b38-b458-9fdbf49380fc","topic":"Rs → (mem)","expanded":true}]}]}]}]},{"id":"ab128204-bda8-4458-b1c7-5844ffb63741","topic":"BRANCH指令","expanded":true,"children":[{"id":"a81a6885-f33d-408d-bcd3-e9a982d458ef","topic":"① IF取指 ② ID译码&取值 ③ EX 执行 ④ M/WrPC（目标PC值写回PC）  ⑤ 空段","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-a7eacfa51c0fa1.png","width":621.49,"height":279.91},"children":[{"id":"83cc041a-ead1-405b-931f-ab686d7994a8","topic":"转移类指令：通常采用相对寻址","expanded":true,"style":{"background":"#8EDDF9"}},{"id":"fc5701d4-4161-4fd1-be84-eab9204d4165","topic":"BRANCH指令：","expanded":true,"children":[{"id":"91e5055f-22e6-430e-b42d-e0c98b3d2ac9","topic":"IF：根据PC从指令Cache中取指令到IF段的锁存器中","expanded":true,"style":{"background":"#FF9595"}},{"id":"87514f86-5c0a-4008-9f31-fb11ea9bba3f","topic":"ID：将需要比较的两个数放到锁存器A，B；偏移量放入到Imm","expanded":true,"style":{"background":"#FDD834"}},{"id":"e53648fa-ffeb-4f68-a2be-c1a5f25cce6e","topic":"EX：运算，比较两个数","expanded":true,"style":{"background":"#FDD834"}},{"id":"57f7e22e-5557-417e-a943-cc3e4b5cfffe","topic":"M：将目标PC值写回PC","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"3dca3f26-81e9-442c-a110-f290681c7828","topic":"也可以成为WrPC段，比M耗时短，安排在M段时间内完成","expanded":true,"style":{"background":"#FFABD5"}}]},{"id":"4b2d6e48-a3ab-4e02-aa91-1dd80f7cd498","topic":"WB：空段","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"fc8540fd-de34-4247-b60e-7f013435133d","topic":"WB阶段一般修改通用寄存器","expanded":true}]}]},{"id":"e45eed1e-c449-4a84-af99-b8b6dfb25252","topic":"偏移量：例如 beq Rs, Rt, #996 就是 \n【 (PC) + 4 + (996 * 4) -> PC 】","expanded":true},{"id":"4a49debe-9b29-4ae1-8eda-b6b77e0418fa","topic":"指令举例","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"f67b8c42-5268-4235-a337-e368050ecf7b","topic":"beq Rs, Rt, #off","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"928cac46-4928-43d9-9a57-9abaf2e17565","topic":"如果(Rs) == (Rt)，则(PC) + 指令字长 + (#off * 指令字长) → PC","expanded":true,"style":{"background":"#8EDE99"}},{"id":"a2e06ad2-8ac9-418b-974e-9f5f65acab0a","topic":"否则：(PC) + 指令字长 → PC","expanded":true}]},{"id":"99b7cfd1-982b-4cbe-a994-52c96ac29c4b","topic":"bne Rs, Rt, #off","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"a0b80117-7593-4522-9483-a838ca9e0878","topic":"如果(Rs) != (Rt)，则(PC) + 指令字长 + (#off * 指令字长) → PC","expanded":true,"style":{"background":"#8EDE99"}},{"id":"d9553612-ae8b-4f3e-b632-29f20679030e","topic":"否则：(PC) + 指令字长 → PC","expanded":true}]}]}]}]},{"id":"4e4ecaf7-8972-47b2-b127-8b441d1be4a0","topic":"JMP指令","expanded":true,"children":[{"id":"d034710b-fd7d-4059-8945-a3da53c107a1","topic":"① IF取指 ② ID译码&取值 ③ EX/WrPC ④ 空段  ⑤ 空段","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-be026e4c1944c9.png","width":660.67,"height":313.47},"children":[{"id":"032d80a3-33e6-4546-ae2e-eaa19c530882","topic":"转移类指令：通常采用相对寻址","expanded":true,"style":{"background":"#8EDDF9"}},{"id":"a0f08d00-98c4-4c02-8c4d-7794510b86a6","topic":"把PC的操作安排在EX里面完成，WrPC","expanded":true,"children":[{"id":"6a99e775-b352-4f63-a394-33c5b5657a68","topic":"因为PC越早写入，越能够避免控制冲突","expanded":true}]},{"id":"31091fb7-e309-460f-a4f6-76e7b4b5360e","topic":"JMP指令：","expanded":true,"children":[{"id":"c2101aac-8a3c-4ee1-8745-879fe20b342a","topic":"IF：根据PC从指令Cache中取指令到IF段的锁存器中","expanded":true,"style":{"background":"#FF9595"}},{"id":"8746752e-0b1e-48f1-ae27-83bf58aba48c","topic":"ID：偏移量放入到Imm","expanded":true,"style":{"background":"#FDD834"}},{"id":"856819e4-63b4-47c2-8a76-8a9c085b6a34","topic":"EX：（计算PC值？）把PC值写回PC中","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"e9fe4479-f763-4780-94aa-5c328566382e","topic":"WrPC","expanded":true},{"id":"b5b4b3b0-adef-4f5b-a5b4-0055f464e1e5","topic":"咸鱼PPT中说不需要ALU，不用计算，这里存疑","expanded":true,"style":{"background":"#7986CB"}}]},{"id":"591c58a7-aec3-4f06-916b-1d34f81366e6","topic":"M：空段","expanded":true,"style":{"background":"#8EDDF9"}},{"id":"88d84134-cf3b-4e51-974f-f7b4cd98ab20","topic":"WB：空段","expanded":true,"style":{"background":"#8EDDF9"}}]},{"id":"f4643a29-a333-4944-848c-cb62084fad29","topic":"指令举例","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"e57f79ba-bad8-4eaf-92c5-7d11edcded47","topic":"jmp #off","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"53eac985-0689-48a0-8b21-5a50acd6a581","topic":"(PC) + 指令字长 + (#off * 指令字长) → PC","expanded":true,"style":{"background":"#8EDE99"}}]}]},{"id":"54fcdb85-8a81-486d-bb0c-8403ea9df5d3","topic":"WrPC段越早完成越能避免冲突，也可以在WB端修改PC","expanded":true,"style":{"background":"#FFABD5"}}]}]}]},{"id":"29c667d1-c1dd-470f-a584-c790fa3a83a5","topic":"指令流水线的分类","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"80060d47-e835-44a1-b680-3f6b5a26e0f9","topic":"根据流水线使用级别的不同","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"d2a2426e-d17a-4b0e-94ba-8645edf71664","topic":"【部件功能级】流水线","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"db52fb3d-db36-4fa9-a860-75660b097c22","topic":"把复杂的运算组成流水线","expanded":true},{"id":"99168909-bd89-46f3-bed8-de09d4940026","topic":"例如：ALU执行浮点的运算，可以把求阶差、对阶、尾数相加、结果规格化四个部分组装成流水线","expanded":true},{"id":"9e6aef65-5cea-432d-85b5-d782d0d46fac","topic":"更细一层","expanded":true,"icons":["emoji:💬"],"style":{"borderStyle":"dashed","borderColor":"#F59E0B"}}]},{"id":"6a8dee8c-d286-42b4-82e1-f8ccb5d72f1c","topic":"【处理机级】流水线","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"7e34def8-f0cc-47f8-b47e-6f1fc3174e39","topic":"把指令的执行组成流水线","expanded":true},{"id":"95652a01-cb4b-4af2-b138-a1c88404f602","topic":"例如：把指令的取值、分析、执行、访存、写回分为5个部分形成流水线","expanded":true},{"id":"158bf6d6-9017-476d-9966-e04760613fa3","topic":"【一个处理器中的不同部件】\n跑【一个指令不同阶段】","expanded":true,"icons":["emoji:💬"],"style":{"borderStyle":"dashed","borderColor":"#F59E0B"}}]},{"id":"4820e94a-945f-4c59-89d0-0505399daba4","topic":"【处理机间】流水线","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"04d4a609-3e66-46fe-b01d-7f6c254acc58","topic":"每个处理机完成某一类型的任务，然后把任务结果存在与下一个处理器共享的存储器中","expanded":true},{"id":"86c6d5f4-b2cf-4350-91c9-1b8394e1b798","topic":"【多个处理器】跑【一个任务】","expanded":true,"icons":["emoji:💬"],"style":{"borderStyle":"dashed","borderColor":"#F59E0B"}}]}]},{"id":"4103c4b2-9fbf-48d3-a5b6-d0466f416703","topic":"根据流水线完成的功能不同","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"c016427d-ce11-4f16-9971-8f7ac0efd192","topic":"单功能流水线","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"1cf1e629-2148-4047-bf85-94c5f4d17352","topic":"只能用于某个特定的任务：例如浮点运算流水线","expanded":true}]},{"id":"88cf2cea-d780-4bd3-b2ab-a8231c5933c1","topic":"多功能流水线","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"ec3c64a3-e22e-4e7a-928a-9f6bd2ae4afa","topic":"可以用于多个任务：例如指令流水线","expanded":true}]}]},{"id":"2fa04a65-a697-4d91-8309-a28761dcede3","topic":"动态&静态","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"2a687e91-87fa-4f01-9177-8b89bad27a3d","topic":"静态流水线","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"d6c6229f-e287-4ab1-8cc9-bab2e7929519","topic":"同一时间内，流水线的各段只能按同一种功能的连接方式工作","expanded":true}]},{"id":"3a6e0e12-6170-4b43-9ac3-6528e3403a67","topic":"动态流水线","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"00cc4c00-b445-4217-a040-214c7f4b5a3d","topic":"指在同一时间内，当某些段正在实现某种运算时，另一些段却正在进行另一种运算。","expanded":true,"children":[{"id":"4dc1c985-4f2b-4834-855f-fdc89eb4cf6c","topic":"这样对提高流水线的效率很有好处，但会使流水线控制变得很复杂。","expanded":true}]}]},{"id":"0f79ba6b-fa05-43b3-a379-99991a926b13","topic":"例子：动态 --- ALU又可以做除法又可以做加法","expanded":true}]},{"id":"2deb57c6-5cbc-444b-85dd-03113942b6b4","topic":"线性&非线性","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"95ef893a-c1b9-409e-93c0-b8e2b64096cd","topic":"线性流水线","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"799abec0-d446-49b3-aa5c-0ec4c8460de7","topic":"从输入到输出，每个功能段只允许经过一次，不存在反馈回路。","expanded":true}]},{"id":"10691f3b-9ead-44ab-9fcd-9ab996cf425a","topic":"非线性流水线","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"cc1659e7-f649-4c91-8c23-70ca4e00b7a6","topic":"存在反馈回路，从输入到输出过程中，某些功能段将数次通过流水线，这种流水线 适合进行线性递归的运算。","expanded":true}]},{"id":"8f1c3af1-a1c7-4729-a190-abbc5c4e09b0","topic":"例字：非线性 --- 只有加法指令的ALU，运行乘法需要多次EX，IF ID EX EX EX ...  EX M WB","expanded":true}]}]},{"id":"c8877ebd-3440-48bd-a531-e6f623d86a23","topic":"流水线的多发技术","expanded":true,"children":[{"id":"bd806124-5b64-4b6f-8d0c-88ddb84ccd2f","topic":"1. 超标量技术","expanded":true,"children":[{"id":"c6107d80-78c5-447f-b865-364d30198e57","topic":"图示","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-d6bd0743d11959.png","width":288.86,"height":196.63},"children":[{"id":"1a41d317-f581-4f34-9d33-e7e188695762","topic":"每个时钟周期内可并发多条独立指令，需要配置多个功能部件","expanded":true,"style":{"background":"#8EDDF9"}},{"id":"a4dfa097-0d68-4e8b-9fe0-9422b92ba41d","topic":"不能调整指令的执行顺序，通过编译优化技术，把可以并行执行的指令搭配起来","expanded":true},{"id":"92509e85-509b-4dde-bcda-d5def7eb3eaf","topic":"1. 多并发 --- 多个功能部件","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"d5695fa5-1b8e-468e-9481-aab14f6021ad","topic":"空分复用技术","expanded":true,"style":{"background":"#FDD834"}}]},{"id":"d8591588-d44f-4129-bca1-6d78ff1ec2e6","topic":"2. 编译优化需要判断那些可以并行","expanded":true,"style":{"background":"#FF9595"}}]}]},{"id":"30467e49-66b3-4a54-ae6e-9550aebb8234","topic":"2. 超流水技术","expanded":true,"children":[{"id":"c6198509-f98b-4c3d-a58a-d86580fc45f4","topic":"图示","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-300c29abc5c3de.png","width":377.67,"height":238.88},"children":[{"id":"843fbadb-6e7e-4048-a60b-93bab5ee510c","topic":"在一个时钟周期内再分段（3段）","expanded":true},{"id":"8498ae66-e5bb-47af-98f6-31086df7637a","topic":"在一个时钟周期内一个功能部件使用多次（3次）","expanded":true},{"id":"42b74a6f-1525-4949-b2fe-31a16d339f14","topic":"不能调整指令的执行顺序","expanded":true},{"id":"78e899c2-88ca-4b39-a8c8-833d7d05a6ec","topic":"靠编译程序解决优化问题","expanded":true},{"id":"5f781e03-f9e0-464f-947d-a14494140d58","topic":"时分复用技术","expanded":true,"style":{"background":"#FDD834"}},{"id":"ca36307e-5823-45ca-b55c-86b5f7e49f9d","topic":"和超标量差不多","expanded":true}]}]},{"id":"21b54c37-ef21-4f77-9b0a-5d3b757607a0","topic":"3. 超长指令字","expanded":true,"children":[{"id":"331a228c-78f2-4f4a-9979-b997802c4bd6","topic":"图示","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-84f5a2ded3360f.png","width":376.25,"height":281.08},"children":[{"id":"1a57e623-e272-4a6c-9fff-c48a58268256","topic":"由编译程序挖掘出指令间潜在的并行","expanded":true},{"id":"0f6195a3-6f9f-40ce-b2c9-a37b322da737","topic":"多条能并行操作的指令组合成一条","expanded":true},{"id":"8fcf5415-a938-4394-9932-cf8af57bcec2","topic":"具有多个操作码字段的超长指令字（可达几百位）","expanded":true},{"id":"dbea594c-620e-467d-89f5-525552f86bd9","topic":"多个处理部件","expanded":true},{"id":"30319561-52b1-43f2-8b64-2156e5dba328","topic":"编译程序去挖掘发现哪些指令可以合并在一起执行","expanded":true}]}]}]},{"id":"a3bb090a-7281-4be7-8578-55d6da9f3010","topic":"考频：高","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"d01aefde-234f-4b88-aa3e-edfac2cb0c24","topic":"09、10、13、16、17*2、18-20、12大、14大*2","expanded":true}]}]},{"id":"131a8764-772a-4170-ba43-fbb4787ec2e0","topic":"多处理器","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-fe91a14c9b1b58.svg","width":60,"height":60},"children":[{"id":"dd5caa5b-608d-429a-9448-70feab1f92bc","topic":"考频：低","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"5f0092ff-e755-41a6-ad8d-522273801b13","topic":"22","expanded":true}]},{"id":"695a42e1-0be7-4761-814e-b7bf77bd27f2","topic":"XIXD","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"e00ec13d-6227-4517-8301-bbf095d5ead2","topic":"SISD","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"d55cf2c8-d326-433f-93f9-022d2412bf90","topic":"传统串行计算机，一个CPU一个存储器。指令按顺序串行执行，一次性只能处理一条数据","expanded":true},{"id":"abb59135-8624-43b0-9504-e9f4e8299341","topic":"优化：","expanded":true,"children":[{"id":"598954a6-3eed-4919-ac13-0a5e40810e8c","topic":"使用指令流水线","expanded":true},{"id":"e905fa7b-52fa-43ad-8fda-8af46a832538","topic":"使用多个功能部件，采用多模块交叉存储","expanded":true}]}]},{"id":"0ea79ea4-de86-48b5-b278-a6781a49d2ce","topic":"SIMD","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"8d42f187-df86-4360-abc0-dcf90d9624bf","topic":"一个指令对多个数据流进行处理，一般为【数据级并行技术】。由一个指令控制部件，多个处理单元组成","expanded":true,"children":[{"id":"db033337-ed41-491e-a914-0f430665540f","topic":"例如一个CPU多个ALU","expanded":true}]},{"id":"73350542-6464-4e8f-94de-efb82bfd038a","topic":"特点：","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"d11864f4-79f1-43c2-8e88-620dd0ef1555","topic":"一条指令中的多个数据是存在不同的地址中的，那么该条指令的执行的数据运算可以并发进行","expanded":true,"style":{"background":"#FF9595"}}]},{"id":"f611522a-19ef-4cdc-aa21-0e90abcfc253","topic":"注意事项：","expanded":true,"style":{"background":"#FFABD5"},"children":[{"id":"7e62b0fb-fd50-4a05-85f6-9241ba3aa190","topic":"SIMD的MD是与数据有关的，即一个进程编译过后，可能在第1、2、4次运算是int加减，故只能使用SISD的模式。但是在第3次运算的时候是数组运算，可以使用SIMD的模式","expanded":true,"style":{"background":"#FFABD5"}}]},{"id":"a5b05523-1689-4c3f-93d4-a23d6648b92c","topic":"向量处理器","expanded":true,"children":[{"id":"17b15822-8918-462b-8279-69c4c857d500","topic":"是特殊的SIMD，既可以一次处理多个数据，又一次处理的数据是一个多维的向量","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-605083848f8950.png","width":617.21,"height":327.66},"children":[{"id":"26242f16-601b-4025-b015-1016241de504","topic":"eg: 向量处理机的LOAD指令，可以将一个向量取到向量寄存器中；加法指令，可以实现两个向量相加","expanded":true},{"id":"1c637b2e-c89f-43aa-970a-bdbcbf56a0e5","topic":"应用于：向量计算、大量浮点数计算，空气动力学、核物理学、巨型矩阵计算问题很多超级计算机如中国的“银河”就是向量处理器","expanded":true},{"id":"62ba7f3a-a3e8-42f5-be49-b177828d658b","topic":"要求：","expanded":true,"children":[{"id":"d0b77524-6d87-42f7-94f8-222810b2d412","topic":"1. 有多个向量处理器","expanded":true},{"id":"59da1fb4-a5cd-4fac-841e-c309b2edf5bc","topic":"2. 主存是”多端口“交叉存储器","expanded":true},{"id":"0efe9a5a-13b1-46d1-80b7-a6118bb9ddfd","topic":"3. 主存要大容量，集中式最好","expanded":true}]}]}]},{"id":"bac2ba66-3036-4f0f-b0a1-de9c513df0d8","topic":"数据级并行","expanded":true,"icons":["emoji:💬"],"style":{"background":"#19A719","borderStyle":"dashed","borderColor":"#F59E0B"}}]},{"id":"d9969a8a-5e5a-4d0e-9cdd-f8b276ca7417","topic":"MISD","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"5fd66f86-72d9-4057-ba36-b70f9912b764","topic":"不存在","expanded":true}]},{"id":"82109e02-7356-4179-8f86-252d5c78692a","topic":"MIMD","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"f4234c5d-4f0d-41bb-aabe-65c3c0d78544","topic":"多计算机系统","expanded":true,"children":[{"id":"6fa1119e-9dbe-4051-836c-82bc64bd22a9","topic":"每个计算机拥有各自私有的存储器，有独立的主存空间，计算机之间只能够通过消息传递进行通信","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-05d576ac246c8f.png","width":481.52,"height":428.67}}]},{"id":"03b13b8a-09cb-4785-8c1c-c1ba847adb6d","topic":"多核处理器系统","expanded":true,"children":[{"id":"eb86d559-d32e-42da-a7a4-e0f2d11f1c67","topic":"图示","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-694aad8782e600.png","width":502.14,"height":247.83},"children":[{"id":"dcf9c0ab-5a05-4b22-b1c9-0237c2d89613","topic":"SMP（对称多处理）系统，具有共享的单一地址空间，存取指令可以访问系统中的所有存储器","expanded":true},{"id":"c5c34cd8-f177-4a9c-a887-7bca4e7395d3","topic":"Cache的分配","expanded":true,"children":[{"id":"bf820740-06d9-4904-b7bb-731a24cfe8f6","topic":"例如有三级Cache，则每个核有自己的一级和二级Cache，三个核共享同一个三级Cache","expanded":true}]}]}]},{"id":"c7c38e06-3bcd-44f5-bbb0-7678161a7534","topic":"线程级或线程级以上并行","expanded":true,"icons":["emoji:💬"],"style":{"background":"#19A719","borderStyle":"dashed","borderColor":"#F59E0B"}}]}]},{"id":"6eafd2e6-fb85-40be-9128-d58180aed5db","topic":"硬件多线程","expanded":true,"children":[{"id":"34a3a2d5-dd98-4cdc-8ddc-78230fe3fb00","topic":"细粒度","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"80a6995e-c510-40c2-a964-2d8451bf1191","topic":"多个线程轮流交叉执行指令","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"c4e77a30-8ac4-4a2f-91f3-b1258761097c","topic":"图示","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-27cb5c2a4f8fa3.png","width":892,"height":810}}]},{"id":"b6f6b320-4c4b-4385-8096-9e3ced489647","topic":"指令级并行","expanded":true,"icons":["emoji:💬"],"style":{"borderStyle":"dashed","borderColor":"#F59E0B"}}]},{"id":"e3da3c55-fa64-4032-b994-37c8bc4ee8e6","topic":"粗粒度","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"90897ad1-ede2-4233-b9e1-749a2a89df24","topic":"只有一个进程进行较大阻塞的时候才切换进","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"a3abe700-97f0-4f41-b2c2-b7835a1f0898","topic":"图示","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-3230655c455edc.png","width":267.34,"height":266.23}}]},{"id":"e463a5ba-237a-453b-a057-302edc2fd562","topic":"指令级并行","expanded":true,"icons":["emoji:💬"],"style":{"borderStyle":"dashed","borderColor":"#F59E0B"}}]},{"id":"cba61fd1-2f49-422e-98db-a2f339853b32","topic":"同时","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"d556bc04-7395-4f0b-9e57-c2f4d2aa3d2a","topic":"单核处理器有多个功能部件、寄存器组、指令发射槽","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"a8b54681-2414-44dc-8147-383b2653b16b","topic":"处理器","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-b061bc8f423872.png","width":404.14,"height":219.01}},{"id":"e1a0b583-2790-4762-a122-be4a43e2419a","topic":"可以同时发多条，三种硬件多线程方式的调度示例","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-f5476c6af5eb51.png","width":396.59,"height":175.09}}]},{"id":"652cd65e-a836-474d-867b-64011fdb2841","topic":"线程级并行","expanded":true,"icons":["emoji:💬"],"style":{"borderStyle":"dashed","borderColor":"#F59E0B"}}]},{"id":"6b860d57-d2de-4950-91d0-50d3442bd199","topic":"单核","expanded":true,"icons":["emoji:💬"],"style":{"borderStyle":"dashed","borderColor":"#F59E0B"}}]},{"id":"61489589-3b0d-4351-8622-cf668676b9d3","topic":"多核/多处理器","expanded":true,"children":[{"id":"31cd826c-bbc8-41d6-a0ea-14c6a665216b","topic":"多处理器：","expanded":true,"children":[{"id":"cdf3e343-0c39-48b6-8e8c-f45783722af7","topic":"有多个CPU，每个CPU一个处理单元来运作","expanded":true},{"id":"599b9026-32e6-4035-a93c-b4f49bbb371d","topic":"多处理器的分类","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"e3db18ec-bfbf-468e-8499-d852373bb9c4","topic":"第一类：UMA统一存储访问","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"3b8a8fed-1b6c-49e0-9427-a0c546a6d56d","topic":"共享同一份内存，每个处理器访存所有存储单元的速度大致相同","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-5385144c91f7ca.png","width":432.06,"height":336.65},"children":[{"id":"1324babd-4eeb-4f37-b28e-a502df475387","topic":"SMP、UMA、NUMA拓展","expanded":true,"hyperlink":"https://blog.csdn.net/weixin_42319496/article/details/125940807"},{"id":"2100a4bb-a2cb-4572-9b6b-d296b7c287b6","topic":"UMA需要考虑Cache一致性的问题","expanded":true,"style":{"background":"#FFABD5"}},{"id":"d6e91cb9-3bb7-4b22-93fe-21524272d459","topic":"统一存储访问（UMA）多处理器：根据处理器与共享存储器之间的链接方式，分为基 于总线、基于交叉开关网络和基于多级交换网络连接等几种处理器。","expanded":true,"style":{"background":"#FFABD5"}}]},{"id":"fb09c12f-0685-40a9-a9f5-b425d1c76af9","topic":"SMP","expanded":true,"icons":["emoji:💬"],"style":{"borderStyle":"dashed","borderColor":"#F59E0B"}}]},{"id":"2a90a826-a243-4046-878a-f5270de18f2c","topic":"第二类：NUMA非统一存储访问","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"99e916ea-135b-4873-a5b5-5674f8456ee0","topic":"拥有自己的不同内存。会有特定几个处理器访存存储单元的速度更快","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-b687a55334a348.png","width":539.99,"height":337.69},"children":[{"id":"a1a9ee4f-e301-49ff-a975-c779d63e98e9","topic":"NUMA理论上是可以无限扩展的","expanded":true},{"id":"ef9d300b-358e-4d24-8fc4-6cb17b86e362","topic":"非统一存储访问 （NUMA）多处理器：处理器中不带高速缓存时，被称为 NC-NUMA; 处理器中带有一致性高速缓存时，被称为 CC-NUMA。","expanded":true,"style":{"background":"#FFABD5"}}]},{"id":"1a88291f-3656-4f76-bc38-2bc052a8cf0f","topic":"ASMP","expanded":true,"icons":["emoji:💬"],"style":{"borderStyle":"dashed","borderColor":"#F59E0B"}}]}]},{"id":"91d588c3-cb63-4750-85e5-c1c9b7ba1e76","topic":"自旋锁：","expanded":true,"style":{"background":"#BA69C8"},"children":[{"id":"a8749a5e-74a3-4236-a776-d70d11d629e7","topic":"SMP的多个处理器可能同时访问一个共享变量","expanded":true,"style":{"background":"#BA69C8"}},{"id":"3480d5f0-88f3-43fa-904f-913368469545","topic":"所以要使用自旋锁来进行互斥访问","expanded":true,"style":{"background":"#BA69C8"}}]}]},{"id":"a5974c0d-21c3-4819-92c0-32db523af7f9","topic":"多核处理器：","expanded":true,"children":[{"id":"5a6f4edd-e2db-4c84-89bd-17e80744a82d","topic":"一个CPU中集成了多个处理单元（核）","expanded":true},{"id":"fe6e26cc-889d-4705-8da2-87c6c26d397e","topic":"不共享Cache","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-92d92d2e5414f4.png","width":307.51,"height":274.61},"children":[{"id":"7f40a82a-e300-45ce-a38e-98f4cfb48605","topic":"比较","expanded":true,"children":[{"id":"8a045153-1414-4d81-90b1-9309a6b56f2b","topic":"共享Cache","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-694aad8782e600.png","width":556.56,"height":274.69}}]}]}]}]}]},{"id":"e5e20078-6ee0-442b-b171-72220bdc27ad","topic":"END","expanded":true}]},"relations":[{"id":"37bdd204-6d1c-4d17-995b-b8f0ec5cf265","from":"34979da9-0d7a-4906-91ff-6ddd8a3c87ee","to":"9b447c66-5bbc-4904-ae59-29fc8e525481","bidirectional":false,"label":"取出并执行一条指令的时间\n就是【一个】指令周期"},{"id":"cc90f299-f37b-4281-ae1c-f58e46a9e3b1","from":"9b447c66-5bbc-4904-ae59-29fc8e525481","to":"51af1c44-2997-43ef-93fd-9e2778d2c6db","bidirectional":false,"label":"一个指令周期内\n有【多个】机器周期"},{"id":"48a9b416-3fd8-48ea-8676-11ae053aa12e","from":"51af1c44-2997-43ef-93fd-9e2778d2c6db","to":"af3513cf-1a83-4f05-9c9b-a8e721814b9e","bidirectional":false,"label":"一个机器周期内有\n【多个】时钟节拍"},{"id":"93f2ef7a-4883-4402-ab4a-ecfb0c25dd42","from":"412a898e-604f-44a7-823d-2ee8fb5c4464","to":"5637021c-fe65-4b3f-9cf6-287fae886893","bidirectional":true},{"id":"0b34fb1f-b528-4c3d-8719-7671dffe1bb5","from":"5e6f1330-4a12-4e9c-8fa2-50ace264feb0","to":"9cb13136-888a-4a6c-8e82-9fac0875672e","bidirectional":true},{"id":"f0a1cf69-2912-4a05-a301-f61679b57a30","from":"af3513cf-1a83-4f05-9c9b-a8e721814b9e","to":"665b4889-55dc-4735-a6bd-25c248d4db01","bidirectional":false,"label":"一个节拍内有\n【多个】微操作"},{"id":"83b20e23-1d66-4950-9329-081b4fcce63b","from":"665b4889-55dc-4735-a6bd-25c248d4db01","to":"c8b526c7-e506-49a2-a488-d3b79c3c25d7","bidirectional":false,"label":"一个微操作执行时间\n是【一个】微周期"}],"summaries":[{"id":"9f1a4d2f-9922-486c-a04e-cf42718a8a44","parentId":"fb630d3f-0250-4e41-a701-1a073c1beb52","start":3,"end":3,"label":"32位：E__X\n低16位：__X\n__X的高8位：__H\n__X的低8位：__L"},{"id":"16f48383-8ecb-4ebd-a153-fb86364d0a56","parentId":"fb630d3f-0250-4e41-a701-1a073c1beb52","start":6,"end":6,"label":"这两个寄存器不能乱用"},{"id":"2a7be800-4ecb-4985-9b0b-066e019a5ca2","parentId":"dc242fea-e78b-4ac4-b0c3-31b634920716","start":0,"end":1,"label":"两个注意点"},{"id":"aeaa41a2-c85f-4fd8-a5a9-6b366afbcecc","parentId":"a24f795f-3411-4ebe-849e-e0d474b13377","start":2,"end":2,"label":"一个微操作需要一个节拍来完成执行，但是也可以多个微操作在同一个节拍里面共同执行"},{"id":"5e452f82-240a-4993-a105-ee1fb3a0c23d","parentId":"ee98e053-89a6-4904-934a-19ad18297fe1","start":2,"end":2,"label":"在指令长度相同的情况下，所有指令的取指操作才相同，如果是多字指令则取指操作不同"},{"id":"aa0e79c1-097c-4e67-a569-a47a7e2b0c7d","parentId":"a38f777b-7a87-479f-8fd5-e0e44acfea57","start":0,"end":0,"label":"题目一定会告诉你的"},{"id":"f0267876-3826-486e-8747-7f93d827c6e2","parentId":"da104852-a623-47f3-825e-1c937ef92d8b","start":0,"end":1,"label":"了解即可"},{"id":"30dc2df9-c78b-4690-87a8-0a8fc53849f1","parentId":"abbfed9d-b465-4792-8e7a-4b82a77e4b56","start":1,"end":1,"label":"胖胖的"},{"id":"3a706f37-bc3a-49c6-b2c5-4641c4853cbd","parentId":"abbfed9d-b465-4792-8e7a-4b82a77e4b56","start":2,"end":2,"label":"瘦瘦的"},{"id":"9dce8bac-7765-49a0-9a4e-ef7aa98aca6b","parentId":"ff07b606-aaf4-4049-bbe1-d8aeb745d1ce","start":0,"end":1,"label":"和硬布线一样 （除了最后一步硬布线是直接生成了控制信息，而微程序是把OP字段传入到了微地址形成部件中）"},{"id":"777d9057-d5ba-4da5-b128-d443e6c6efcc","parentId":"ff07b606-aaf4-4049-bbe1-d8aeb745d1ce","start":2,"end":2,"label":""},{"id":"80162910-be1c-45bb-930d-9f807f5c8b62","parentId":"ff07b606-aaf4-4049-bbe1-d8aeb745d1ce","start":3,"end":3,"label":"确定总位数"},{"id":"c4cd4b18-7282-4566-97bf-e14187098c40","parentId":"c2944351-0547-4418-a619-885e4d65bdb9","start":0,"end":1,"label":"这样访问Cache的指令和数据是可以并行进行的"},{"id":"4374897d-ec6e-4044-a86e-41814db0981c","parentId":"c8877ebd-3440-48bd-a531-e6f623d86a23","start":0,"end":1,"label":"都不能【动态调整】指令执行顺序。\n生成这种指令顺序的技术：【动态调度技术】"},{"id":"8917a80d-3321-4c99-bebf-c16abb5bd2fe","parentId":"73350542-6464-4e8f-94de-efb82bfd038a","start":0,"end":0,"label":"例如一个程序中的for处理循环数组，可以同时处理完16个下标的数据"},{"id":"e2da27be-7119-4583-bf42-f5ece28973c9","parentId":"d556bc04-7395-4f0b-9e57-c2f4d2aa3d2a","start":0,"end":0,"label":"超线程技术"},{"id":"7a92daa9-b54e-48df-a9ff-fd69af47ff7b","parentId":"91d588c3-cb63-4750-85e5-c1c9b7ba1e76","start":1,"end":1,"label":"和单处理器的互斥锁很类似的东西"},{"id":"2c866464-a5a3-4fe2-be07-f2db1a8981dc","parentId":"31cd826c-bbc8-41d6-a0ea-14c6a665216b","start":0,"end":0,"label":"多个CPU之间的信息交互是通过电脑主板进行的"},{"id":"9d40e947-d796-4007-ae7e-66a1e2ce83f6","parentId":"a5974c0d-21c3-4819-92c0-32db523af7f9","start":0,"end":0,"label":"可以共享Cache也可以不共享Cache"}],"boundaries":[{"id":"8835f002-f249-47db-8070-008d5319485c","parentId":"09acdb3a-6a9e-4b92-bd0f-1f2ca5f1953e","start":1,"end":2,"label":"重要！！！！"}]}}},{"id":"25d7ab22-acb4-4c56-8db4-e27fd6d8903d","topic":"第六章 总线","expanded":true,"nestedMap":{"src":"kaoyan/408/computer-organization/co-00-sheet6","expanded":false,"maxHeight":260,"doc":{"format":"brushup-mindmap-v1","id":"co-00-sheet6","title":"第六章 总线","structure":"timeline-h","theme":"auto","root":{"id":"826b052229a8720ef4bfc8b7aa","topic":"第六章 总线","expanded":true,"children":[{"id":"9c7c45f9-a351-4702-9b92-a3c123ed2b32","topic":"总线定义","expanded":true,"children":[{"id":"a316cf84-2d78-495e-8d6a-f7fd68890a69","topic":"定义：","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"d80ea9fc-7be7-41c5-a061-d0e01cef5c9f","topic":"一组能为多个部件分时共享的公共信息传送线路","expanded":true,"style":{"background":"#8EDE99"}}]},{"id":"1e829ee2-14f5-47ed-8215-037487943cd8","topic":"特点：","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"51141b84-4094-42f5-a23c-fdbca5effde8","topic":"分时","expanded":true,"style":{"background":"#8EDDF9"}},{"id":"cbd515c3-dc52-4827-98fa-b5bc47cd9130","topic":"共享","expanded":true,"style":{"background":"#8EDDF9"}}]},{"id":"93ea8732-fb37-41aa-b070-74c138712e43","topic":"设备：","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"253a042a-c12b-45ef-8b93-21762d10db77","topic":"主设备","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"98f5e41c-3a15-4d05-b975-2ed88d2a9967","topic":"获得总线控制权的设备","expanded":true}]},{"id":"76ba695f-e464-4cdf-85ea-38825bd320ab","topic":"从设备","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"78fc79a3-2ccd-46ab-8688-5913a7925089","topic":"被主设备访问的设备，只能响应来自主设备的控制","expanded":true}]}]},{"id":"71050445-d452-4a97-bb7a-1164a64977d3","topic":"特性：","expanded":true,"children":[{"id":"52cab60f-31d5-475f-a04b-5ee81a51b16f","topic":"机械特性","expanded":true,"children":[{"id":"7a16834a-79d2-4f35-b3e4-bddbbbda3597","topic":"尺寸、形状","expanded":true}]},{"id":"9557071a-05a2-4837-85c6-55c11a953b60","topic":"电气特性","expanded":true,"children":[{"id":"e0c55b86-eaed-42f7-b951-7c8c2161a60b","topic":"传输方向 + 与数字有关的","expanded":true}]},{"id":"9cea0460-fe46-470b-8e5a-f809c55d96b3","topic":"功能特性","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"437a474f-05b7-46c8-a498-133474b23d64","topic":"每根线的功能","expanded":true,"style":{"background":"#FF9595"}}]},{"id":"ed05f6ac-51a6-4704-abc8-d8b61767b3f8","topic":"时间特性","expanded":true,"children":[{"id":"9dea3fea-fd4d-4627-b72b-934f59332bdd","topic":"信号与时序","expanded":true}]}]},{"id":"3566a532-f4a5-4cf1-a04d-a62bc2661aae","topic":"猝发传输","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"8835503d-32c2-4a53-b3a9-3f834acc08e4","topic":"在【一个总线周期】内传输存储地址连续的多个数据字 --- 猝发传送","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"54815d3a-77cd-4154-9121-e5820f1bac02","topic":"例如：一个总线带宽为32bit，传输一次数据的时间是10ns，支持猝发，则传输128bit数据最少需要：10（传地址） + 10 * 4（四个数据） = 50","expanded":true,"style":{"background":"#FFABD5"},"children":[{"id":"57a5e959-de1c-44b6-bc6b-eb891a02ea89","topic":"如果没有猝发，则时间最少是(10 + 10)*4","expanded":true,"style":{"background":"#FFABD5"}}]}]}]},{"id":"7402aa5f-572c-4e8a-9413-17ec525144f7","topic":"总线的分类","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"5b47d08c-810e-402a-9386-d47cecdd1921","topic":"片内总线","expanded":true,"children":[{"id":"605b6d58-a7d7-4969-99a2-c2f52e589675","topic":"芯片内部的总线，是CPU内部：寄存器与寄存器之间、寄存器与ALU之间的线","expanded":true,"children":[{"id":"13171bdb-5638-410d-8af7-4f941b136731","topic":"这里面所有的线","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-520222c01df71c.png","width":379.13,"height":159.05}}]}]},{"id":"cead17e4-f145-4488-8c3f-f53965fbced6","topic":"系统总线","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"79242ede-3d1a-4820-be72-bfd6fe68578c","topic":"数据总线 DB","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"22e91d5b-f528-444b-b77a-f77080fedf5e","topic":"传输各功能部件之间的【数据信息】","expanded":true},{"id":"13b3af7b-7f13-4fda-aa46-9db7d53a773b","topic":"可以进行双向数据传输，其位数与机器字长、存储字长有关","expanded":true}]},{"id":"93d33d74-1753-4100-8ded-5400f8d48320","topic":"地址总线 AB","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"58114b1b-0b0e-4869-892a-3c57b5aa357d","topic":"传输源数据、目的数据、IO端口的【地址】","expanded":true},{"id":"ec4d170f-9f70-4bc9-a6cf-ac6809273475","topic":"AB的根数（总位数）和主存地址空间大小有关","expanded":true,"children":[{"id":"36dfe077-05f9-4993-a71b-80c7ea9fd17b","topic":"小心：IO和内存统一编址","expanded":true}]}]},{"id":"367d1656-2b72-4801-9b79-0c5f26226f52","topic":"控制总线 CB","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"d742347c-8610-4581-b998-83e950060f98","topic":"传输【控制信息】","expanded":true},{"id":"3afc41b5-31d5-40f3-8b36-b52b202d5467","topic":"CPU送出控制命令和主存返回CPU的反馈信息","expanded":true}]}]},{"id":"91df78eb-d4ee-441c-b612-e823bba2c286","topic":"通信总线/外部总线","expanded":true,"children":[{"id":"0235ac0e-cb16-4356-9b64-65825c4a924c","topic":"计算机系统之间的、计算机与其他系统的的总线，例如网线","expanded":true}]},{"id":"d257dffb-daa7-45c1-9174-5dd4d7432dde","topic":"并行/串行总线","expanded":true,"style":{"background":"#FFABD5"},"children":[{"id":"42a7d59a-2d81-4ccb-9df3-356403f2818d","topic":"并行总线的传输速度不一定比串行高，因为并行总线间的码间串扰现象很严重","expanded":true,"style":{"background":"#FFABD5"}}]}]},{"id":"18edf756-6ae0-4b03-90a1-d602aece2a00","topic":"总线结构","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"e6c0789c-1b6e-4bb8-abb4-16188d06a49e","topic":"单总线结构","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"133ec88c-b903-4692-bff1-80aeccdb7fa9","topic":"CPU、主存、IO全都挂载到一组总线上","expanded":true,"style":{"background":"#8EDDF9"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-8ca6f35c57575d.png","width":314.17,"height":110.59}},{"id":"7db4142d-85c7-4910-891d-6ff0d6e4ad15","topic":"优点：","expanded":true,"children":[{"id":"57afb1bf-6e2d-4e9c-bc60-7702c094b033","topic":"结构简单、成本低、容易接入新设备","expanded":true}]},{"id":"f176daef-4c8b-4de4-ab9b-bdfa91256a2e","topic":"缺点：","expanded":true,"children":[{"id":"1794f30c-6e51-4dd9-8b0c-d5782158d52e","topic":"带宽低、负载重、多部件争用唯一总线","expanded":true},{"id":"9576fb58-38b5-4369-addb-b04d37cd8619","topic":"不支持并发传送操作","expanded":true,"children":[{"id":"46208c1e-c8a8-4c1d-8cc6-dc9c23be1e7e","topic":"这里的并发其实指 “并行”","expanded":true}]}]}]},{"id":"099292e5-d072-44b1-82a9-d6a4c767960f","topic":"双总线结构","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"795b021b-1de2-4eb9-9daa-1df27b42fa47","topic":"一条是主存总线，另一条是IO总线","expanded":true,"style":{"background":"#8EDDF9"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-304d5a9847bfe8.png","width":275.57,"height":209.47},"children":[{"id":"6e8416df-a606-44b6-9e3c-fe31274027c7","topic":"主存总线在CPU、主存、通道之间传送数据，IO设备通过IO总线和通道进行数据交互","expanded":true}]},{"id":"93bf8562-d6eb-4195-8708-ac746dd61f7d","topic":"优点：","expanded":true,"children":[{"id":"31c1b591-b897-4731-b2b4-2d8c756b33f5","topic":"将低速IO设备从单总线上分离出来了，实现了IO和存储器的分离","expanded":true}]},{"id":"8846f619-99cf-47d7-ab34-3945cfc98df1","topic":"缺点：","expanded":true,"children":[{"id":"a9ffbb6d-2770-4464-a5b9-54775a884b5e","topic":"需要增加通道硬件","expanded":true}]}]},{"id":"3d15fdef-4416-4067-8a44-abe2ee5c1777","topic":"三总线结构","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"fd2fe98d-c719-413e-9bb9-38e2bf9d3598","topic":"一条主存总线、一条IO总线、一条DMA","expanded":true,"style":{"background":"#8EDDF9"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-2f34a963d25718.png","width":237.08,"height":153.18},"children":[{"id":"4817ce86-1824-4426-ad9f-18a1e7697e32","topic":"CPU通过IO总线和低速外设进行数据交互，主存通过DMA总线和高速外设进行数据交互","expanded":true}]},{"id":"ee6010b2-5c87-405f-9f0a-0d5ba6d73468","topic":"优点：","expanded":true,"children":[{"id":"e5156aab-e2a0-4b1b-bb0a-16259334b250","topic":"提高IO设备的性能，使其更快的响应命令，提高吞吐量","expanded":true}]},{"id":"3e465da8-f82d-4d79-89dc-73a4c98fefa4","topic":"缺点：","expanded":true,"children":[{"id":"a470d0e7-dfeb-479f-9d0a-f805cc736ae4","topic":"系统工作效率较低","expanded":true}]}]}]},{"id":"ec771fe2-8987-4cda-ab87-787b441680dc","topic":"总线性能指标","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"d08f2735-10d4-4fac-bd60-e892edfa1010","topic":"总线传输周期","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"f29e25df-0da9-4973-9002-b1598f48b979","topic":"一次总线操作需要的时间：申请阶段 + 寻址阶段 + 传输阶段 + 结束阶段","expanded":true,"style":{"background":"#FF9595"}}]},{"id":"642daf39-bf2f-4e98-9aad-eea132d8c3cd","topic":"总线时钟周期","expanded":true,"children":[{"id":"fd69cf1d-034e-4c21-8218-04986feab444","topic":"总线的时钟周期 = 机器时钟周期","expanded":true}]},{"id":"425abfec-c4cd-4592-aed1-305215ec7d31","topic":"工作频率","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"2ee851b0-76df-4fb1-9947-842c395337da","topic":"各种操作的频率，是总线周期的倒数（即 1s 之内能够传送几次数据）","expanded":true,"style":{"background":"#FF9595"}}]},{"id":"a479af1b-6a17-428b-8835-db611670a81a","topic":"时钟频率","expanded":true,"children":[{"id":"a1caa98c-fc98-45b9-ad4a-9f29b8a44f5f","topic":"机器的时钟频率，是时钟周期的倒数","expanded":true}]},{"id":"0fd835f0-ae7e-4de6-9672-b405daccac08","topic":"宽度","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"f3cc30df-c90d-4102-abba-111810c08c76","topic":"总线位宽，一次总线传输数据的位数","expanded":true,"style":{"background":"#FF9595"}}]},{"id":"ff7938f3-5bf0-4f0c-bd60-66c4c33eac74","topic":"带宽","expanded":true,"icons":["priority:1"],"style":{"background":"#FF9595"},"children":[{"id":"46d94f78-3bdb-474b-9227-b07eb6bf0f3e","topic":"又：总线数据传输率。即单位时间内总线上可传输数据的总bit数（也可以以Byte作为单位）","expanded":true,"style":{"background":"#FF9595"}}]},{"id":"bdc4d7c1-7567-4f5e-ab53-42860f638682","topic":"总线复用","expanded":true,"children":[{"id":"6003a754-81d1-4f4c-9db4-b4c15ea252fb","topic":"分时传输技术。一种信号线在不同时间传输不同信息","expanded":true,"children":[{"id":"20800365-a090-4714-b2f8-50577e7ded62","topic":"vs. CO 地址复用：DRAM采用的行列存储模式","expanded":true,"style":{"background":"#FFABD5"}},{"id":"359eb34b-d1c8-4898-96d5-602cc7f8a3a0","topic":"vs. CN 地址复用：通过NAT技术实现局域网IP地址到广域网IP地址","expanded":true,"style":{"background":"#FFABD5"}}]}]},{"id":"8ec54abe-3c7b-4ee4-8aeb-1639cb337715","topic":"信号线数","expanded":true,"children":[{"id":"cc90f79e-98e6-422b-a799-fc10a773dca1","topic":"所有总线的线数总和：例如有32位地址线、32位数据线、100位控制线，则信号线数位164根","expanded":true}]}]},{"id":"42574bfa-b2b1-4f9f-aa2d-fda6ae83ac40","topic":"考频：超高","expanded":true,"style":{"background":"#BA69C8"},"children":[{"id":"7ae7c485-d1b1-4d5a-bb6c-d5d2b5376729","topic":"09-11、12*2、13、14*2、15-20","expanded":true}]}]},{"id":"50ebf0b3-832c-467b-875d-1b9543021bca","topic":"总线事务和定时","expanded":true,"children":[{"id":"3239ef55-b46b-4c07-af4c-473ced7c87ce","topic":"考频：低","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"8eeb914a-daed-4712-90ba-a4ab4871d1ae","topic":"21","expanded":true}]},{"id":"a4e3a3fe-2dc6-40fd-a587-fe9857f14ea1","topic":"总线仲裁","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"a40efcef-8ddf-42fc-ad4b-edda23a938b6","topic":"作用：解决多个主设备同时竞争总线控制权的问题，使用某种方式选择一个主设备有限获得控制权","expanded":true}]},{"id":"3ff5d93b-95ef-4317-b886-b9b5f1685b69","topic":"总线事务","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"5c25f3de-111d-49de-ac54-2d1929f7658a","topic":"请求操作：","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"5d191757-f480-48c1-9e49-041e534003a0","topic":"主设备（CPU、DMA）发出总线传输请求，获得总线控制权","expanded":true}]},{"id":"01b82713-b3a4-4ad6-afc3-aa29a59c6399","topic":"仲裁阶段：","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"36b0c349-9acc-4abb-a9c4-e8113a906e19","topic":"总线仲裁机构决定将下一传输周期的总线使用权授子某一申请者。","expanded":true}]},{"id":"e8404aa5-c455-491e-a9a5-1b68e210308f","topic":"寻址阶段：","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"17d0c8d1-7ef9-461c-9800-b9f4041585fe","topic":"主设备通过总线给出要访问的从设备地址及有关命令，启动从模块。","expanded":true}]},{"id":"825ade8b-7df6-4344-b913-5bc5ef53f3fb","topic":"传输阶段：","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"96fff7fe-7141-45c5-bda4-1374b9f98b12","topic":"主模块和从模块进行数据交换，可单向或双向进行数据传送。","expanded":true}]},{"id":"553cd02f-6a9a-48a6-8329-95c8f18908a8","topic":"释放阶段：","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"0c0b9b0f-feb0-4bbc-8bbd-2d2da30e4b02","topic":"主模块的有关信息均从系统总线上撤除，让出总线使用权。","expanded":true}]},{"id":"f848d428-5c8c-40b4-98ac-43ef5af16a5d","topic":"22","expanded":true,"icons":["emoji:💬"],"style":{"borderStyle":"dashed","borderColor":"#F59E0B"}}]},{"id":"2e8cdf45-bdc9-4efa-b116-ce751ad04832","topic":"总线周期\n四大阶段","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"63ab54ab-447e-4cd6-9f9a-d1811a723fb8","topic":"申请分配阶段","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"f42b8bf5-a6fd-4b0f-a7ac-a03f7b9a66c5","topic":"传输请求 + 总线仲裁","expanded":true}]},{"id":"378013e3-566c-4285-8c82-8a598f8f32e0","topic":"寻址阶段","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"9c8aa642-4b6f-4805-a1fc-a27be0beae37","topic":"【获得了使用权的主模块】通过主线发出【本次要访问的从模块】的【地址】的命令","expanded":true}]},{"id":"762e3a44-978a-4df2-97a5-624390bbf6e6","topic":"传输阶段","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"f8e76fc2-dc95-4898-8d4b-1b5388c3b861","topic":"主从模块进行【数据交换】","expanded":true}]},{"id":"9a888736-d851-482f-91ab-eb2dafdf7413","topic":"结束阶段","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"dbbfc88d-1a1b-47ff-9c6f-eae0be92d1ee","topic":"主模块有关【信息从系统总线上撤除】，【让出总线使用权】","expanded":true}]},{"id":"04e438aa-ca97-42e8-85dc-c240f6e920a0","topic":"(旧)","expanded":true,"icons":["emoji:💬"],"style":{"borderStyle":"dashed","borderColor":"#F59E0B"}}]},{"id":"5622ac00-31da-477d-acd8-2e2481151eba","topic":"总线定时","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"abb4f6b6-f37a-4a24-a633-62cc7d47ae8d","topic":"同步定时","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"85964896-da13-4f61-83d6-38e697809caa","topic":"CPU采用完全统一的时钟，适用于总线长度短、总线所接部件的存取时间很接近的系统","expanded":true},{"id":"274c745c-dd8f-4532-bfeb-e1868e19eefe","topic":"图示","expanded":true,"style":{"background":"#FF9595"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-a756aab1cbf761.png","width":318.49,"height":280.54},"children":[{"id":"c88b75a8-eed7-44af-b335-701d19180005","topic":"T1: CPU给出地址信息","expanded":true},{"id":"55d8e185-5613-48c7-8dc5-196279d8d7f4","topic":"T2: CPU给出读命令（低电平有效），与地址信息相符合的输入设备按命令进行一系列的内部操作。","expanded":true,"children":[{"id":"e929aa13-5641-4ad0-bbf6-c59ad1a2901c","topic":"且必须在读命令T3的上升之前将CPU所需的数据送到数据总线上","expanded":true}]},{"id":"be364c40-72b1-4724-98ad-9ce200b1d063","topic":"T3: CPU把数据线上的数据送到内部寄存器中。","expanded":true},{"id":"7a62ed64-b61a-4eb6-9ce8-09f8285adeb0","topic":"T4: CPU在T4撤销读命令，输入设备不再向数据总线上传送数据，撤销它对数据总线的驱动。","expanded":true}]},{"id":"2fc7fb4e-1e83-4f65-977c-d573f2c72812","topic":"优点：","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"e1d0f90c-24b2-4be6-9cd6-6c2571a769cd","topic":"传送速度快，具有较高的传输速率，逻辑简单","expanded":true}]},{"id":"3facc3d3-fe00-4dfd-8ec0-b20491f5b20c","topic":"缺点：","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"03bf6547-4078-4669-b8de-457a648a156e","topic":"主从设备强制性同步，不能及时进行【有效性、可靠性】检测","expanded":true}]}]},{"id":"aa383f72-fd3f-46ec-9bb9-7a0dfcab86bc","topic":"异步定时","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"50ab48ba-84f3-4e62-91ce-c8b76577d40d","topic":"主从设备通过应答进行协商确定时钟","expanded":true},{"id":"ded6b9f0-cdb3-498d-92c1-45e02bac3f24","topic":"请求回答的互锁","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"40813671-998b-4a55-b8d7-831329fa14e3","topic":"发送的例子：","expanded":true,"children":[{"id":"f62aac44-2331-49f3-8215-30cdc167b264","topic":"请求：","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"389a66b1-67f5-46d2-818f-41b47b0f7130","topic":"地址信息、读命令","expanded":true,"style":{"background":"#FF9595"}}]},{"id":"93cffaed-997b-4fee-8455-48d5546f11a9","topic":"回答：","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"9bd386b5-5c55-479d-b672-c3cdb28c54a0","topic":"要读出的数据","expanded":true,"style":{"background":"#8EDDF9"}}]}]},{"id":"ae57c48f-d9a6-46a0-b5bc-0800d60ce4de","topic":"不互锁方式","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"6979c937-1987-4afb-a4fd-16b7a5cf87b8","topic":"图示","expanded":true,"style":{"background":"#8EDDF9"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-481dcadd5de035.png","width":171.64,"height":115.21},"children":[{"id":"607cf7a9-e7b8-4b40-aa41-467471885322","topic":"最快、最不可靠","expanded":true,"style":{"background":"#FF9595"}},{"id":"a56b5c74-64af-4304-a521-55636af0126a","topic":"主设备发出【请求】，不用等到从设备的【回答】，经过一段时间自行撒销【请求】。","expanded":true},{"id":"218c26f5-70ee-4ab7-a3aa-8fe821e5124c","topic":"从设备收到【请求】后，发出【回答】信号，经过一段时间自动撒销【回答】。","expanded":true},{"id":"5fc78bf5-c3a4-4abe-bd72-dff94c0b60ad","topic":"双方不存在互锁关系","expanded":true,"style":{"background":"#FDD834"}}]}]},{"id":"93ef973c-973a-4225-b3ba-a8c50fa23295","topic":"半互锁方式","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"6333caeb-b7d9-4027-a5d1-7dd847f753f0","topic":"图示","expanded":true,"style":{"background":"#8EDDF9"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-eb733ba91bee84.png","width":173.03,"height":118.67},"children":[{"id":"fe92700d-826e-4314-800f-742ecae1f4a4","topic":"主设备发出【请求】，等到从设备的【回答】，后撤销【请求】。","expanded":true,"children":[{"id":"46185c0d-2621-44bc-9919-4ca8222f5349","topic":"主设备有互锁关系","expanded":true,"style":{"background":"#FDD834"}}]},{"id":"1f8703f2-85cf-4f4e-8c7e-75b2b66adaa3","topic":"从设备收到【请求】，发送【回答】，过一段时间自行撤销【回答】。","expanded":true,"children":[{"id":"c53992d4-d991-43e1-ba03-a3fe6a9c5fe8","topic":"从设备不存在互锁","expanded":true,"style":{"background":"#FDD834"}}]}]}]},{"id":"1479ddd5-6c68-4efe-bb2a-a5bb803b4bed","topic":"全互锁方式","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"cc06b982-e180-4254-9450-153451ac57ad","topic":"图示","expanded":true,"style":{"background":"#8EDDF9"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-d9571b6de95d12.png","width":177.6,"height":118.81},"children":[{"id":"721a8fa4-38b8-4671-b98b-5178f52afeb5","topic":"最慢、最可靠","expanded":true,"style":{"background":"#FF9595"}},{"id":"574a975f-9ca2-4c93-9e52-bd5de2b490f7","topic":"主设备发出【请求】，等到从设备的【回答】，后撤销【请求】。","expanded":true,"children":[{"id":"b7d906dc-fed2-487a-83ed-228ca409b2c2","topic":"主设备有互锁关系","expanded":true,"style":{"background":"#FDD834"}}]},{"id":"79beb024-f032-4933-8dd1-78f46ea99a53","topic":"从设备收到【请求】，发送【回答】，等到获知主设备【请求】撤销过后，才可以撤销【回答】。","expanded":true,"children":[{"id":"88eaab60-7bd1-427b-a73e-5142a49302af","topic":"从设备有互锁关系","expanded":true,"style":{"background":"#FDD834"}}]}]}]}]},{"id":"5aa70080-6bc0-4334-ad0f-89f889285006","topic":"优点：","expanded":true,"children":[{"id":"c0b5a0b4-90c5-4630-af0a-8a849e838167","topic":"总线周期可变，能保证两个速度相差很大的设备可以可靠的进行通信","expanded":true}]},{"id":"9a024a9e-da40-47c1-8fb7-b07e2fe8b3b0","topic":"缺点：","expanded":true,"children":[{"id":"9286656c-643b-429e-a021-03435f79c3da","topic":"比同步复杂，速度比同步慢","expanded":true}]}]}]},{"id":"6e6ca056-b188-41fd-b607-38e09079c3f7","topic":"半同步通信","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"f7e3b474-d1a4-4f4d-af08-717c2af08b9e","topic":"同步 + 异步","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"e9262174-4945-4cee-b7ac-54fde9a1de9d","topic":"图示","expanded":true,"style":{"background":"#8EDE99"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-497c5c8090025c.png","width":438.73,"height":322.7},"children":[{"id":"3e113f83-60ab-4ef3-8d16-80864c7f3e1a","topic":"在同步方式中，如果主设备在T2发出了读，但是从设备知道自己无法在T3给出数据，就会在T3发出WAIT命令","expanded":true}]}]}]},{"id":"c2018c78-be4f-4694-bc06-d6be287e63e1","topic":"分离式通信","expanded":true,"children":[{"id":"7aaebf2b-8e62-4667-8943-f8be700af613","topic":"在从设备准备数据的时候，总线是空闲的，故可以采用其他操作","expanded":true},{"id":"5837202d-ab01-4c1d-94b3-bf83a9a67c36","topic":"分为两个周期","expanded":true,"children":[{"id":"65a38635-ccd1-4c1d-b32f-cd2294d9165e","topic":"周期一：主模块申请占用总线，使用完后放弃总线使用权","expanded":true},{"id":"470bb4bf-3d5f-49e0-82fa-ba7165ba76f5","topic":"周期二：从模块申请占用总线，将各种信息放上总线","expanded":true}]},{"id":"6e811db8-e31b-4982-a9af-110a17b53d15","topic":"特点：","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"886239b7-f36a-4c08-9e10-3db6a59206de","topic":"1. 每个模块都有权利申请占用总线","expanded":true,"style":{"background":"#FF9595"}},{"id":"bfa6b0e9-196b-42d9-b1fc-c83a19a7fadb","topic":"2. 总线利用率高","expanded":true,"style":{"background":"#FF9595"}}]}]}]},{"id":"0be31bcb-d1b6-4b0f-adc9-e2542b7bfda9","topic":"END","expanded":true}]},"relations":[{"id":"277e904e-14b0-4b17-b588-60d9f5e7bdf5","from":"98f5e41c-3a15-4d05-b975-2ed88d2a9967","to":"78fc79a3-2ccd-46ab-8688-5913a7925089","bidirectional":false,"label":"通过总线控制"}],"summaries":[{"id":"e2d15c70-c84c-40e1-ba6c-b572157f6b8e","parentId":"ec771fe2-8987-4cda-ab87-787b441680dc","start":0,"end":1,"label":"故一次总线传输周期 = 多个机器周期"},{"id":"36ce6e43-0168-4844-9a5b-4917c42d5327","parentId":"9c7c45f9-a351-4702-9b92-a3c123ed2b32","start":3,"end":3,"label":"【类比计网的物理层特性】：\n计组：机械特性——计网：机械特性\n计组：电气特性——计网：电气特性\n> 计组：时间特性——计网：规程特性\n计组：功能特性——计网：功能特性"},{"id":"7119f6a3-6800-408b-9099-9472699321b0","parentId":"aa383f72-fd3f-46ec-9bb9-7a0dfcab86bc","start":0,"end":0,"label":"异步总线的传送设备是按需分配的"}],"boundaries":[{"id":"ee979977-cbcb-4209-96f1-94459cffc78b","parentId":"ec771fe2-8987-4cda-ab87-787b441680dc","start":5,"end":5}]}}},{"id":"7db87d51-6335-4182-a07a-ebfd5eb771c7","topic":"第七章 输入输出系统","expanded":true,"nestedMap":{"src":"kaoyan/408/computer-organization/co-00-sheet7","expanded":false,"maxHeight":260,"doc":{"format":"brushup-mindmap-v1","id":"co-00-sheet7","title":"⭐️第七章 输入输出系统","structure":"timeline-h","theme":"auto","root":{"id":"25ebd29f9eda159ff0994b00cf","topic":"第七章 输入输出系统","expanded":true,"children":[{"id":"380e3843-a9c4-45fb-9152-5f4c38e12414","topic":"I/O设备","expanded":true,"style":{"background":"#ADADAD"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-254af1fc753dfa.svg","width":64,"height":64},"children":[{"id":"d42c3e96-5d09-4899-9b9c-1c87370ba51c","topic":"输入输出系统","expanded":true},{"id":"9977211e-fcde-48d1-a669-07e625445390","topic":"IO控制方式","expanded":true},{"id":"f37be11f-9828-4d9b-b23b-9bb839e80a1a","topic":"外部设备","expanded":true},{"id":"c9d6bd85-452c-49bb-ba6e-223c02146c1b","topic":"知识点补充：","expanded":true,"children":[{"id":"bee65657-78aa-4bf9-9aea-a8acf4471988","topic":"异步串行传输方式","expanded":true,"style":{"background":"#FFABD5"},"children":[{"id":"aad5b716-43bf-49a9-90c0-8296851d2a90","topic":"计网中的内容，默认是要有一个起始位 + 一/多个终止位 + 可有可无的校验位","expanded":true,"style":{"background":"#FFABD5"}}]},{"id":"0950451e-595b-4467-8ee0-33b448c6c0d8","topic":"注意区分“需要xxx个周期”和“需要xxx条指令”","expanded":true},{"id":"f397f651-6ebc-4a26-9933-f5348afea961","topic":"注意区分速率和容量中的“K M G”","expanded":true,"children":[{"id":"96174bab-70d5-4326-8dc3-f2ee23c4fdff","topic":"速率是10的n次方","expanded":true},{"id":"97fd3187-c27e-42df-8603-33ec30ce432e","topic":"容量是2的n次方","expanded":true}]}]},{"id":"e502a1dc-66be-4248-9ffa-471223b79498","topic":"*","expanded":true},{"id":"4b417ef2-05fa-4fc4-90f7-c56d1ae062e4","topic":"考频：低","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"1952f230-2de8-4c44-9f5b-c0fb4ac2a536","topic":"10","expanded":true}]}]},{"id":"81e50542-794f-4763-ada6-226fc0078e93","topic":"I/O接口","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-4886d452348e57.svg","width":64,"height":64},"children":[{"id":"bc8a3b70-4c45-4a9e-9d68-9f6e2562b07d","topic":"考频：低","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"471926d8-d2f1-4082-a5aa-258fb957c490","topic":"12、14、17","expanded":true}]},{"id":"17a8f57a-fecb-46b4-b9e3-849c67ae9fcc","topic":"功能","expanded":true,"style":{"background":"#50C3F7"},"children":[{"id":"bd900830-87ac-41af-b124-1ff2ad0804d0","topic":"实现主机和外设的通信联络控制","expanded":true,"style":{"background":"#50C3F7"},"children":[{"id":"ab288b85-1c49-4177-a733-a0eab402a058","topic":"IO设备是通过IO接口与主机进行沟通的","expanded":true},{"id":"34e5dcfc-ffe6-49f7-a032-e49b2c0be6be","topic":"例：IO控制与定时、与主机外设通信","expanded":true,"style":{"background":"#8EDE99"}}]},{"id":"7287f6bf-94ce-4c77-868d-b256abdf7880","topic":"进行地址译码和设备选择","expanded":true,"style":{"background":"#50C3F7"},"children":[{"id":"1a80559a-2e7b-4284-b6c1-b42e3ca8d638","topic":"主机发送的指令地址是需要经过一次地址转化过后才会对应到IO设备的地址","expanded":true}]},{"id":"9bc6da1f-c1c4-45ab-a38a-3696927d66c3","topic":"实现数据缓冲","expanded":true,"style":{"background":"#50C3F7"},"children":[{"id":"3a1e9fa3-48fa-4445-9f1e-094ba6aa19e5","topic":"主机和IO设备之间的数据传输速率不匹配，故在接口处可以进行数据缓冲","expanded":true}]},{"id":"d2a3a2ae-4d5e-4a26-8b29-a6372d6b6847","topic":"实现信号格式的转换","expanded":true,"style":{"background":"#50C3F7"},"children":[{"id":"5dbd2438-bcaf-480d-a23a-b3ef26b558b9","topic":"主机传输一定是采用高低电平的 0 1 来传输的，而不同IO设备的电气特性可能不同，0 1 所对应的高低电平值也可能不同","expanded":true},{"id":"1700f22f-0d3f-466d-be63-96f2fa05df3e","topic":"例如：数据格式转换","expanded":true,"style":{"background":"#8EDE99"}}]},{"id":"fb3c2eea-d0b6-4b2f-931c-83e4e32b950d","topic":"传送控制信号和状态信息","expanded":true,"style":{"background":"#50C3F7"},"children":[{"id":"d4a754c1-c7ae-4ff8-a296-01510cb2d903","topic":"主机需要发送控制信息指明操作命令，而IO设备需要发送状态位信息给主机","expanded":true},{"id":"a5d3d9de-21a9-4c0a-b8a1-a2f32804e9db","topic":"例如：IO过程中错误与状态检测","expanded":true,"style":{"background":"#8EDE99"}}]}]},{"id":"d0406450-071b-4218-9253-709f448a6bc8","topic":"I/O控制器","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-bca4f4c7be28bf.svg","width":64,"height":64},"children":[{"id":"6e6f9b2b-6634-460c-85d8-9f7b8b3d6425","topic":"I/O接口","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"7f2e40ca-31ec-4dae-85db-75568d6cc3ed","topic":"I/O控制器","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"563f7514-8dba-45b8-8e73-f2fddf4bccd0","topic":"设备控制器","expanded":true,"style":{"background":"#8EDE99"}}]}]},{"id":"33525bea-027f-43e3-ab1b-9025fc59d22e","topic":"I/O内部","expanded":true,"children":[{"id":"f29bed2b-940e-408c-8213-c0c4db8a2bc3","topic":"机械部件","expanded":true,"children":[{"id":"39b1b905-16e6-4d5e-a3e0-dcce477d2234","topic":"看得见摸得着的实体","expanded":true}]},{"id":"d6490f67-f529-4deb-be24-9328f49d2ae9","topic":"电子部件","expanded":true,"children":[{"id":"02376f1f-d30a-4c1f-9ff6-4f24f52b4f23","topic":"藏起来的电路板","expanded":true}]}]},{"id":"202c2993-4e92-4819-8f3c-eed072bb695f","topic":"I/O控制器组成","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"025d9de4-7f32-45f1-87ea-d3b17e0f377c","topic":"图示","expanded":true,"style":{"background":"#FDD834"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-fe09837494c119.png","width":865.46,"height":519.07},"children":[{"id":"704bbece-db54-4aad-97e5-f253af1f4ecb","topic":"由图可知：","expanded":true},{"id":"9aac658f-b067-4aa2-b8b7-07bbbff9aa2a","topic":"1. 一个I/O控制器，管理多个IO设备","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"cde3c164-3908-4f69-bcc7-04c9ef0e493b","topic":"一个I/O设备中，也可以连接多个I/O控制器（多通路IO系统）","expanded":true,"style":{"background":"#FFABD5"}}]},{"id":"30236a0f-fc83-4f00-ae0e-178a159e5111","topic":"2. 每个I/O控制器中可以有多个(相同或不同的)寄存器。","expanded":true},{"id":"6bf3cbba-4290-4aaf-b595-7564798d614b","topic":"3. 一个I/O控制器中有一个I/O逻辑，负责接受和识别CPU的命令，通过这个I/O逻辑，可以使这个I/O控制器管理的设备和CPU能够进行交互","expanded":true},{"id":"9544ba6e-40a5-4ec0-9cfd-0a3988ccd4ad","topic":"4. I/O逻辑把命令发送到对应的接口处，由接口处的线来进行数据、控制的发送。同时也可以获得设备发来的状态","expanded":true,"children":[{"id":"e0672283-f7d6-4c96-b863-171c32cf4e63","topic":"这里的I/O逻辑到设备的接口模型和CPU到I/O控制器的模型基本一致","expanded":true,"style":{"background":"#8EDE99"}}]}]},{"id":"880991e8-6674-4d60-8132-ecc7a6dc6227","topic":"from OS","expanded":true,"icons":["emoji:💬"],"style":{"borderStyle":"dashed","borderColor":"#F59E0B"}}]},{"id":"7af60388-3c8c-4e51-bd4a-bd4acb06ba94","topic":"计组书上的图","expanded":true,"children":[{"id":"299c8dcc-3dbf-4538-89d9-988a7fba6b49","topic":"图示","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-4132f6854d6adc.png","width":898.48,"height":492.34}}]},{"id":"be34e7a4-bda2-495f-ab14-7f4d27234710","topic":"I/O控制器功能","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"842951c3-3a6f-411b-88cc-518015f2e560","topic":"CPU无法直接控制I/O设备中的机器部件，所以I/O设备中还要有一个电子部件来作为中介","expanded":true},{"id":"d29b9d09-d537-4ed6-b784-f20fe1f7b5d3","topic":"又称：","expanded":true,"children":[{"id":"74314cf5-86d0-41f4-8ac0-40cc72fa12b7","topic":"设备控制器","expanded":true,"style":{"background":"#8EDDF9"}}]},{"id":"88c44a97-2d14-4144-afea-3f8a61a47d20","topic":"功能：","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"4ac2819c-3743-4684-80d6-ffd4c51481b7","topic":"接受和识别CPU命令","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"7346390c-63df-4ff1-b8ca-6e5b7310699b","topic":"把CPU的命令：例如read/write，放到【控制寄存器】中，同时通过【控制线】告知I/O设备发送了命令","expanded":true}]},{"id":"c27d61a8-00fc-4df0-bec7-285aef3dac31","topic":"向CPU报告设备状态","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"d8381ca9-d777-4099-b1bb-9a4c067ebc4b","topic":"【状态寄存器】，表示空闲忙碌","expanded":true}]},{"id":"f9503473-e798-4d70-a775-c566a56c8407","topic":"数据交换","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"5b48706b-b9ff-4476-9fe3-b2f3036494d0","topic":"读写数据都放到【数据寄存器】","expanded":true}]},{"id":"95b45835-5563-490b-ac0a-c6062c4cb46a","topic":"地址识别","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"a9b2fdb6-eadf-4902-9bf2-1f2e4d7697da","topic":"把逻辑IO寄存器地址翻译为物理地址，通过【地址线】进行传输","expanded":true}]}]}]},{"id":"9cee98d0-c874-4257-8a5b-ecec62cfef56","topic":"I/O 端口","expanded":true,"children":[{"id":"b544a842-853c-4dd6-a3b9-f53fc882eea4","topic":"设备控制器中可被CPU直接访问的寄存器","expanded":true,"children":[{"id":"9650ae60-fc37-433d-a993-0279de60a831","topic":"OS图中的白框","expanded":true}]},{"id":"0a5a67c5-8043-4917-9305-869b7af7e55d","topic":"独立编址I/O","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-eee794b1609bd7.png","width":267.32,"height":231.53},"children":[{"id":"788a5a91-d440-4668-ab7a-bc2988365567","topic":"统一编址 = 内存映射I/O","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-50765270cd8a7d.png","width":184.83,"height":222.67},"children":[{"id":"f45759a0-ad39-4d75-8e63-0b84654775d9","topic":"图示","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-9689c173175c28.png","width":638.27,"height":358.08}}]}]},{"id":"a8a7b64a-cc01-4d79-9848-7835b2330a9e","topic":"内存映射I/O简化了指令","expanded":true,"style":{"background":"#FF9595"}},{"id":"2a19c73d-b0ba-4ac0-85af-89e9fcb9fddc","topic":"寄存器独立编址让指令设计变得复杂，需要单独设计和read write相区别的指令(input output)","expanded":true,"style":{"background":"#FF9595"}}]}]},{"id":"19c4098a-d994-41a2-9972-3edb8ed081c3","topic":"I/O接口类型","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"fa6ba762-b39e-40a0-8f82-3a910f32e6a2","topic":"数据传送方式","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"5ef037ad-b7ec-467b-9f73-00deef1d430a","topic":"并行","expanded":true,"children":[{"id":"cf2e32ca-9e0c-4523-9e20-c815397bcce1","topic":"一个Byte或者一个字的所有bit同时传送","expanded":true}]},{"id":"76da9633-798d-4d69-8d4f-23596414b3e7","topic":"串行","expanded":true,"children":[{"id":"ee1393e9-2965-4db6-8c5e-92d0ec656940","topic":"一个bit一个bit进行传送","expanded":true}]}]},{"id":"b1854ddb-657c-4715-a44e-f8ae17a52c8c","topic":"控制方式","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"7e7716de-78bc-4018-a807-8dadfbf66972","topic":"程序查询接口","expanded":true},{"id":"14360e04-639b-45a2-837b-ae5a765b0e97","topic":"中断接口","expanded":true},{"id":"db1234a8-e8d9-4e33-b6ae-0ff3a5e3e98e","topic":"DMA接口","expanded":true}]},{"id":"94d22dfe-3c39-4653-8823-954d1b5b3214","topic":"灵活性","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"5cc30eff-50e6-4bec-bc5a-02112be186a7","topic":"可编程接口","expanded":true},{"id":"8951baff-74bc-4b64-b23a-175253598552","topic":"不可编程接口","expanded":true}]}]},{"id":"ddda9e4d-82b2-4b70-8ce3-5b1ebc54b3f6","topic":"I/O端口","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"ea1b604a-4b3d-456b-85e6-31708ba71bc1","topic":"端口与接口：","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"7e1e9912-e51a-4a21-b200-5f944196aee6","topic":"IO端口指接口电路中可以进行读、写的寄存器。【若干端口】 + 【对应的控制逻辑】=【接口】","expanded":true,"style":{"background":"#FF9595"}}]},{"id":"9dc6d907-2c2d-4c0b-aab9-a4d52a9ee3c1","topic":"组成：","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"0dd02391-529a-4c6c-a85d-74cd23915efa","topic":"数据端口、状态端口、控制端口","expanded":true}]},{"id":"d59bdf2d-0587-487e-a2d7-ba0704325b52","topic":"编址方式：","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"b8f83da1-9448-4402-a2db-a165171aa37a","topic":"统一编址（存储器映射）","expanded":true},{"id":"25c01329-d6d5-4265-83c7-607380d9f284","topic":"独立编址（I/O映射）","expanded":true},{"id":"6cfad1ef-525b-417c-8112-9dc13c6f29e5","topic":"程序员进行系统调用访问是使用的是【逻辑地址】","expanded":true,"style":{"background":"#FFABD5"},"children":[{"id":"7770f7b5-b161-4ae6-bc81-c45db381abf1","topic":"而不是物理地址、主/从设备地址（主从设备地址是总线制裁的内容）","expanded":true,"style":{"background":"#FFABD5"}}]}]}]}]},{"id":"475793ed-2364-47cc-835f-a5a8b4f071d1","topic":"IO方式","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-08d68d8e0ae806.svg","width":64,"height":64},"children":[{"id":"cbfa68a9-a046-4dfc-a0d9-e1ea1d5fe385","topic":"中断","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"efed1bac-6d58-4e0f-98ac-747eefd235b0","topic":"内中断","expanded":true,"children":[{"id":"1d961b1d-9005-46cc-86c9-3b5418fabe93","topic":"来自CPU内部的","expanded":true},{"id":"96d2bab6-d759-4fb4-832a-882975d33722","topic":"故障 fault","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"d11eeac9-298f-425c-a951-c2321aaef83d","topic":"fault是可以被修复的异常","expanded":true,"style":{"background":"#FDD834"}},{"id":"0af85193-e80f-4669-b9b1-07d0c162ca07","topic":"非法操作码、缺页、除数为0、溢出","expanded":true}]},{"id":"b8d5759c-96a2-4d98-a0ff-072c71d79052","topic":"自陷 trap","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"a204ea2e-0b17-4f95-bcb7-e241d1a6afab","topic":"trap指令","expanded":true,"style":{"background":"#FDD834"}},{"id":"b72451bb-7676-4e12-a22d-df5c434eaca7","topic":"安排好的时间，在用户态下调用操作系统内核程序","expanded":true}]},{"id":"170085ee-5ea7-4361-8b86-1c410395f2a7","topic":"终止 abort","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"d2c8d693-0888-4a4b-8fbc-d7c8d9fef7df","topic":"abort是十分严重的异常","expanded":true,"style":{"background":"#FDD834"}},{"id":"0c9a19a2-3f4e-4ff7-95d9-0e55a5ae748b","topic":"使CPU无法执行的硬件故障，例如控制器出错了、存储器校验错等","expanded":true}]},{"id":"9ca20f2e-1089-47a7-bb3d-d82bb2883d6a","topic":"异常","expanded":true,"icons":["emoji:💬"],"style":{"background":"#4051B5","borderStyle":"dashed","borderColor":"#F59E0B"}}]},{"id":"f8510822-f2df-4d4d-a577-db328853c728","topic":"外中断","expanded":true,"children":[{"id":"513fa714-c96a-4302-bf19-32ea49b15014","topic":"通常处理IO","expanded":true},{"id":"7347d33f-2e89-4e84-a64d-c4d6a8049a4f","topic":"可屏蔽中断 INTR","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"5db27d12-f34c-4029-a0c6-aaca2c86017c","topic":"通过改变屏蔽字实现多重中断","expanded":true}]},{"id":"39f32b4f-24a3-42ae-bce5-d01ed0762734","topic":"不可屏蔽中断 NMI","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"422d653d-9726-4d5f-8ced-cc6154df8027","topic":"紧急的硬件故障","expanded":true}]}]}]},{"id":"0870f11d-1881-4999-b74c-7f1c0f04b2e0","topic":"异常","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"1f1c011a-e5eb-4564-b9b6-4788fe927d59","topic":"异常（内部异常）和外部中断的识别方式不太一样","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"2935f098-1af5-4009-ae2c-ecac4a3eeaeb","topic":"外部中断是在每条指令执行的最后的中断周期进行检测的","expanded":true}]},{"id":"57480f38-b343-49d1-b481-41f6066b0c55","topic":"异常采用：【软件识别方式】来检测内部中断","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"1f6d8306-52e1-40ae-b8e7-fd89a9a45fc9","topic":"首先：","expanded":true,"children":[{"id":"183057d8-2f3a-4117-978c-b889dd089e80","topic":"CPU会设置一个异常状态寄存器，记录异常原因。","expanded":true,"style":{"background":"#8EDE99"}}]},{"id":"9ab628fa-374d-476d-92ad-7b1e1b18eada","topic":"使用查询程序：","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"c1e543d3-7e05-485c-aee8-ce222c58f730","topic":"OS会有一个查询程序，查询程序会按照一定的异常优先级来遍历异常状态寄存器。先查到的先处理","expanded":true}]},{"id":"34d90957-f61f-429c-8f3b-672d033cd9fb","topic":"不使用查询程序：","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"033af333-0a77-4636-9ef7-5db4c13f7e1a","topic":"故障abort和陷阱trap指令是在指令内部可以直接得知出现了内部异常（例如除以0或者trap）","expanded":true},{"id":"b1275cd7-92b0-43d8-a8ae-e298e9d45fe1","topic":"一旦发现了就可以立即处理，不需要专门的查询程序，在发现异常时直接可以转到相应的处理程序上","expanded":true}]}]},{"id":"1bb9376f-a983-4473-ae90-a9d57e9234be","topic":"为什么异常、外部中断都是中断","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"1ae971b1-a70e-4651-b0f5-8a61a440da06","topic":"因为他们的异常处理过程是基本一样的","expanded":true}]}]},{"id":"bebc4f12-0597-41c5-a44e-30e4f05c0ea2","topic":"程序查询方式","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"7666b0d6-53c7-4fdb-bc7b-e0d153d27163","topic":"步骤：","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"11894873-4a6c-48ee-8d5f-b993c1323726","topic":"图示","expanded":true,"style":{"background":"#8EDDF9"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-15ddb8e7682002.png","width":141.46,"height":416.16},"children":[{"id":"46ad2a0d-a149-441e-98cf-3f38b71835bb","topic":"独占查询，一直一直问","expanded":true,"style":{"background":"#FF9595"}},{"id":"58d9605b-2562-479e-968a-1edac355dee8","topic":"如果设备未就绪，CPU就一直卡在这里","expanded":true,"style":{"background":"#FF9595"}},{"id":"767faf9c-b73c-48c6-a69c-d3bf1b78e572","topic":"原地踏步，CPU和IO串行合作","expanded":true,"style":{"background":"#FF9595"}}]}]},{"id":"c7dd8e11-f099-421e-9fdf-1a2c63d81c59","topic":"举例：","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"70729f0e-666c-4959-ad22-06d1a0c7a879","topic":"OUT Rd, Rs","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"e1bd2365-0d00-4fe5-8867-2130defc8e24","topic":"数据线：","expanded":true,"children":[{"id":"16b03fec-762b-4315-94a9-a4a035a9dc7d","topic":"Rd中的数据传到数据总线上","expanded":true}]},{"id":"cd459636-b0cb-4322-85c5-64d41acfafbb","topic":"地址线：","expanded":true,"children":[{"id":"af6faef6-9c7e-4b90-a34f-92149ac9041a","topic":"把Rs的地址传到地址线上","expanded":true}]},{"id":"e9f321e5-8f55-48e3-9e8b-045ccaebbd1a","topic":"控制线：","expanded":true,"children":[{"id":"5b783f83-8769-4e5e-aa49-8fc24faa1240","topic":"指明操作是“写”","expanded":true}]}]},{"id":"801ac1b0-a9c6-4ed2-bf1b-f09c2db5634b","topic":"如果此时外设没有准备好，那么CPU就一直等待","expanded":true,"style":{"background":"#8EDE99"}}]},{"id":"9c2316b3-d65a-4cf9-ba02-42457775d5b9","topic":"特点：","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"00f74782-2ea2-4aaf-8506-a16f54fa1e98","topic":"快速设备不要用程序查询/程序中断！","expanded":true,"style":{"background":"#FF9595"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-cb59cd027dd3a1.png","width":461.09,"height":281.09}}]}]},{"id":"7dd5841e-5770-4986-bb76-4677d75069e0","topic":"程序中断方式","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"13717d81-f3f9-4440-9236-63bb43671604","topic":"大致流程：","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"3117a56b-9bb8-4b02-bb9f-bafef706b689","topic":"图：","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"d014b063-4c26-42de-8ab0-99946869c6eb","topic":"图示","expanded":true,"style":{"background":"#FDD834"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-eb6066e7d8d2d3.png","width":259.69,"height":373.02},"children":[{"id":"3fc78c61-4f53-445a-aee0-f47849fdd268","topic":"执行中断服务程序时可以被中断","expanded":true,"style":{"background":"#FF9595"}},{"id":"a42fd2bf-9d1c-4f1f-a76f-57d9a3a7e13e","topic":"如果去掉中间两个开关中断、屏蔽字、现场保护就是【单中断】","expanded":true}]}]},{"id":"803af67f-5b81-4a63-ba4f-9942beea1cce","topic":"中断请求","expanded":true,"icons":["priority:1"],"style":{"background":"#FDD834"},"children":[{"id":"b0de245f-a847-4ce8-bc37-19486f387504","topic":"中断源向CPU发送中断请求信号","expanded":true,"style":{"background":"#FDD834"}}]},{"id":"e25cbaa6-f583-4fab-bee7-8347259fd890","topic":"中断响应","expanded":true,"icons":["priority:2"],"style":{"background":"#FDD834"},"children":[{"id":"e54e982a-1fb3-4d13-874c-2ea67beec23a","topic":"1. CPU现在是否能够进行中断处理","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"b70901a6-f893-41e9-9a91-a891b353a484","topic":"通过PSW中的IF位来进行判断的，如果IF = 1，则表示允许中断，如果IF = 0，则表示不允许中断","expanded":true},{"id":"30f5dec7-eb1a-4843-b90e-a0b1accf7690","topic":"而系统中也有【非屏蔽中断】：","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"13fa59d4-c977-4770-bb74-371aea269970","topic":"例如掉电、关机等","expanded":true}]}]},{"id":"5d20e3c2-0896-48e7-8dd5-e19fa19c1e2b","topic":"2. CPU进行中断判优","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"db08afad-08ac-4e5d-9df1-17c6a2fae3e6","topic":"设置一系列的INTR（中断请求标记寄存器），给每一个外设都分配一个寄存器，如果寄存器值为 1，则说明进行了请求","expanded":true},{"id":"9cb4d356-5b5a-4005-a9f7-89e3fc1d10e9","topic":"在INTR中加入硬件排队器/查询程序，来获得当前的最优先请求","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-3d7d8f51987980.png","width":499.64,"height":212.82},"children":[{"id":"fb1a4c66-dab2-4288-96f1-a2b2396a810f","topic":"硬件排队器比查询程序速度快很多","expanded":true,"style":{"background":"#FDD834"}},{"id":"cdc67eb7-76c8-473a-8e2d-cb8da35eaa11","topic":"优先级的设置：","expanded":true,"children":[{"id":"ed1d26a7-d87e-49b5-b639-30acf695e457","topic":"硬件故障 > 软件故障","expanded":true},{"id":"fce47387-9169-4490-a155-66146655cdab","topic":"不可屏蔽中断 > 可屏蔽中断","expanded":true},{"id":"ebe03a18-0a83-48cb-8238-cb1c63527036","topic":"高速设备 > 低速设备","expanded":true,"children":[{"id":"2d896cdc-3950-447c-833e-c4b75727a4a7","topic":"DMA请求 > I/O请求","expanded":true}]},{"id":"3023ad4c-5fb3-42cf-9cf3-449186f78a35","topic":"输入设备 > 输出设备","expanded":true},{"id":"24dc35f1-a3b4-4eeb-8639-ab722332d162","topic":"实时设备 > 普通设备","expanded":true},{"id":"d2ba8270-850e-47e0-98dc-5d7d474d7aaa","topic":"举例：","expanded":true,"style":{"background":"#FFABD5"},"children":[{"id":"6039c46d-321e-4648-99d1-2d58cb9f4b55","topic":"强制关机 > 机器故障 > 访管 > 程序性 > 让OS控制重新启动","expanded":true,"style":{"background":"#FFABD5"}}]}]}]}]}]},{"id":"6a4ef1dc-5187-4d76-ae8a-5a812a778826","topic":"中断处理","expanded":true,"icons":["priority:3"],"style":{"background":"#FDD834"},"children":[{"id":"1ce7b241-5759-41cf-b936-23ae08d42d4f","topic":"1. 执行中断隐指令","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"5f431a50-922e-455a-8e2e-5faa592f0294","topic":"关中断","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"8bf49fac-48cb-43e3-9f6d-2d0216d8de30","topic":"启动关中断，使得下面操作不被中断","expanded":true,"style":{"background":"#FF9595"}}]},{"id":"3246dd56-cc76-44ab-819b-d3458f1d7409","topic":"保存断点","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"79883ae9-6fd7-4e97-b2bb-839e8597b9b2","topic":"把PC当前的值放入到CPU的内核堆栈区/指定存储单元中","expanded":true,"style":{"background":"#FF9595"}}]},{"id":"fd68d47a-9170-42ed-8c55-8c6a065386a3","topic":"引出中断服务程序","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"74e4ada8-6ef8-46f0-94e1-5121c7632f22","topic":"硬件向量法","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"f048c29d-9ce0-4054-a2e6-dc342b6e0e04","topic":"1. 根据硬件排队器的输出结果，每根线都只会对应一个【中断处理程序】","expanded":true,"style":{"background":"#FF9595"}},{"id":"5fd385ec-16a6-489e-992f-1cac48a19dcc","topic":"2. 通过一个【中断向量地址形成部件】获得排队器的输出结果写入到【向量地址】","expanded":true,"style":{"background":"#FF9595"}},{"id":"b5caa6bf-b5b1-4a7c-9761-79e4f00c979e","topic":"3. 通过【向量地址/中断类型号】找到主存中对应的【中断向量】","expanded":true,"style":{"background":"#FF9595"}},{"id":"3cc844fd-35ea-4493-a0a7-ca3ea5fbe22e","topic":"4. 【中断向量】指明了中断服务程序的【入口地址】","expanded":true,"style":{"background":"#FF9595"}}]},{"id":"993ffa29-23fd-4c08-a3d7-62b99ece25c6","topic":"软件查询法","expanded":true,"children":[{"id":"16d8efda-bcf9-4a50-99db-8a7ef415f84e","topic":"不过多介绍","expanded":true}]}]}]},{"id":"357c8101-2731-4ff5-9488-0a3f8a0b8f6f","topic":"2. 找到对应的中断服务\n程序，并执行","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"e9427883-a293-4f9c-af11-522a1bb1c5b8","topic":"保护现场","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"a0105e4f-215f-4210-854c-43d504cde524","topic":"保护寄存器、PSW、ACC等等，把这些压入堆栈","expanded":true,"style":{"background":"#FDD834"}}]},{"id":"3ceac2f4-ac9d-4ee8-9b8e-0d931e19d2f0","topic":"中断服务","expanded":true,"children":[{"id":"97ab4533-ac75-4dfa-a33e-98206650fa35","topic":"运行中断服务程序","expanded":true}]},{"id":"99f798c1-ccfd-483d-8e39-921634d19c99","topic":"恢复现场","expanded":true,"children":[{"id":"7479c6d5-b5d6-4cd9-aa80-f4446493829e","topic":"弹出数据，恢复数据","expanded":true}]},{"id":"c22b23d1-96d4-47d7-9c14-c15c52260414","topic":"中断返回","expanded":true,"children":[{"id":"18a56703-119b-4a8b-a6da-d3cc789414a2","topic":"弹出PC，恢复PC","expanded":true}]}]}]},{"id":"c874d073-b0d2-4cdc-910d-eeb62cc4a63d","topic":"PSW到底在哪里保存？？？","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"33e09cf3-3af6-484d-bb08-a98885d0401d","topic":"《计算机组成原理》第3版，唐朔飞","expanded":true,"style":{"background":"#8EDDF9"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-7c00f000c9cb11.png","width":190.81,"height":190.81},"children":[{"id":"e82bc25b-9026-49da-95ec-d1c50561c2dd","topic":"图示","expanded":true,"style":{"background":"#8EDDF9"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-5684108611e85c.png","width":510.47,"height":86.99}},{"id":"08717d30-0ba8-4bfe-9c23-9a454a6ec2c7","topic":"图示","expanded":true,"style":{"background":"#8EDDF9"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-a75fc3ac086bb4.png","width":518.99,"height":171.2}}]},{"id":"06b89819-42f1-4888-b30b-ced9e5738707","topic":"《计算机操作系统》第4版，汤小丹","expanded":true,"style":{"background":"#8EDE99"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-75785ed63eacd5.png","width":191.48,"height":191.48},"children":[{"id":"e757beb9-74ae-48d5-be32-4b5ef9be0dd4","topic":"图示","expanded":true,"style":{"background":"#8EDE99"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-c0616585871a9e.png","width":516.86,"height":326.17}}]},{"id":"7e74b9fd-e6c9-4c4a-aaab-f4c1176f22b4","topic":"*应该是不会考的","expanded":true,"icons":["emoji:💬"],"style":{"borderStyle":"dashed","borderColor":"#F59E0B"}}]}]},{"id":"2368d785-22af-4890-9838-527c64c38a5b","topic":"多重中断与屏蔽字","expanded":true,"children":[{"id":"c169db0a-b52f-4ab2-8eca-e78fc1514c76","topic":"多重中断：","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"8088fc3e-321b-4399-94a7-7eb4392eea98","topic":"在中断处理程序中，在执行中断处理程序时，选择为在【开中断模式】下执行，同时保存【程序的屏蔽字】","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"23f5a8aa-b291-4a08-a66f-542f7aca6305","topic":"这样就可以使得在低级中断处理中如果遇到了更高级的中断处理请求，也可以执行","expanded":true}]},{"id":"8c3e16ef-f594-46b7-9b0b-dbf767133deb","topic":"硬件排队器的改进：","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"527068c3-8c37-4a25-b6bb-084d89c78026","topic":"MASK为该中断的中断屏蔽字","expanded":true,"style":{"background":"#8EDE99"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-bec1ceeb92653e.png","width":384.44,"height":285.61},"children":[{"id":"3dd8427e-8413-44d4-bc47-8a93f586a507","topic":"先屏蔽，在排队","expanded":true,"children":[{"id":"ce1af31a-f8b1-42f2-bdce-7407faa9ab39","topic":"图示","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-cd6e6d2b78a21f.png","width":498.07,"height":239.16}}]},{"id":"6e75eae4-7202-432c-a119-98464295ad93","topic":"中断屏蔽字如果为‘ 1’，则说明要屏蔽对应的中断","expanded":true},{"id":"deee4eb8-abb8-44c1-a589-846887644df7","topic":"如果为’0‘，则说明不需要屏蔽对应的中断","expanded":true},{"id":"2796a2fd-3c5c-428a-954a-abfc7aa874ee","topic":"屏蔽吗？ 1 -> 屏蔽 ， 0 -> 不屏蔽","expanded":true}]}]}]},{"id":"56c2c510-7544-4ce3-9e0d-b86fa1027853","topic":"一个混淆项：","expanded":true,"style":{"background":"#FFABD5"},"children":[{"id":"37672ee6-d09c-48f6-bb74-664b509b78fb","topic":"中断请求优先级","expanded":true,"icons":["priority:1"],"style":{"background":"#FFABD5"},"children":[{"id":"5dedb84a-ada5-439a-b02f-a6109528a934","topic":"请求决定","expanded":true}]},{"id":"729e2ca2-ba69-4059-a526-53a89dd99ee6","topic":"中断响应优先级","expanded":true,"icons":["priority:2"],"style":{"background":"#FFABD5"},"children":[{"id":"d9753006-4372-4625-80d7-1297419937c4","topic":"硬件决定","expanded":true}]},{"id":"a0ba817e-9c1b-4972-8563-fdad48c01d7e","topic":"中断处理优先级","expanded":true,"icons":["priority:3"],"style":{"background":"#FFABD5"},"children":[{"id":"097560a8-35dc-41e5-85f8-6a9220185f03","topic":"屏蔽字决定","expanded":true}]}]}]}]}]},{"id":"fd8cb741-894c-4c1a-985e-f647bd7dabda","topic":"DMA方式","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-8cf60cc9ea3acb.svg","width":64,"height":64},"children":[{"id":"7514d9c1-3ced-4c58-80d4-2822c795c0ed","topic":"考频：超高","expanded":true,"style":{"background":"#BA69C8"},"children":[{"id":"8f2b26c5-875b-4bae-8f39-2b9dcaba8fa1","topic":"09、10、11*2、12-15、17、18、19*2、20*3、21、22、09大、12大、16大、18大、22大","expanded":true}]},{"id":"c62626cc-0754-4926-b319-5e2f995a8553","topic":"形如：","expanded":true,"children":[{"id":"48af97fa-3d50-4db8-bd81-7421bcc77618","topic":"图示","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-5125bc07249151.png","width":264,"height":161}}]},{"id":"9ba85c94-0524-447a-a719-4a49a197d7ca","topic":"OS中的内容","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"18642e9c-f0bc-414c-a803-d4eedf5e0c60","topic":"CPU向DMA控制器指明要输入or输出，然后指明 1. 要传送多少个数据（块） 2. 主存地址、外设中的地址","expanded":true,"style":{"background":"#8EDE99"}}]},{"id":"80ce0227-e701-4ca5-8a37-aab2ea245c77","topic":"DMAC","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"5ab479b1-14e4-414a-a7ba-ea3a240bb024","topic":"（单总线结构）","expanded":true,"style":{"background":"#FDD834"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-ef9b5e331e1215.png","width":566.52,"height":376.34},"children":[{"id":"87e4b8b2-0db3-408d-befa-00acf735e751","topic":"HRQ","expanded":true,"children":[{"id":"51f0e1ab-26f4-48c4-8a34-ee36cdcb8a44","topic":"DMA发送的总线请求","expanded":true}]},{"id":"05103407-ef65-4c5b-8c84-03fa61159d87","topic":"HLDA","expanded":true,"children":[{"id":"3c83073e-a568-4a5d-928c-7cbbffa876e2","topic":"CPU将总线控制权交给DMAC","expanded":true}]},{"id":"8de2b392-c7e6-408b-a678-a2ce6a467f5d","topic":"控制/状态逻辑","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"57b6c732-8e0d-488c-903d-aa7f73d2c207","topic":"控制/时序电路，指定每一步应该进行的操作","expanded":true}]},{"id":"ee1afe50-f896-4145-94e4-a59d861e71f7","topic":"DMA请求触发器","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"e9612f4f-cb9f-425d-bb79-8341982a6437","topic":"当【设备】输入完成了一个字的数据，就给DMA请求触发器发出一个控制信号，使DMA请求触发器置位（改为 1）","expanded":true,"children":[{"id":"e7f3c0bd-d803-4eb0-b42c-a13132a58b6d","topic":"所以是外设发出的DMA请求","expanded":true,"style":{"background":"#FFABD5"},"children":[{"id":"29cb80a2-fe0c-4271-ac67-a77eff6eeae4","topic":"图示","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-f9ffc78f745d2f.png","width":330.14,"height":86.9}}]}]}]},{"id":"91e1ecd1-f580-4ce3-8d26-1f51cfc55e4a","topic":"主存地址计数器(AR)","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"8e849662-9ced-4aa4-a733-56175819fafa","topic":"存放交换数据的主存地址","expanded":true}]},{"id":"8c12cb5b-f027-4f58-ae19-e7e0c88d2401","topic":"传送长度计数器(WC)","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"1cab9828-43c4-4915-ad84-85c90bf9f38c","topic":"用来数数的，记录剩余需要传送数/已传送数目，计数溢出时自动发出中断请求","expanded":true}]},{"id":"1a4d9ac8-2664-420d-ab3b-c128db1d090d","topic":"目的地址计数器(DAR)","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"f57f5587-cb83-4860-9d85-f366d8259d53","topic":"记录交换数据在IO中的地址","expanded":true}]},{"id":"8858c7e7-a453-4872-acf5-c12b1ad54989","topic":"数据缓存寄存器(DR)","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"86b95a07-060f-4404-85ec-b24807cb1a3a","topic":"用于暂存每次传送的数据（输入输出的数据都先放到这里）","expanded":true}]},{"id":"5965b4f0-253b-4c54-b6f9-fdcb98b021c5","topic":"中断机构","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"0030ba3a-bf0b-48ac-b6a6-a5150fa64b70","topic":"传送长度计数器通过发送溢出信号来控制中断机构何时发出中断请求","expanded":true}]}]}]},{"id":"0a6bc1a9-3d17-42e4-a4bf-02bd50b8fe15","topic":"DMA传送过程","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"613b27fb-8420-4ad7-8585-7f53d2689d1b","topic":"预处理：\n（CPU设置）\n主存起始地址 -> AR\nI/O设备地址 -> DAR\n传送数据个数 -> WC\n启动I/O设备","expanded":true,"style":{"background":"#FDD834"}},{"id":"4b186c17-e5cb-41c8-a691-aec20afda4ea","topic":"数据传输：\n继续执行主程序\n同时完成一批数据的传送","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"db201527-08cc-4b6a-9619-ab352227f172","topic":"1. DMA把数据放入到DR中","expanded":true,"style":{"background":"#8EDDF9"}},{"id":"dd9fa271-3d4c-4c53-a40c-8fd0d8fc4af9","topic":"2. DR写满后设备向DMA请求触发器置为 1","expanded":true,"style":{"background":"#8EDDF9"}},{"id":"d0d4b769-0b93-4576-9646-da1ec9d5359d","topic":"3. 控制/状态逻辑收到DMA请求触发器的信号，向CPU发送一个HRQ信号","expanded":true,"style":{"background":"#8EDDF9"}},{"id":"69b04f7c-696c-4a28-a213-cc780415d8f3","topic":"4. CPU如果此时系统总线空闲，就发送一个HLDA信号给DMAC","expanded":true,"style":{"background":"#8EDDF9"}},{"id":"2deae3b8-9d79-459f-a967-7f46cab798a8","topic":"5. 此时DMAC开始接管总线","expanded":true,"style":{"background":"#8EDDF9"}},{"id":"d2f2bccb-aa04-4774-82c8-510ab27d320c","topic":"6. DMAC不断向总线上发出数据传送，每次发送一个字，不断地修改AR、WC、DAR的值","expanded":true,"style":{"background":"#8EDDF9"}},{"id":"7c8080c2-1e29-4eba-838a-69eae961357c","topic":"7. 当WC的值溢出时，WC向中断机构发出溢出信号，中断机构给CPU发送中断请求，指明已经完成传输","expanded":true,"style":{"background":"#8EDDF9"}}]},{"id":"b4e9caca-3908-4140-bd5c-1c0e6fdc88ca","topic":"后处理：\n中断服务程序\n做DMA结束处理","expanded":true,"style":{"background":"#FDD834"}},{"id":"ce1aaae6-c34d-4cf7-bc6e-541894eb8d99","topic":"内存 -> 数据总线 -> DMAC -> 外设","expanded":true,"style":{"background":"#FFABD5"},"children":[{"id":"86b086a4-88ee-4ed4-b85b-5a1439171967","topic":"叫做：数据通路","expanded":true,"style":{"background":"#FFABD5"}}]}]},{"id":"6fcea0ad-9142-4fc5-a4bb-dcb0605d6c15","topic":"和程序控制、程序中断的区别","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"b51c9343-c5cb-485d-89cb-a9d1e00f7801","topic":"1. DMA方式不需要CPU参与数据的搬运，CPU只是被剥夺了总线的访问权，依然可以在CPU中进行其他操作（前面两种CPU需要参与到数据运输）","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"40225faf-afdc-4adf-a4ca-651f20ead9fe","topic":"DMA传送阶段\n时的CPU","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"dbb30122-27be-4683-a035-6a819ef50198","topic":"DMA与主存进行数据传输的阶段，会让CPU的主存控制信号被禁止使用。只有DMA传送结束后，才可以恢复CPU的主存控制信号","expanded":true,"style":{"background":"#FDD834"}}]}]},{"id":"29736b05-fbf9-4265-8e8a-4c8e51b601c0","topic":"2. DMA方式申请一次可以进行传输的数据量是一个块（前面两种只能申请一次传输一个字）","expanded":true,"style":{"background":"#8EDDF9"}}]},{"id":"8f9d2736-e4e2-4483-9d15-0fc165c65813","topic":"总线结构","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"ada3c000-7566-43a4-a8a1-219b6c2ce71f","topic":"如果采用单总线结构，那么CPU和主存、主存和DMA的交互是冲突的","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"091acf83-b116-4ed9-b8f4-8cc40dcfd9ea","topic":"CPU决定了是否把总线的控制权交给DMA","expanded":true}]},{"id":"2a53c36f-a606-4136-b5d2-475f45143222","topic":"优化  ↓","expanded":true,"style":{"background":"#FDD834"}},{"id":"461806e4-fbd2-4fb3-9617-67458a122e94","topic":"采用三总线结构，可以使IO和主机并行工作","expanded":true,"style":{"background":"#FDD834"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-b67aa3b2638499.png","width":310.49,"height":97.56},"children":[{"id":"cea99a40-ea11-4eb2-8c4f-6921afbc6bf5","topic":"现在的计算机基本都有DMA总线的","expanded":true,"style":{"background":"#FDD834"}},{"id":"c19ac22b-a825-47ed-a329-9325b74644b9","topic":"【如果主存不是双端口主存】且此时如果CPU和DMA同时都想要访问主存，该怎么办？","expanded":true,"style":{"background":"#8EDE99"}}]}]},{"id":"1c9a4511-7894-4b4b-bf2b-2534697e3c33","topic":"CPU的DMA的访问冲突：","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"cf7f5ab5-1730-4e39-b78a-486a5d5b8a26","topic":"方法一：DMA访问时主存不访问","expanded":true,"style":{"background":"#8EDE99"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-053261b8f6bb82.png","width":366.19,"height":118.99},"children":[{"id":"d05a65a9-c625-414e-aa7d-e480a791c0f8","topic":"还不如不用三总线呢","expanded":true,"style":{"background":"#8EDE99"}}]},{"id":"5cf183df-30c9-4593-9f65-db201e876717","topic":"方法二：DMA和主存始终交替访问","expanded":true,"style":{"background":"#8EDE99"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-665b38e1deb0b3.png","width":367.49,"height":153.73},"children":[{"id":"f355c4c5-1c79-4246-b620-17a422acc990","topic":"不需要总线使用权的申请、建立和归还过程","expanded":true},{"id":"8481ded2-bf60-4dd5-b649-bb07d9026d3a","topic":"硬件逻辑更为复杂","expanded":true},{"id":"de55d792-dd8c-4a06-955a-9266a1443add","topic":"交替轮着来","expanded":true,"style":{"background":"#8EDE99"}}]},{"id":"ee5c4f91-c4ff-471e-8623-e24908f4d49e","topic":"方法三：周期窃取","expanded":true,"style":{"background":"#FDD834"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-e164c2d77094da.png","width":375.22,"height":128.42},"children":[{"id":"95cf54c2-3150-4bfd-9bf6-05dd5427b5a9","topic":"DMA访问主存的三种可能：","expanded":true,"children":[{"id":"1c7c686e-bec3-4cbb-aa4d-96fd77f2da68","topic":"CPU不访存","expanded":true,"children":[{"id":"3d430c59-0852-41bf-a2c6-deed33f8df9a","topic":"不冲突","expanded":true}]},{"id":"29f3925b-29fa-49c6-969e-6b9c42a4369b","topic":"CPU正在访存","expanded":true,"children":[{"id":"83db3937-95fb-402a-8020-529be5052a36","topic":"存取周期结束让出总线","expanded":true}]},{"id":"d74391a5-4327-4e40-8b74-96609c84c48c","topic":"CPU和DMA同时请求","expanded":true,"children":[{"id":"c92d3bad-2179-412f-ba2e-9bd8ae111ac6","topic":"I/O访存优先","expanded":true}]}]},{"id":"034465de-67f9-489d-87b8-1e190dee525d","topic":"IO优先就完事了","expanded":true,"style":{"background":"#FDD834"}}]}]},{"id":"8c57f129-cc5f-49fb-a338-09ca0ce6cae5","topic":"DMA与中断的对比：","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"420bd9d6-998b-4f47-a412-245e00b486a9","topic":"图示","expanded":true,"style":{"background":"#FF9595"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-d17d12f1dd9017.png","width":544.7,"height":284.86},"children":[{"id":"a89affc0-38af-44ab-b0b0-348761d637bb","topic":"适用范围","expanded":true,"style":{"background":"#FFABD5"},"children":[{"id":"f1a36186-785d-4dff-9ca1-69087f14bdf9","topic":"中断低速","expanded":true,"style":{"background":"#FFABD5"},"children":[{"id":"f5854e63-c63d-4ffb-a078-6ece06d83c22","topic":"因为如果是高速设备一直请求程序中断，最后会占用大量的CPU时间","expanded":true}]},{"id":"85269af6-540f-48bf-a68f-da7171b7a7fd","topic":"DMA高速","expanded":true,"style":{"background":"#FFABD5"}}]},{"id":"f1dc4c6e-1b5c-44b3-88fe-6b938a2e2069","topic":"数据传输","expanded":true,"style":{"background":"#FFABD5"},"children":[{"id":"9a72475a-9afa-4339-a9a0-b7a504a9ac1c","topic":"中断程序","expanded":true,"style":{"background":"#FFABD5"}},{"id":"94863b71-d135-4d55-9998-71a9fbacd801","topic":"DMA硬件","expanded":true,"style":{"background":"#FFABD5"}}]}]},{"id":"fd376126-0931-4472-96c5-6d2f4c849ffa","topic":"何时检测中断","expanded":true,"style":{"background":"#FFABD5"},"children":[{"id":"acdcb313-d588-4b28-8bab-963cda96749c","topic":"DMA：","expanded":true,"style":{"background":"#FFABD5"},"children":[{"id":"52cb0c95-c2b6-4958-93b4-119d02cf0da1","topic":"在【存取周期】末尾检测","expanded":true,"style":{"background":"#FFABD5"},"children":[{"id":"90003bf6-662f-4550-8097-dfe401655598","topic":"例如：取指指令的后半部分不涉及访问Cache/主存，则可以用来进行DMA","expanded":true}]}]},{"id":"24fee203-0c5f-4e06-8dc4-a1783f967b00","topic":"程序中断：","expanded":true,"style":{"background":"#FFABD5"},"children":[{"id":"dfd02fd2-8ad1-4d04-bb0e-1f02363198eb","topic":"在指令周期末尾","expanded":true}]}]}]}]},{"id":"b5de2366-0697-4c0e-bb57-a8f230fe1bd0","topic":"END","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-b5376195b1f162.svg","width":64,"height":64}}]},"relations":[{"id":"233a7f7b-3b68-4ffc-addf-59b3f57e2a31","from":"e9612f4f-cb9f-425d-bb79-8341982a6437","to":"57b6c732-8e0d-488c-903d-aa7f73d2c207","bidirectional":false,"label":"就可以通知控制\n状态逻辑了"},{"id":"a2cb76d6-522a-438b-80f5-7c4508c2562d","from":"1cab9828-43c4-4915-ad84-85c90bf9f38c","to":"0030ba3a-bf0b-48ac-b6a6-a5150fa64b70","bidirectional":false,"label":"溢出信号"},{"id":"2b47dd65-2879-42fa-bf0b-5d3e60523e50","from":"b51c9343-c5cb-485d-89cb-a9d1e00f7801","to":"ada3c000-7566-43a4-a8a1-219b6c2ce71f","bidirectional":false},{"id":"9ddcf342-64b3-4496-a89c-ad560361d365","from":"c19ac22b-a825-47ed-a329-9325b74644b9","to":"1c9a4511-7894-4b4b-bf2b-2534697e3c33","bidirectional":false},{"id":"fb559e97-1c33-4e18-9f9b-7d59992cd272","from":"efed1bac-6d58-4e0f-98ac-747eefd235b0","to":"0870f11d-1881-4999-b74c-7f1c0f04b2e0","bidirectional":false}],"summaries":[{"id":"b1700a56-7b34-4351-8ec7-59935cd0d7fd","parentId":"88c44a97-2d14-4144-afea-3f8a61a47d20","start":0,"end":3,"label":"【数据寄存器】\n【控制寄存器】\n【状态寄存器】\n【地址线】\n【控制线】"},{"id":"cd5c5590-c1e4-4be2-a18e-0195936c58af","parentId":"efed1bac-6d58-4e0f-98ac-747eefd235b0","start":1,"end":2,"label":"软件中断"},{"id":"796492d4-74b2-4283-8954-150419481666","parentId":"efed1bac-6d58-4e0f-98ac-747eefd235b0","start":3,"end":3,"label":"硬件中断"},{"id":"03add8e7-6955-432e-b0c9-41a543519baf","parentId":"70729f0e-666c-4959-ad22-06d1a0c7a879","start":0,"end":2,"label":"预置传送参数"},{"id":"89dfc88b-0be4-47c5-b0f6-35facfefd90d","parentId":"74e4ada8-6ef8-46f0-94e1-5121c7632f22","start":1,"end":2,"label":""},{"id":"c32f69bb-dd25-4936-8286-aa4621dcdf3a","parentId":"33e09cf3-3af6-484d-bb08-a98885d0401d","start":0,"end":1,"label":"结论：PC用硬件，PSW和通用寄存器用软件"},{"id":"3c635f41-e6d5-40e1-8c5a-47949bb6a447","parentId":"06b89819-42f1-4888-b30b-ced9e5738707","start":0,"end":0,"label":"结论：PC、PSW都用硬件"},{"id":"41d943a6-bfb5-4f87-a8a0-6319976986f5","parentId":"527068c3-8c37-4a25-b6bb-084d89c78026","start":1,"end":2,"label":"对角线单独记忆（自己不能中断自己）"},{"id":"f5c4353f-de64-4134-8b5a-f623ec63b4aa","parentId":"2368d785-22af-4890-9838-527c64c38a5b","start":1,"end":1,"label":""},{"id":"12edc92e-9e86-49c0-b7b0-940451bbd303","parentId":"5ab479b1-14e4-414a-a7ba-ea3a240bb024","start":4,"end":5,"label":"这两个的总线上有一个+1，是由控制状态逻辑发出的自动加一操作"},{"id":"4d850f3f-8b1e-4419-8e1d-272dc962a41a","parentId":"0a6bc1a9-3d17-42e4-a4bf-02bd50b8fe15","start":1,"end":1,"label":""},{"id":"679820ad-c210-4655-8899-526e1b0b075b","parentId":"420bd9d6-998b-4f47-a412-245e00b486a9","start":1,"end":1,"label":"通道是一种硬件 + 程序的数据传输方式"}],"boundaries":[{"id":"a7ebb556-20b8-457f-97a7-860008acc142","parentId":"81e50542-794f-4763-ada6-226fc0078e93","start":1,"end":1,"label":"理解并记忆"}]}}}]}}