⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dso_keyboard.v

📁 本文件用于spi接口的键盘扫描模块
💻 V
字号:
module dso_keyboard(clk,
					clr,
					din,reset,
					addr_bus,ncs_bus,noe_bus,nwe_bus,dat_bus,
					wr_enable,
					clk500k);
	input       clk;
	input       clr;
	input       din;
	input[5:0]  addr_bus; 
	input       ncs_bus;
	input       noe_bus;
	input       nwe_bus;
	inout[7:0]  dat_bus;
	output      reset;
	output      clk500k;
	output      wr_enable;
	
	//wire        clr;
	wire[7:0]   key_data;
	wire        wr_enable;
	wire        key_flag;
	wire[7:0]   key_value;
	wire        rd_enable;
		
	//assign clr = 1'b0;
	
	key_comp  key_comp_inst(.clk(clk),.clr(clr),.din(din),.reset(reset),
							.clk500k(clk500k),.key_data(key_data),
							.key_enable(wr_enable));
							
	key_arm_rd  key_arm_rd_inst(.clk(clk),.clr(clr),.key_value(key_value),
							.key_flag(key_flag),
							.addr(addr_bus),.ncs(ncs_bus),.nwe(nwe_bus),
							.data(dat_bus),.rd_enable(rd_enable));
		
	//Syn FIFO	
	key_fifo  key_fifo_inst(.clock(clk),.data(key_data),.rdreq(rd_enable),
							.wrreq(wr_enable),.empty(key_flag),.full(),
							.q(key_value));
			
endmodule

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -