rename emu to example
This commit is contained in:
parent
2cb2efbb07
commit
fb002414ea
6
Makefile
6
Makefile
|
@ -5,9 +5,9 @@ VERILATOR_CFLAGS += -MMD -Wall --build -cc -Wno-lint \
|
||||||
# include path
|
# include path
|
||||||
INC_PATH ?=
|
INC_PATH ?=
|
||||||
|
|
||||||
# files of emu
|
# files of the RTL project
|
||||||
TOPNAME ?= top
|
TOPNAME ?= top
|
||||||
DIR ?= $(NVBOARD_HOME)/emu
|
DIR ?= $(NVBOARD_HOME)/example
|
||||||
OBJ_DIR = $(DIR)/obj_dir
|
OBJ_DIR = $(DIR)/obj_dir
|
||||||
|
|
||||||
# generated executable file
|
# generated executable file
|
||||||
|
@ -48,4 +48,4 @@ run: $(DST_BIN) cons
|
||||||
clean:
|
clean:
|
||||||
rm -rf $(OBJ_DIR)
|
rm -rf $(OBJ_DIR)
|
||||||
|
|
||||||
.PHONY: clean run cons
|
.PHONY: clean run cons
|
||||||
|
|
|
@ -12,7 +12,7 @@ NVBoard(NJU Virtual Board)是基于SDL开发的虚拟FPGA开发板,可以在Ve
|
||||||
.
|
.
|
||||||
├── board 开发板配置文件
|
├── board 开发板配置文件
|
||||||
│ └── ...
|
│ └── ...
|
||||||
├── emu 演示项目目录
|
├── example 示例项目
|
||||||
│ └── ...
|
│ └── ...
|
||||||
├── include
|
├── include
|
||||||
│ ├── at_scancode.h
|
│ ├── at_scancode.h
|
||||||
|
@ -44,7 +44,7 @@ NVBoard(NJU Virtual Board)是基于SDL开发的虚拟FPGA开发板,可以在Ve
|
||||||
|
|
||||||
## 示例
|
## 示例
|
||||||
|
|
||||||
本项目下的emu是一个演示项目,在该目录下通过 `make run` 命令可运行该项目。
|
`example`目录下包含一个示例项目,在该目录下通过 `make run` 命令可运行该项目。
|
||||||
|
|
||||||
## 使用说明
|
## 使用说明
|
||||||
|
|
||||||
|
|
|
@ -1,2 +0,0 @@
|
||||||
# 注意
|
|
||||||
emu添加了新的图像rom文件,直接在$NVBOARD_HOME运行 `make run` 会找不到该文件,因此需要cd到emu文件夹下
|
|
|
@ -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
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
# 注意
|
||||||
|
添加了新的图像rom文件,直接在$NVBOARD_HOME运行 `make run` 会找不到该文件,因此需要cd到emu文件夹下
|
Loading…
Reference in New Issue