亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? pc.v

?? 這是8位微處理器的Verilog源代碼
?? V
字號:
/*  PC.V
**
**  This core adheres to GNU Public Licence
**  Jeung Joon Lee  ***  www.cmosexod.com
**  joon.lee@quantum.com
**
**	JJL 12/12/98	
**  updated 3/16/2000
**
**  Highest module for the 8 bit general purpose microprocessor
**  Two submodules are declerared here, popcorn.v and sequencer.v
**  The role and functions of these modules are as following:
**		PC.V		wrapper, and clock generator.  Provides to the submodules
**					sys_clk and phase_1_clk
**		POPCORN.V	The 8 bit datapath.  Contains the ALU, register file,
**					the program counter, stack pointer and all of the muxes.
**		SEQUENCER.V	The sequencer state machine.  BAsed on the fetched opcode,
**					generates all of the sequence of control signals to
**					fetch more operands or finish executing the opcode. 
**
*/

`include "inc.h"

module pc(	sys_clk,
			sys_rst,
			addx_bus,
			data_bus,
			code_cs_l,
			code_rd_l,
			code_wr_l,
			sram_cs_l,
			slow_clk,
			port

`ifdef show_debug_pins
			,
			w_opl,
			w_pc,
			w_oplo,
			state,
			w_acc,
			w_ax,
			w_bx,
			w_p,			
			w_ophi,			
			w_flag,
			phase_1_clk,
			slow_clk4, 
			reg_flag,
			tst_bus,
			reg_acc,
			reg_ax,
			reg_bx,
			reg_p,
			reg_opl
`endif

);


parameter N=6;  


input         	sys_clk;
input 			sys_rst;
inout  [7:0]	data_bus;
inout  [7:0]	port;
//input  [1:0] 		tst_bus_sel;
output [11:0]	addx_bus;
//output [7:0] 		tst_bus;
output        		code_cs_l, code_rd_l, code_wr_l, sram_cs_l;
output        		slow_clk;

`ifdef show_debug_pins
// DEBUG SIGNALS
output			w_opl;
output			w_pc;
output			w_oplo;
output [3:0]    state;
output			w_acc;
output			w_ax;
output			w_bx;
output			w_p;	
output			w_ophi;			
output			w_flag;
output			phase_1_clk;
output			slow_clk4;
output	[2:0]	reg_flag;
output			tst_bus;
output	[7:0]	reg_acc;
output	[7:0]	reg_ax;
output	[7:0]	reg_bx;
output	[7:0]	reg_p;
output	[7:0]	reg_opl;
`endif

wire          		w_acc,w_ax,w_bx,w_p,w_flag;
wire          		pc_mux,w_pc,w_oplo,w_ophi,w_opl;
wire          		slow_clk4;
wire   [2:0]  		bbus_mux;
wire   [3:0]  		alu_func;
wire   [2:0]  		reg_flag;
wire   [7:0]    	port;
reg    [1:0]  		state_slow_clk4;
reg 		  		phase_1_clk;
wire          		xx,slow_clk;
wire   [5:0]  		state;
wire   [7:0]    	b_bus,c_bus;
wire   [11:0]	d_bus;
wire   [7:0]	    tst_bus;
wire				sp_mux, w_sp;
wire   [1:0] 		addx_mux;
wire				data_bus_wr;
wire				sram_cs_l, code_wr_l;
wire				flag_mux;
wire	[7:0]		reg_acc;
wire	[7:0]		reg_ax;
wire	[7:0]		reg_bx;
wire	[7:0]		reg_p;
wire	[7:0]		reg_opl;
//wire   [7:0]	port_in;
//wire				port_bus_ena;

// define test bus
/*
always @(tst_bus_sel or reg_opl or c_bus or b_bus or d_bus)
	case (tst_bus_sel)
		2'b00: tst_bus <= reg_opl;
		//2'b01: tst_bus <= b_bus;
		default: tst_bus <= b_bus;
		//2'b10: tst_bus <= c_bus;
		//default: tst_bus <= c_bus;
		//2'b11: tst_bus <= d_bus;
	endcase
*/
//assign tst_bus=tst_bus_sel[0] ? b_bus : c_bus;
assign tst_bus=c_bus;


`ifdef use_clock_divider
//
//  CLOCK DIVIDER
//
//
// N=5 sets for 1Mhz operation
// N=7 sets for 250Khz op.  good for slow speed debug
reg    [N-1:0]		clk;
always @(posedge sys_clk or negedge sys_rst)
	if (~sys_rst) clk <=0;
	else 		  clk <= clk + 1;
