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

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

?? uart_transmitter.v

?? Uart 串口的verilog實現已調試通過
?? V
字號:
//////////////////////////////////////////////////////////////////////////                                                              ////////  uart_transmitter.v                                          ////////                                                              ////////                                                              ////////  This file is part of the "UART 16550 compatible" project    ////////  http://www.opencores.org/cores/uart16550/                   ////////                                                              ////////  Documentation related to this project:                      ////////  - http://www.opencores.org/cores/uart16550/                 ////////                                                              ////////  Projects compatibility:                                     ////////  - WISHBONE                                                  ////////  RS232 Protocol                                              ////////  16550D uart (mostly supported)                              ////////                                                              ////////  Overview (main Features):                                   ////////  UART core transmitter logic                                 ////////                                                              ////////  Known problems (limits):                                    ////////  None known                                                  ////////                                                              ////////  To Do:                                                      ////////  Thourough testing.                                          ////////                                                              ////////  Author(s):                                                  ////////      - gorban@opencores.org                                  ////////      - Jacob Gorban                                          ////////      - Igor Mohor (igorm@opencores.org)                      ////////                                                              ////////  Created:        2001/05/12                                  ////////  Last Updated:   2001/05/17                                  ////////                  (See log for the revision history)          ////////                                                              ////////                                                              //////////////////////////////////////////////////////////////////////////////                                                              //////// Copyright (C) 2000, 2001 Authors                             ////////                                                              //////// This source file may be used and distributed without         //////// restriction provided that this copyright statement is not    //////// removed from the file and that any derivative work contains  //////// the original copyright notice and the associated disclaimer. ////////                                                              //////// This source file is free software; you can redistribute it   //////// and/or modify it under the terms of the GNU Lesser General   //////// Public License as published by the Free Software Foundation; //////// either version 2.1 of the License, or (at your option) any   //////// later version.                                               ////////                                                              //////// This source is distributed in the hope that it will be       //////// useful, but WITHOUT ANY WARRANTY; without even the implied   //////// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR      //////// PURPOSE.  See the GNU Lesser General Public License for more //////// details.                                                     ////////                                                              //////// You should have received a copy of the GNU Lesser General    //////// Public License along with this source; if not, download it   //////// from http://www.opencores.org/lgpl.shtml                     ////////                                                              ////////////////////////////////////////////////////////////////////////////// CVS Revision History//// $Log: uart_transmitter.v,v $// Revision 1.19  2002/07/29 21:16:18  gorban// The uart_defines.v file is included again in sources.//// Revision 1.18  2002/07/22 23:02:23  gorban// Bug Fixes://  * Possible loss of sync and bad reception of stop bit on slow baud rates fixed.//   Problem reported by Kenny.Tung.//  * Bad (or lack of ) loopback handling fixed. Reported by Cherry Withers.//// Improvements://  * Made FIFO's as general inferrable memory where possible.//  So on FPGA they should be inferred as RAM (Distributed RAM on Xilinx).//  This saves about 1/3 of the Slice count and reduces P&R and synthesis times.////  * Added optional baudrate output (baud_o).//  This is identical to BAUDOUT* signal on 16550 chip.//  It outputs 16xbit_clock_rate - the divided clock.//  It's disabled by default. Define UART_HAS_BAUDRATE_OUTPUT to use.//// Revision 1.16  2002/01/08 11:29:40  mohor// tf_pop was too wide. Now it is only 1 clk cycle width.//// Revision 1.15  2001/12/17 14:46:48  mohor// overrun signal was moved to separate block because many sequential lsr// reads were preventing data from being written to rx fifo.// underrun signal was not used and was removed from the project.//// Revision 1.14  2001/12/03 21:44:29  gorban// Updated specification documentation.// Added full 32-bit data bus interface, now as default.// Address is 5-bit wide in 32-bit data bus mode.// Added wb_sel_i input to the core. It's used in the 32-bit mode.// Added debug interface with two 32-bit read-only registers in 32-bit mode.// Bits 5 and 6 of LSR are now only cleared on TX FIFO write.// My small test bench is modified to work with 32-bit mode.//// Revision 1.13  2001/11/08 14:54:23  mohor// Comments in Slovene language deleted, few small fixes for better work of// old tools. IRQs need to be fix.//// Revision 1.12  2001/11/07 17:51:52  gorban// Heavily rewritten interrupt and LSR subsystems.// Many bugs hopefully squashed.//// Revision 1.11  2001/10/29 17:00:46  gorban// fixed parity sending and tx_fifo resets over- and underrun//// Revision 1.10  2001/10/20 09:58:40  gorban// Small synopsis fixes//// Revision 1.9  2001/08/24 21:01:12  mohor// Things connected to parity changed.// Clock devider changed.//// Revision 1.8  2001/08/23 16:05:05  mohor// Stop bit bug fixed.// Parity bug fixed.// WISHBONE read cycle bug fixed,// OE indicator (Overrun Error) bug fixed.// PE indicator (Parity Error) bug fixed.// Register read bug fixed.//// Revision 1.6  2001/06/23 11:21:48  gorban// DL made 16-bit long. Fixed transmission/reception bugs.//// Revision 1.5  2001/06/02 14:28:14  gorban// Fixed receiver and transmitter. Major bug fixed.//// Revision 1.4  2001/05/31 20:08:01  gorban// FIFO changes and other corrections.//// Revision 1.3  2001/05/27 17:37:49  gorban// Fixed many bugs. Updated spec. Changed FIFO files structure. See CHANGES.txt file.//// Revision 1.2  2001/05/21 19:12:02  gorban// Corrected some Linter messages.//// Revision 1.1  2001/05/17 18:34:18  gorban// First 'stable' release. Should be sythesizable now. Also added new header.//// Revision 1.0  2001-05-17 21:27:12+02  jacob// Initial revision////// synopsys translate_off`include "timescale.v"// synopsys translate_on`include "uart_defines.v"module uart_transmitter (clk, wb_rst_i, lcr, tf_push, wb_dat_i, enable,	stx_pad_o, tstate, tf_count, tx_reset, lsr_mask);input 										clk;input 										wb_rst_i;input [7:0] 								lcr;input 										tf_push;input [7:0] 								wb_dat_i;input 										enable;input 										tx_reset;input 										lsr_mask; //reset of fifooutput 										stx_pad_o;output [2:0] 								tstate;output [`UART_FIFO_COUNTER_W-1:0] 	tf_count;reg [2:0] 									tstate;reg [4:0] 									counter;reg [2:0] 									bit_counter;   // counts the bits to be sentreg [6:0] 									shift_out;	// output shift registerreg 											stx_o_tmp;reg 											parity_xor;  // parity of the wordreg 											tf_pop;reg 											bit_out;// TX FIFO instance//// Transmitter FIFO signalswire [`UART_FIFO_WIDTH-1:0] 			tf_data_in;wire [`UART_FIFO_WIDTH-1:0] 			tf_data_out;wire 											tf_push;wire 											tf_overrun;wire [`UART_FIFO_COUNTER_W-1:0] 		tf_count;assign 										tf_data_in = wb_dat_i;uart_tfifo fifo_tx(	// error bit signal is not used in transmitter FIFO	.clk(		clk		), 	.wb_rst_i(	wb_rst_i	),	.data_in(	tf_data_in	),	.data_out(	tf_data_out	),	.push(		tf_push		),	.pop(		tf_pop		),	.overrun(	tf_overrun	),	.count(		tf_count	),	.fifo_reset(	tx_reset	),	.reset_status(lsr_mask));// TRANSMITTER FINAL STATE MACHINEparameter s_idle        = 3'd0;parameter s_send_start  = 3'd1;parameter s_send_byte   = 3'd2;parameter s_send_parity = 3'd3;parameter s_send_stop   = 3'd4;parameter s_pop_byte    = 3'd5;always @(posedge clk or posedge wb_rst_i)begin  if (wb_rst_i)  begin	tstate       <= #1 s_idle;	stx_o_tmp       <= #1 1'b1;	counter   <= #1 5'b0;	shift_out   <= #1 7'b0;	bit_out     <= #1 1'b0;	parity_xor  <= #1 1'b0;	tf_pop      <= #1 1'b0;	bit_counter <= #1 3'b0;  end  else  if (enable)  begin	case (tstate)	s_idle	 :	if (~|tf_count) // if tf_count==0			begin				tstate <= #1 s_idle;				stx_o_tmp <= #1 1'b1;			end			else			begin				tf_pop <= #1 1'b0;				stx_o_tmp  <= #1 1'b1;				tstate  <= #1 s_pop_byte;			end	s_pop_byte :	begin				tf_pop <= #1 1'b1;				case (lcr[/*`UART_LC_BITS*/1:0])  // number of bits in a word				2'b00 : begin					bit_counter <= #1 3'b100;					parity_xor  <= #1 ^tf_data_out[4:0];				     end				2'b01 : begin					bit_counter <= #1 3'b101;					parity_xor  <= #1 ^tf_data_out[5:0];				     end				2'b10 : begin					bit_counter <= #1 3'b110;					parity_xor  <= #1 ^tf_data_out[6:0];				     end				2'b11 : begin					bit_counter <= #1 3'b111;					parity_xor  <= #1 ^tf_data_out[7:0];				     end				endcase				{shift_out[6:0], bit_out} <= #1 tf_data_out;				tstate <= #1 s_send_start;			end	s_send_start :	begin				tf_pop <= #1 1'b0;				if (~|counter)					counter <= #1 5'b01111;				else				if (counter == 5'b00001)				begin					counter <= #1 0;					tstate <= #1 s_send_byte;				end				else					counter <= #1 counter - 1'b1;				stx_o_tmp <= #1 1'b0;			end	s_send_byte :	begin				if (~|counter)					counter <= #1 5'b01111;				else				if (counter == 5'b00001)				begin					if (bit_counter > 3'b0)					begin						bit_counter <= #1 bit_counter - 1'b1;						{shift_out[5:0],bit_out  } <= #1 {shift_out[6:1], shift_out[0]};						tstate <= #1 s_send_byte;					end					else   // end of byte					if (~lcr[`UART_LC_PE])					begin						tstate <= #1 s_send_stop;					end					else					begin						case ({lcr[`UART_LC_EP],lcr[`UART_LC_SP]})						2'b00:	bit_out <= #1 ~parity_xor;						2'b01:	bit_out <= #1 1'b1;						2'b10:	bit_out <= #1 parity_xor;						2'b11:	bit_out <= #1 1'b0;						endcase						tstate <= #1 s_send_parity;					end					counter <= #1 0;				end				else					counter <= #1 counter - 1'b1;				stx_o_tmp <= #1 bit_out; // set output pin			end	s_send_parity :	begin				if (~|counter)					counter <= #1 5'b01111;				else				if (counter == 5'b00001)				begin					counter <= #1 4'b0;					tstate <= #1 s_send_stop;				end				else					counter <= #1 counter - 1'b1;				stx_o_tmp <= #1 bit_out;			end	s_send_stop :  begin				if (~|counter)				  begin						casex ({lcr[`UART_LC_SB],lcr[`UART_LC_BITS]})  						3'b0xx:	  counter <= #1 5'b01101;     // 1 stop bit ok igor  						3'b100:	  counter <= #1 5'b10101;     // 1.5 stop bit  						default:	  counter <= #1 5'b11101;     // 2 stop bits						endcase					end				else				if (counter == 5'b00001)				begin					counter <= #1 0;					tstate <= #1 s_idle;				end				else					counter <= #1 counter - 1'b1;				stx_o_tmp <= #1 1'b1;			end		default : // should never get here			tstate <= #1 s_idle;	endcase  end // end if enable  else    tf_pop <= #1 1'b0;  // tf_pop must be 1 cycle widthend // transmitter logicassign stx_pad_o = lcr[`UART_LC_BC] ? 1'b0 : stx_o_tmp;    // Break condition	endmodule

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品久久久久久久蜜臀 | 一本大道久久a久久精品综合| 日韩精品福利网| 一区二区三区在线观看网站| 综合久久久久综合| 一区二区三区在线观看欧美| 亚洲摸摸操操av| 伊人婷婷欧美激情| 亚洲成人久久影院| 日本一不卡视频| 久久99精品久久久久久动态图| 麻豆精品久久久| 久久国产尿小便嘘嘘| 国产又黄又大久久| 成人晚上爱看视频| 99久久精品国产网站| 日本大香伊一区二区三区| 精品视频全国免费看| 欧美一级片在线| 精品福利在线导航| 国产精品嫩草影院av蜜臀| 亚洲黄色在线视频| 日韩电影在线免费看| 国产在线播放一区二区三区| www.久久久久久久久| 欧美影院精品一区| 精品国内二区三区| 最好看的中文字幕久久| 亚洲成人自拍一区| 激情伊人五月天久久综合| 成人毛片视频在线观看| 欧美在线制服丝袜| 久久嫩草精品久久久精品一| 亚洲视频1区2区| 五月激情丁香一区二区三区| 国产精品99久久久久久似苏梦涵 | 国产激情一区二区三区桃花岛亚洲| 成人免费的视频| 欧美伦理影视网| 国产女主播在线一区二区| 一区二区在线观看视频| 国产九色精品成人porny | 日韩精品一区二区三区视频| 亚洲国产成人一区二区三区| 视频在线观看一区| 成人午夜激情在线| 日韩欧美一二三四区| 一区二区三区不卡在线观看| 国产主播一区二区| 欧美男男青年gay1069videost| 日本一区二区三区高清不卡| 日本视频在线一区| 欧美在线免费视屏| 亚洲少妇最新在线视频| 国产一区在线看| 欧美疯狂性受xxxxx喷水图片| 17c精品麻豆一区二区免费| 久久精品久久综合| 欧美日韩精品高清| 亚洲美腿欧美偷拍| 成人在线一区二区三区| 精品国产露脸精彩对白| 日本中文字幕一区二区视频 | 久国产精品韩国三级视频| 在线观看国产91| 自拍偷拍欧美激情| 成人毛片视频在线观看| www日韩大片| 麻豆免费精品视频| 日韩欧美一区二区免费| 午夜精品一区二区三区电影天堂| 日本久久电影网| 综合久久久久久久| 99天天综合性| 18欧美亚洲精品| 成人免费高清视频在线观看| 国产午夜精品理论片a级大结局| 麻豆精品一区二区av白丝在线| 欧美一区二区日韩| 日韩中文欧美在线| 欧美一级搡bbbb搡bbbb| 久草这里只有精品视频| 2019国产精品| 国产盗摄精品一区二区三区在线| 久久久久久久久97黄色工厂| 高清国产一区二区| 中国av一区二区三区| 一本久久综合亚洲鲁鲁五月天| 亚洲免费av在线| 在线成人小视频| 国内精品嫩模私拍在线| 中文av一区二区| 91福利社在线观看| 三级成人在线视频| 久久婷婷综合激情| 91一区二区在线| 三级欧美在线一区| 久久久精品一品道一区| 99久久精品国产导航| 亚洲韩国精品一区| 日韩亚洲欧美一区| 成人精品国产一区二区4080| 一区二区三区在线不卡| 欧美一区二区国产| av午夜一区麻豆| 婷婷开心久久网| 国产免费观看久久| 欧美性受极品xxxx喷水| 精品制服美女丁香| 亚洲日本在线观看| 日韩欧美电影一区| 91视频在线观看免费| 免费国产亚洲视频| 亚洲欧美日韩久久| 精品奇米国产一区二区三区| 成人做爰69片免费看网站| 五月天丁香久久| 国产精品成人免费在线| 欧美一区二区三区免费在线看| 成av人片一区二区| 美女久久久精品| 亚洲综合视频在线观看| 国产欧美日韩三区| 欧美一区二区三区播放老司机| 波多野结衣的一区二区三区| 精品一区二区在线观看| 夜夜嗨av一区二区三区四季av | 国产不卡一区视频| 亚洲自拍偷拍av| 国产精品久久久久一区二区三区共| 在线播放欧美女士性生活| 不卡的av中国片| 国产精一区二区三区| 亚洲成人你懂的| 亚洲精品成人悠悠色影视| 久久免费美女视频| 日韩精品一区二| 在线不卡的av| 欧美午夜宅男影院| 在线视频国内自拍亚洲视频| eeuss鲁片一区二区三区在线观看 eeuss鲁片一区二区三区在线看 | 在线中文字幕一区| 国产一区二区女| 美女任你摸久久| 亚洲午夜精品一区二区三区他趣| 国产精品少妇自拍| 欧美精品一区二区三区视频| 6080国产精品一区二区| 欧洲视频一区二区| www.欧美.com| 成人福利电影精品一区二区在线观看| 久久97超碰国产精品超碰| 日本在线观看不卡视频| 日韩综合小视频| 琪琪一区二区三区| 蜜桃在线一区二区三区| 久久国产福利国产秒拍| 老司机午夜精品| 黑人巨大精品欧美一区| 麻豆精品视频在线| 精东粉嫩av免费一区二区三区| 激情六月婷婷久久| 精品一区二区三区免费播放| 国产资源精品在线观看| 精品一区二区三区av| 国产真实乱子伦精品视频| 国内精品在线播放| 国产成人精品一区二| 国产宾馆实践打屁股91| a4yy欧美一区二区三区| 91福利在线导航| 欧美亚洲另类激情小说| 欧美精品自拍偷拍动漫精品| 777xxx欧美| 国产偷国产偷亚洲高清人白洁 | 欧美中文字幕久久 | 久久丁香综合五月国产三级网站 | 国产精品视频yy9299一区| 国产精品成人免费在线| 亚洲精品国产一区二区精华液 | 国产人成亚洲第一网站在线播放| 国产三级精品视频| 亚洲激情图片qvod| 六月丁香综合在线视频| 国产美女主播视频一区| 国产成人在线看| 欧美日本韩国一区二区三区视频| 日韩一级精品视频在线观看| 欧美激情在线看| 亚洲第一在线综合网站| 国产精品系列在线播放| 欧美又粗又大又爽| 国产午夜久久久久| 亚洲欧美日韩国产成人精品影院| 一二三四社区欧美黄| 国产一区二区久久| 欧洲一区在线观看| 国产午夜亚洲精品午夜鲁丝片| 国产精品乱人伦| 美女一区二区三区在线观看|