diff --git a/Makefile b/Makefile index 11e58b5..d80f37b 100644 --- a/Makefile +++ b/Makefile @@ -5,9 +5,9 @@ VERILATOR_CFLAGS += -MMD -Wall --build -cc -Wno-lint \ # include path INC_PATH ?= -# files of emu +# files of the RTL project TOPNAME ?= top -DIR ?= $(NVBOARD_HOME)/emu +DIR ?= $(NVBOARD_HOME)/example OBJ_DIR = $(DIR)/obj_dir # generated executable file @@ -48,4 +48,4 @@ run: $(DST_BIN) cons clean: rm -rf $(OBJ_DIR) -.PHONY: clean run cons \ No newline at end of file +.PHONY: clean run cons diff --git a/README.md b/README.md index c62852c..f875b42 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ NVBoard(NJU Virtual Board)是基于SDL开发的虚拟FPGA开发板,可以在Ve . ├── board 开发板配置文件 │ └── ... -├── emu 演示项目目录 +├── example 示例项目 │ └── ... ├── include │   ├── at_scancode.h @@ -44,7 +44,7 @@ NVBoard(NJU Virtual Board)是基于SDL开发的虚拟FPGA开发板,可以在Ve ## 示例 -本项目下的emu是一个演示项目,在该目录下通过 `make run` 命令可运行该项目。 +`example`目录下包含一个示例项目,在该目录下通过 `make run` 命令可运行该项目。 ## 使用说明 diff --git a/emu/src/README.md b/emu/src/README.md deleted file mode 100644 index e79a411..0000000 --- a/emu/src/README.md +++ /dev/null @@ -1,2 +0,0 @@ -# 注意 -emu添加了新的图像rom文件,直接在$NVBOARD_HOME运行 `make run` 会找不到该文件,因此需要cd到emu文件夹下 diff --git a/emu/src/clkgen.v b/emu/src/clkgen.v deleted file mode 100644 index f00005c..0000000 --- a/emu/src/clkgen.v +++ /dev/null @@ -1,30 +0,0 @@ -module clkgen ( - input clkin, - input rst, - input clken, - output reg clkout -); - - parameter clk_freq = 1000; - parameter countlimit = 50000000/2/clk_freq; - - reg [31:0] clkcount; - always @(posedge clkin) begin - if(rst)begin - clkcount <= 0; - clkout <= 1'b0; - end - else begin - if(clken)begin - if(clkcount + 1 == countlimit)begin - clkcount <= 32'd0; - clkout <= ~clkout; - end - else begin - clkcount <= clkcount + 1; - end - end - end - end - -endmodule diff --git a/emu/.gitignore b/example/.gitignore similarity index 100% rename from emu/.gitignore rename to example/.gitignore diff --git a/emu/Makefile b/example/Makefile similarity index 100% rename from emu/Makefile rename to example/Makefile diff --git a/example/src/README.md b/example/src/README.md new file mode 100644 index 0000000..ae1c4eb --- /dev/null +++ b/example/src/README.md @@ -0,0 +1,2 @@ +# 注意 +添加了新的图像rom文件,直接在$NVBOARD_HOME运行 `make run` 会找不到该文件,因此需要cd到emu文件夹下 diff --git a/emu/src/main.cpp b/example/src/main.cpp similarity index 100% rename from emu/src/main.cpp rename to example/src/main.cpp diff --git a/emu/src/picture.hex b/example/src/picture.hex similarity index 100% rename from emu/src/picture.hex rename to example/src/picture.hex diff --git a/emu/src/ps2_keyboard.v b/example/src/ps2_keyboard.v similarity index 100% rename from emu/src/ps2_keyboard.v rename to example/src/ps2_keyboard.v diff --git a/emu/src/seg.v b/example/src/seg.v similarity index 100% rename from emu/src/seg.v rename to example/src/seg.v diff --git a/emu/src/test.v b/example/src/test.v similarity index 100% rename from emu/src/test.v rename to example/src/test.v diff --git a/emu/src/top.cons b/example/src/top.cons similarity index 100% rename from emu/src/top.cons rename to example/src/top.cons diff --git a/emu/src/top.v b/example/src/top.v similarity index 100% rename from emu/src/top.v rename to example/src/top.v diff --git a/emu/src/vga_ctrl.v b/example/src/vga_ctrl.v similarity index 100% rename from emu/src/vga_ctrl.v rename to example/src/vga_ctrl.v