assign slow_clk = clk[N-1];
assign slow_clk4 = ~clk[N-3];
`else
reg [1:0] clk;
always @(posedge sys_clk or negedge sys_rst)
  if (~sys_rst) clk <= 2'b00;
  else clk <= clk + 1;
assign slow_clk  = clk[1];
assign slow_clk4 = sys_clk;
`endif

/* define phase_1 clock
**            |                                |
**            | ___     ___     ___     ___    | ___     ___    
** slow_clk*4 |/   \___/   \___/   \___/   \___|/   \___/   \___
**            | _______         _______        | _______
** slow_clk*2 |/       \_______/       \_______|/       \_______
**            | _______________                | _______________
** slow_clk   |/               \_______________|/        
**            |________                 _______|_
** phase_1    |        \_______________/       |
**            |                                |
*/
always @(posedge slow_clk4 or negedge sys_rst)
	if (~sys_rst) begin
		state_slow_clk4<=2'b00;
		phase_1_clk<=1'b1;
	end
	else case (state_slow_clk4)
		2'b00: begin state_slow_clk4<=2'b01; phase_1_clk<=1'b1; end
		2'b01: begin state_slow_clk4<=2'b11; phase_1_clk<=1'b1; end
		2'b11: begin state_slow_clk4<=2'b10; phase_1_clk<=1'b0; end
		2'b10: begin state_slow_clk4<=2'b00; phase_1_clk<=1'b0; end
	endcase
	
// instantiate the datapath
popcorn POPCORN(	.sys_clk(slow_clk),
					.sys_rst(sys_rst),
					.w_acc(w_acc),
					.w_ax(w_ax),
					.w_bx(w_bx),
					.w_p(w_p),
					.w_flag(w_flag),
					.bbus_mux(bbus_mux),
					.alu_func(alu_func),
					.pc_mux(pc_mux),
					.sp_mux(sp_mux),
					.flag_mux(flag_mux),
					.addx_mux(addx_mux),
					.w_pc(w_pc),
					.w_sp(w_sp),
					.w_oplo(w_oplo),
					.w_ophi(w_ophi),
					.w_opl(w_opl),
					.data_bus(data_bus),
					.port(port),
//					.port_in(port_in),
					.addx_bus(addx_bus),
					.reg_opl(reg_opl),
					.reg_flag(reg_flag),
					.b_bus(b_bus),
					.c_bus(c_bus),
					.d_bus(d_bus),
					.data_bus_wr(data_bus_wr),
					.code_wr_l(code_wr_l),
					.reg_acc(reg_acc),
					.reg_ax(reg_ax),
					.reg_bx(reg_bx),
					.reg_p(reg_p)
	              );

// instantiate the sequencer
sequencer SEQ  (	.sys_clk(slow_clk),
					.phase_1_clk(phase_1_clk),
					.sys_rst(sys_rst),
					.w_acc(w_acc),
					.w_ax(w_ax),
					.w_bx(w_bx),
					.w_p(w_p),
					.w_flag(w_flag),
					.bbus_mux(bbus_mux),
					.alu_func(alu_func),
					.pc_mux(pc_mux),
					.addx_mux(addx_mux),
					.sp_mux(sp_mux),
					.flag_mux(flag_mux),
					.w_pc(w_pc),
					.w_sp(w_sp),
					.w_oplo(w_oplo),
					.w_ophi(w_ophi),
					.w_opl(w_opl),
					.reg_opl(reg_opl),
					.code_cs_l(code_cs_l),
					.code_rd_l(code_rd_l),
					.code_wr_l(code_wr_l),
					.sram_cs_l(sram_cs_l),
					.reg_flag(reg_flag),
					.data_bus_wr(data_bus_wr),
					.next_state(state)
 	             );



endmodule



