Step 9 of self-writing the CPU (5) -- load the Storage Command 4 (modify the top-level module of OpenMIPS)

Source: Internet
Author: User

I will upload a new book "write CPU by yourself", which is 44th today.

There have been many things over the past few days and they have not been updated for a long time.


9.3.4 modify the top-level OpenMIPS module

Because some modules have added interfaces, you need to modify the top-level module OpenMIPS to connect the new interfaces. At the same time, we can see from Figure 9-19 that the MEM module has added several interfaces for data storage, and these interfaces are connected to the OpenMIPS external, so the interfaces of the OpenMIPS module have to be modified, the newly added interfaces are shown in Table 9-6. The modified OpenMIPS processor interface is shown in Figure 9-23. You can compare them with Figure 4-6.


To modify the OpenMIPS module, connect the data storage interface in Table 9-6 to the interface corresponding to the MEM module. The main changes are as follows. For the complete Code, see the openmips. v file under the CD Code \ Chapter9_1 directory.

Module openmips (inputwire clk, input wire rst, input wire ['regbus] rom_data_ I, output wire ['regbus] rom_addr_o, // New interface, connect to the data storage RAM input wire ['regbus] ram_data_ I, output wire ['regbus] ram_addr_o, output wire ['regbus] ram_data_o, output wire ram_we_o, output wire [] ram_sel_o, output wire ram_ce_o );...... // modify the sample statement of the MEM module. // The objective is to connect the data storage interface in Table 9-6 with the corresponding interface of the MEM module mem mem0 (...... // information from data storage. mem_data_ I (ram_data_ I ),...... // information sent to the data storage. mem_addr_o (ram_addr_o ),. mem_we_o (ram_we_o ),. mem_sel_o (ram_sel_o ),. mem_data_o (ram_data_o ),. mem_ce_o (ram_ce_o ));...... endmodule

In the next step, we will modify the smallest part of the system to verify that the storage commands are correctly loaded.

Step 9 of self-writing the CPU (5) -- load the Storage Command 4 (modify the top-level module of OpenMIPS)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.