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

📄 ac51_pcon.v

📁 Verilog 8051 IP Core for Cyclone II
💻 V
字号:
//// ac51_pcon.v//// ac51 microcontroller core//// Version 0.6//// Copyright 2008, Hideyuki Abe. All rights reserved.// Distributed under the terms of the MIT License.//module ac51_pcon(	clk,	rst,	ioaddr,	iowdata,	iordata,	iowen,	smod);input	clk;input	rst;input [6:0]	ioaddr;input [7:0]	iowdata;output [7:0]	iordata;input	iowen;output	smod;reg [6:0]	ioaddr_d;wire	pcon_enb;wire	pcon_wen;wire [7:0]	pcon;reg	smod;always @(posedge clk or negedge rst) begin	if(~rst)		ioaddr_d <= 7'h00;	else		ioaddr_d <= ioaddr;end	// alwaysassign	pcon_enb = (ioaddr_d == 7'h07);	// PCON @8'h87assign	pcon = {smod, 7'b000_0000};assign	iordata = ({8{pcon_enb}} & pcon);assign	pcon_wen = ((ioaddr == 7'h07) & iowen);	// PCON @8'h87always @(posedge clk or negedge rst) begin	if(~rst)		smod <= 1'b0;	else if(pcon_wen)		smod <= iowdata[7];end	// alwaysendmodule// End of ac51_pcon.v

⌨️ 快捷键说明

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