> ## Content Index
> Fetch the complete content index at: https://cms.yufeiran.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# 用Nexys4 DDR 制作一台计算机[0] 总体
- URL: https://cms.yufeiran.com/yong-nexys4ddr-zhi-zuo-yi-tai-ji-suan-ji/
- Published: 2020-05-29T02:53:42.000Z
- Updated: 2026-09-27T12:38:01.000Z
- Author: Feiran Yu
- Tags: 作品, #legacy-import

## 0 简介

这个项目源于一个很朴素的想法：做一台**完整的计算机**。  
完整的计算机一共包含四个部分：**硬件**，**操作系统**，**编译器**，**应用程序**  
(本项目是长期项目，包含大量未填完的坑，不定期更新)

### 0.1 \[完整的计算机\]的意思

具有基本的硬件，如TLB,SPI FLASH,DDR 2 RAM  
具有基础的输入输出，如键盘，显示器  
具有一个基本的操作系统，拥有如进程切换，文件系统  
可以运行基本的c语言程序

## 索引

1. [总体](https://yufeiran.com/yong-nexys4ddr-zhi-zuo-yi-tai-ji-suan-ji/?ref=cms.yufeiran.com)
2. [硬件](https://yufeiran.com/yong-nexys4ddr-zhi-zuo-yi-tai-ji-suan-ji-1/?ref=cms.yufeiran.com)
3. [操作系统](https://yufeiran.com/yong-nexys4ddr-zhi-zuo-yi-tai-ji-suan-ji-2-cao-zuo-xi-tong-she-ji/?ref=cms.yufeiran.com)
4. 应用

以下是完整的计算机的每个部分的具体设计

## 1 硬件：

![1132884-20180713171537631-1809727816-1](https://yufeiran.com/content/images/2021/01/1132884-20180713171537631-1809727816-1.png)

  
使用FPGA开发板Nexys4DDR：CPU+内存+硬盘+总线 [OpenMIPS](https://github.com/yufeiran/OpenMIPS?ref=cms.yufeiran.com)  
键盘，VGA显示器：作为系统的输入与输出

### 1.1 Nexys4 DDR的简介

![nexys-4-ddr-0](https://yufeiran.com/content/images/2021/01/nexys-4-ddr-0.png)

  
这是一块在学生群体中比较常见的一块FPGA开发板，具有包含一块128MB的DDR2 内存芯片在内的丰富外设  
官方文档 [Nexys 4 DDR \[Digilent Documentation\]](https://reference.digilentinc.com/reference/programmable-logic/nexys-4-ddr/start?ref=cms.yufeiran.com)  
本项目计划使用该开发板制作一个可以运行C语言程序的计算机

## 2 操作系统：

![BatchOS-1](https://yufeiran.com/content/images/2021/01/BatchOS-1.jpg)

  
使用类unix操作系统  
对硬件进行管理，运行应用程序

## 3 编译器：

![compileProcess-1](https://yufeiran.com/content/images/2021/01/compileProcess-1.jpg)

  
计划使用一个精简C语言编译器，使用原先CMin项目改进版本[CMin](https://github.com/B266/CMin?ref=cms.yufeiran.com)

## 4 应用程序：

![3d](https://yufeiran.com/content/images/2021/01/3d.png)

  
运行一个3D渲染的程序 类似[yufeiran/3D\_Engine](https://github.com/yufeiran/3D%5FEngine?ref=cms.yufeiran.com)

## 5 参考

[Nexys 4 DDR - Getting Started with Microblaze](https://reference.digilentinc.com/learn/programmable-logic/tutorials/nexys-4-ddr-getting-started-with-microblaze/start?ref=cms.yufeiran.com)  
[Nexys 4 DDR Music Looper](https://reference.digilentinc.com/learn/programmable-logic/tutorials/nexys-4-ddr-looper-demo/start?tdsourcetag=s%5Fpctim%5Faiomsg&ref=cms.yufeiran.com)  
[《计算机系统要素》](https://book.douban.com/subject/1998341//?ref=cms.yufeiran.com)  
[《CPU自制入门》](https://book.douban.com/subject/25780703/?ref=cms.yufeiran.com)  
[《自己动手写CPU》](https://book.douban.com/subject/25960657/?ref=cms.yufeiran.com)

[Run your own RISC-V on FPGA Nexys4-DDR platform \[油管搬运\]](https://www.bilibili.com/video/BV1tf4y197ay?zw&ref=cms.yufeiran.com)