/*
**  Note on pin assignment:
**  o use pin file : "finalpin.pin"
**  o use global clock Y0 for 66Mhz source
**  o use global reset for reset.
**  o use N=6.  This requires 64Mhz to give internal clock speed of 1Mhz.
**
**  2/12/99
**  o Fixed the LDM ACC,xx bug.  ALU was not being set for c_bus = b_bus.
**    Call this 'popcorn - final'
**
**  2/11/99
**  o Uncovered and fixed 2 bugs relating the IO PORT: 
**    1.The signals 'reg_port_gate' which controls the gate of the port
**      output buffer has the wrong polarity.  This was causing the port
**      to drive the port IO pin only when it was being read.
**    2.The state of the bbus_mux[2:0] during LDACC/STADD was set to unknown.
**      This was causing the reg_port_gate to be deasserted during LDACC PORT
**      or STACC PORT instructions for 1 cycle, causing glitches in the IO port
**      pin
**      
**	1/8/99
**	o Succesfully ran a timer program which toggles all bits of the 
**	  port register at 2mS interval (period=4mS).  The program uses
**	  an instrunctions timed 2mS delay subroutine.	
**
**	1/7/99 
**	o Somewhat final version.  The test bus (TST[7:0]) has been dropped
**	  and PORT[7:0] been used.  All instructions works at least at 2 Mhz.
**	  Call this 'popcorn -v5'
**
**	1/5/99
**	o Droppped the automatic pushing and popping of the flags when CALL/RET
**    are executed, (could not fit).  So reduced the size of REG_OPHI down 
**	  to 4 from 8 bits.  Instead the pushing of the flag is now done with
**	  LDACC flag
**	  LDM flag, #addx
**	  PUSH flag 
**	  POP flag
**    instructions.  The flag register still is muxed from ALU and c_bus.
**    Thanks Lord.
**	  All that remains now is implementation of interrupt support.
**	
**  1/3/99
**	o Removed DX and CX register from the register file, to free-up
**	  the b_mux.  The freed b_bus mux inputs are used by the PC (hi and low).
**    This allows PC to be pushed into the stack as well as CALL and RET 
**    and push flag instructions
**
**	1/1/99
**	o Removed 7 level-deep hardware stack - it was obvious that this is not
**    a very robust way of having a stack.  It limits the CALL/RET depth.
**	  However my initial rational for not implementing the SP was that I
**    did not wanted to have a SRAM for stack.  SRAM automatically implies
**    an extenal IC (since on FPGA you could not provide the required 
**    amount of space).  
**  o Added another addressing mode: direct mode, and 2 instructions: LDM and
**	  STM (load mem, store mem).  This brings the modes
**	  to: register direct, immediate and direct.
**    Why not, I had decided to have exnal SRAM, so let's make use of it
**
**	12/28/98
**	o Added 7-level deep hardware LIFO to implement pushacc/popacc
**    instructions
**	o Implemented pushacc and popacc instructions in the sequencer.v
**
**  12/27/98
**	o Fixed a number of bugs, including CMPACC (reg direct) and ALU ops (reg
**	  direct) being decoded as same.
**
**	12/26/98
**	o Shortenend the PC to 12 bits from 16, to reduce design size. 
**  o REduced the datapath width to 8 from 16, to reduce design size.
**
**  Lots of previous history not accounted for.  Started to work on POPCORN
**  about 12/12/98
*/

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美成人一区二区三区| 精品一区二区三区免费毛片爱| 一区二区三区四区高清精品免费观看 | 色欧美乱欧美15图片| 欧美一区午夜精品| 中文字幕一区不卡| 精一区二区三区| 欧美日韩在线播放三区| 日本一区二区三区在线观看| 日本不卡123| 欧美系列日韩一区| 中文字幕亚洲区| 国产精品66部| 精品欧美久久久| 亚洲成人你懂的| 在线影视一区二区三区| 国产精品久久久久天堂| 狠狠色伊人亚洲综合成人| 欧美日韩高清一区二区| 亚洲视频 欧洲视频| 成人动漫一区二区在线| 久久精品男人的天堂| 日韩精品亚洲专区| 欧美日韩久久不卡| 亚洲图片欧美视频| 色www精品视频在线观看| 亚洲欧洲日韩av| 成人av集中营| 国产精品久久久久一区| 国产91丝袜在线播放| 国产婷婷一区二区| 国产成人精品亚洲午夜麻豆| 精品国产三级a在线观看| 美女视频黄 久久| 欧美xfplay| 九九国产精品视频| 久久蜜桃av一区二区天堂| 精品影院一区二区久久久| 精品人伦一区二区色婷婷| 国精品**一区二区三区在线蜜桃| 日韩欧美精品三级| 国产综合色在线视频区| 久久久精品免费观看| 成人自拍视频在线| 成人欧美一区二区三区1314 | 麻豆精品一区二区三区| 亚洲欧美在线另类| 91网上在线视频| 亚洲精品乱码久久久久久久久 | 一区二区三区四区视频精品免费| 色综合久久久久网| 亚洲狠狠爱一区二区三区| 欧美一级高清片在线观看| 另类成人小视频在线| 日本一区二区三区在线不卡| 91在线国内视频| 天天射综合影视| 精品福利在线导航| 91在线播放网址| 视频一区在线播放| 国产色综合一区| 日本韩国视频一区二区| 日本午夜精品一区二区三区电影 | 欧美在线免费播放| 蜜桃久久久久久| 日韩毛片高清在线播放| 欧美精品免费视频| 国产成人精品aa毛片| 亚洲国产一区二区视频| 欧美精品一区二区精品网| 99精品欧美一区二区三区综合在线| 亚洲成人动漫在线观看| 久久―日本道色综合久久| 色综合天天综合网国产成人综合天| 日韩成人精品在线观看| 国产精品毛片久久久久久| 欧美精品精品一区| av在线播放一区二区三区| 奇米影视一区二区三区| 国产精品毛片久久久久久久| 日韩一区二区三区av| 色哟哟一区二区| 国产综合色在线| 日韩激情一区二区| 尤物在线观看一区| 国产欧美日韩精品一区| 91精品在线一区二区| 91美女精品福利| 国产精品一区二区久激情瑜伽| 亚洲小说欧美激情另类| 国产精品欧美极品| 久久蜜桃av一区精品变态类天堂 | 亚洲aⅴ怡春院| 亚洲日本青草视频在线怡红院| 精品久久一区二区三区| 欧美日韩国产大片| 色一情一伦一子一伦一区| 粉嫩av亚洲一区二区图片| 美女精品一区二区| 视频一区免费在线观看| 久久电影网电视剧免费观看| 亚洲18女电影在线观看| 中文字幕日韩精品一区| 日本一二三四高清不卡| 久久蜜臀中文字幕| 2023国产精华国产精品| 欧美大肚乱孕交hd孕妇| 欧美一级日韩免费不卡| 欧美精品久久一区二区三区| 91久久精品午夜一区二区| 一道本成人在线| 91啪九色porn原创视频在线观看| 国产激情视频一区二区三区欧美| 经典三级在线一区| 久久精品国产一区二区三区免费看| 爽好多水快深点欧美视频| 天天综合天天综合色| 日韩激情一区二区| 麻豆成人91精品二区三区| 美女被吸乳得到大胸91| 久久er精品视频| 国产一区二区三区高清播放| 国产精品乡下勾搭老头1| 国产一区二区三区高清播放| 福利一区福利二区| av激情亚洲男人天堂| 91女神在线视频| 欧美私模裸体表演在线观看| 欧美丰满一区二区免费视频| 日韩欧美一级精品久久| 久久久久久久久免费| 久久久99精品免费观看| 国产精品视频麻豆| 一区二区不卡在线播放 | 黄色精品一二区| 国产一区二区三区黄视频 | 国产白丝精品91爽爽久久| 国产精品综合一区二区三区| 国产不卡视频在线观看| 99国产精品久| 欧美日韩国产经典色站一区二区三区| 91麻豆精品91久久久久同性| 久久婷婷一区二区三区| 中文字幕一区二区三区av| 亚洲mv大片欧洲mv大片精品| 久久草av在线| 99精品视频在线播放观看| 欧美日韩在线播放一区| 国产亚洲欧美色| 一区二区成人在线视频| 精品亚洲成av人在线观看| 91亚洲永久精品| 91精品国产色综合久久| 久久亚洲影视婷婷| 一区二区三区视频在线看| 免费久久精品视频| 成人黄色小视频| 欧美乱熟臀69xxxxxx| 国产精品天干天干在观线| 亚洲午夜一区二区| 国产精品一二一区| 日本韩国精品一区二区在线观看| 日韩欧美123| 一区二区三区在线免费视频| 日韩电影网1区2区| 99久久婷婷国产综合精品电影| 欧美日韩电影在线| 欧美精品一区视频| 亚洲女同女同女同女同女同69| 蜜臀av一区二区在线免费观看| 99精品国产视频| 久久久亚洲高清| 天堂久久久久va久久久久| 99精品欧美一区二区蜜桃免费| 精品国产乱码久久久久久闺蜜| 精品亚洲国产成人av制服丝袜| 欧美视频第二页| 亚洲视频中文字幕| 国产剧情一区二区三区| 日韩一级二级三级| 一区二区三区四区在线| aaa亚洲精品| 国产精品无人区| 国产精品996| 日韩欧美成人午夜| 丝袜美腿高跟呻吟高潮一区| 色婷婷亚洲精品| 亚洲视频一二三| 国产自产高清不卡| 69堂精品视频| 亚洲自拍偷拍九九九| av成人老司机| 亚洲欧美影音先锋| 成人av在线播放网站| 国产色综合久久| 国产成人久久精品77777最新版本 国产成人鲁色资源国产91色综 | 亚洲三级电影网站| 成人av在线资源| 欧美国产日韩亚洲一区| 国产精品一区二区在线看|