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

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

?? clock_gen_select.v

?? 本實驗利用PS2接口實現了與鍵盤通信
?? V
字號:
//----------------------------------------
//
// FORMULATING BAUD RATE SETTINGS
//
//
// This ROM contains BAUD rate selection parameters for
// use with the clock_gen_select block.
// The BAUD clocks which are generated are positive pulses,
// (used as clock enables,) and may be used as general clock enables
// if desired.
// Configuring the clock_gen begins with a "Fclk" MHz basic clock.
// To this is applied a prescaler (with value of dds_prescale_value,) 
// followed by a Direct Digital Synthesizer (DDS) frequency
// generator.  The DDS has an accumulator that is "dds_bits" bits wide.
// The user should know that there is some "jitter" introduced by the
// DDS, and that the amount of jitter varies depending upon the desired
// output frequency.  By increasing "dds_bits" the jitter can be made
// very small.  Also, the jitter tends to be smaller for small values of
// "dds_phase_increment"
//
// The following settings apply for these table values:
// rate_select    BAUD rate (16x this is generated)
//----------------------------------------
//     000        9600
//     001        19200
//     010        38400
//     011        57600
//     100        115200
//   (other values are available)
//
//
//
// In order to generate the parameters for a new clock
// frequency, first find the basic Fclk for your board.
// (Fclk=50.0 MHz in this example.)  
// Next, choose the lowest desired BAUD rate.
// (lowest_rate=9600 in this example.)
//
// STEP 1 : Find the ratio
//-------------------------
// First, pick a "clock_factor" for the operation of the rs232 units.
// (16 is traditional, although this hardware supports odd values as
//  well.  For instance, you could pick a clock_factor of 7, if this
//  allows you to generate BAUD rates more exactly from your particular
//  Fclk.  Try to pick the highest clock_factor that you practically can
//  since higher numbers allow the receiver to sample in the middle of
//  the received bit more exactly...  Also, don't go over 16 unless you
//  widen out the counters in the design!)
// So, for this example, let clock_factor=16.
//
// Now, find (Fclk/lowest_rate)/clock_factor = 320 (in this example).
// If this ratio is NOT an integer, then be aware that the
// BAUD rates which you will be able to produce will not be
// exact.  For asynchronous communications, the clock frequency need not
// be exact. (As mentioned in "Brute Force DDS method" below.)
// If you cannot make clocks close enough to the BAUD rates you desire,
// then you can try a different "clock_factor" setting.
// Or, alternately, you could just use the "Brute Force DDS method."
// (See below)
// 
// Or, if all else fails: get a different clock oscillator!
// If the ratio is an integer, or close to it, then proceed to step 2.
//
// Brute Force DDS method (Still step 1):
//-----------------------
// Simply increase the size of the DDS (increase "dds_bits",)
// and set the prescaler to Ndiv=1 (to pass the clock directly
// to the DDS).  Then choose your DDS phase increment values (STEP 3)
// so that you can produce rates which are as close as possible
// to "clock_factor" times the desired BAUD rates.  It might not be exact,
// but it is as close as possible.  If "dds_bits" is sufficiently large,
// then the resulting BAUD rate clocks can be _extremely_ close to the
// correct frequencies.  The Baud rate clocks actually do not need
// to be perfect, they can vary by perhaps 3 or 4 percent from their
// exact frequencies, with an increased risk of bit-errors which result,
// of course.
// 
// The formula is: dds_freq_int = (2^dds_bits)*(desired_frequency)/Fclk.
//
// STEP 2 : Find the prescaler value
//----------------------------------
// If the ratio mentioned in STEP 1 is an integer, then divide that integer
// into its prime factors.  The product of all of the prime factors which
// are not equal to 2 is a good place to start for the prescaler_value.
// If this yields too low of a clock frequency going into the DDS, then
// revert to the "Brute force DDS approach" mentioned above, or else get
// a more suitable clock oscillator!
//
// For this example: 320 = 2*2*2*2*2*2*5.  So the prescaler Ndiv = 5.
//
// If you are lucky and the prime factors are all equal to 2, then you have
// chosen an Fclk which is very agreeable to producing the BAUD clocks.  You
// can probably set Ndiv=1, which disables the prescaler from operating.
//
//
// STEP 3 : Calculate DDS phase increment values
//----------------------------------------------
// Use the following formula:
//    dds_freq_int = (2^dds_bits)*(desired_frequency)/Fclk_dds.
// The resulting values should be used with the DDS, and the values will be
// be "dds_bits-1" wide unsigned quantities.
// Remember that you can change the prescaler Ndiv value to get different
// Fclk_dds values.
//
//=========================================================================
//-----------------------------------------
// This component is a clock generator with parameters selected by an
// index into a lookup table.  There are eight possible settings.
// Recalculate the settings for your own needs as described in 
// "FORMULATING BAUD RATE SETTINGS" above.  You will need to change
// the bit width of the DDS registers, according to the `defines.

`define DDS_BITS 6
`define DDS_PRESCALE_BITS 3

`timescale 1ns/100ps
module clock_gen_select (
                         clk,
                         reset,
                         rate_select,
                         clk_out
                         );

input clk;
input reset;
input [2:0] rate_select;

output clk_out;

// Local signals
wire pulse;
wire dds_clk;

reg delayed_pulse;
reg [`DDS_PRESCALE_BITS-1:0] dds_prescale_count;
reg [`DDS_PRESCALE_BITS-1:0] dds_prescale_ndiv;
reg [`DDS_BITS-1:0] dds_phase;
reg [`DDS_BITS-2:0] dds_phase_increment;

// This part sets up the "dds_phase_increment" and "dds_prescale_ndiv" values
always @(rate_select)
begin
  case (rate_select)
    3'b000  : begin
                dds_phase_increment <=  1;  // 9600
                dds_prescale_ndiv   <=  5;
              end
              
    3'b001  : begin
                dds_phase_increment <=  2;  // 19200
                dds_prescale_ndiv   <=  5;
              end
              
    3'b010  : begin
                dds_phase_increment <=  4;  // 38400
                dds_prescale_ndiv   <=  5;
              end
              
    3'b011  : begin
                dds_phase_increment <=  6;  // 57600
                dds_prescale_ndiv   <=  5;
              end
              
    3'b100  : begin
                dds_phase_increment <= 12;  // 115200
                dds_prescale_ndiv   <=  5;
              end
              
    3'b101  : begin
                dds_phase_increment <= 12;  // 115200
                dds_prescale_ndiv   <=  5;
              end
              
    3'b110  : begin
                dds_phase_increment <= 12;  // 115200
                dds_prescale_ndiv   <=  5;
              end
              
    3'b111  : begin
                dds_phase_increment <= 12;  // 115200
                dds_prescale_ndiv   <=  5;
              end
              
    default : begin
                dds_phase_increment <= 12;  // 115200
                dds_prescale_ndiv   <=  5;
              end
  endcase 
end 


// This is the DDS prescaler part.  It has a variable divide value.
// The divide factor is "dds_prescale_ndiv" + 1.
always @(posedge clk)
begin
  if (reset) dds_prescale_count <= 0;
  else if (dds_prescale_count == (dds_prescale_ndiv-1))
    dds_prescale_count <= 0;
  else dds_prescale_count <= dds_prescale_count + 1;
end
assign dds_clk = (dds_prescale_count == (dds_prescale_ndiv-1));
// "dds_prescale_count" above could be compared to zero?...

// This is the DDS phase accumulator part
always @(posedge clk)
begin
  if (reset) dds_phase <= 0;
  else if (dds_clk) dds_phase <= dds_phase + dds_phase_increment;
end

assign pulse = dds_phase[`DDS_BITS-1];  // Simple renaming for readability
// This is "rising edge detector" part
always @(posedge clk)
begin
  delayed_pulse <= pulse;
end
assign clk_out = (pulse && ~delayed_pulse);  // Choose the rising edge


endmodule

//`undef DDS_BITS
//`undef DDS_PRESCALE_BITS

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美亚洲自拍偷拍| av高清久久久| 精品国产精品网麻豆系列| 日本视频在线一区| 欧美一级日韩不卡播放免费| 日韩国产精品大片| www国产成人免费观看视频 深夜成人网| 久久99精品国产.久久久久久| 7777精品伊人久久久大香线蕉| 秋霞影院一区二区| 精品久久久久久久人人人人传媒| 国产乱子伦一区二区三区国色天香| 久久精品亚洲国产奇米99| www.成人在线| 亚洲国产综合在线| 精品不卡在线视频| 99久久99久久精品国产片果冻| 亚洲午夜羞羞片| 欧美xxxx老人做受| 91麻豆精品一区二区三区| 性做久久久久久免费观看| 精品国产欧美一区二区| av在线一区二区三区| 天天综合网 天天综合色| 久久久久99精品国产片| 日本久久电影网| 美女网站色91| 亚洲欧美另类图片小说| 日韩一区二区三免费高清| 国产suv精品一区二区三区 | 亚洲九九爱视频| 91精品免费在线观看| 丁香婷婷综合色啪| 日韩和欧美一区二区| 国产精品久久99| 精品日韩一区二区三区免费视频| 97久久人人超碰| 久久成人羞羞网站| 亚洲国产成人高清精品| 国产精品午夜电影| 欧美成人一级视频| 日本韩国欧美国产| 岛国精品一区二区| 久久www免费人成看片高清| 亚洲精品免费电影| 国产欧美一区二区精品性| 9191久久久久久久久久久| 91香蕉国产在线观看软件| 激情都市一区二区| 日韩avvvv在线播放| 亚洲精品欧美激情| 中文字幕亚洲区| 欧美成人一区二区三区在线观看 | 奇米精品一区二区三区在线观看一| 国产精品久久一卡二卡| 久久久综合激的五月天| 制服.丝袜.亚洲.中文.综合| 色婷婷久久久亚洲一区二区三区 | 欧美国产视频在线| 26uuu精品一区二区| 91精品国产全国免费观看| 色丁香久综合在线久综合在线观看| 国产精品自拍毛片| 国产乱淫av一区二区三区| 精品一区二区三区免费视频| 亚洲国产精品久久不卡毛片| 亚洲免费看黄网站| 亚洲美女视频一区| 亚洲欧美日韩在线播放| 亚洲欧洲精品天堂一级| 国产免费成人在线视频| 久久精品网站免费观看| 国产亚洲精品免费| 国产调教视频一区| 国产女同互慰高潮91漫画| 久久久久高清精品| 中文字幕欧美激情| 欧美极品美女视频| 亚洲欧洲精品成人久久奇米网| 国产精品夫妻自拍| 亚洲视频免费看| 亚洲精品第一国产综合野| 一区二区三区在线观看欧美| 夜夜精品浪潮av一区二区三区| 亚洲激情成人在线| 五月婷婷激情综合| 琪琪久久久久日韩精品| 精品在线免费观看| 国产精品夜夜嗨| 成人精品免费网站| 色婷婷久久一区二区三区麻豆| 欧美视频一区在线| 91精品国产综合久久久久久 | jizzjizzjizz欧美| 色综合天天狠狠| 欧美日韩午夜在线| 精品精品国产高清a毛片牛牛 | 91麻豆免费看片| 欧美日韩一区二区三区在线看 | 亚洲精品国产品国语在线app| 亚洲国产成人va在线观看天堂| 天天影视网天天综合色在线播放| 精品伊人久久久久7777人| 国产传媒日韩欧美成人| 91香蕉国产在线观看软件| 欧美日韩高清不卡| 26uuu亚洲综合色欧美| 国产精品素人视频| 亚洲国产毛片aaaaa无费看| 蜜桃视频在线一区| 粉嫩在线一区二区三区视频| 日本韩国一区二区| 精品久久久影院| 一区二区三区中文字幕电影 | 成人av资源网站| 欧美日本免费一区二区三区| 久久久精品黄色| 亚洲成人一区在线| 国产福利精品导航| 欧美日韩精品一区视频| 欧美国产精品专区| 天天色天天操综合| 成人av小说网| 日韩一区二区在线免费观看| 中文字幕一区二区三区四区不卡| 视频一区欧美日韩| 成a人片亚洲日本久久| 欧美大白屁股肥臀xxxxxx| 亚洲精品精品亚洲| 国产精品一卡二卡| 欧美一区二区三区在线视频| 亚洲欧美激情在线| 国产精品 欧美精品| 欧美精品丝袜中出| 亚洲情趣在线观看| 国产传媒久久文化传媒| 欧美一区二区三级| 亚洲网友自拍偷拍| 99re这里都是精品| 日本一区二区视频在线观看| 日韩不卡一区二区| 欧美在线综合视频| 国产精品国产精品国产专区不蜜| 裸体健美xxxx欧美裸体表演| 欧美性一区二区| 亚洲精品日日夜夜| 成人免费的视频| 国产网站一区二区| 国产在线精品不卡| 日韩写真欧美这视频| 亚洲va天堂va国产va久| 欧美午夜一区二区三区| 亚洲欧美一区二区三区国产精品 | 欧美探花视频资源| 中文字幕制服丝袜成人av | 国产精品一区二区果冻传媒| 欧美一区二区三区日韩| 午夜精品久久久久久久99樱桃 | 91蜜桃视频在线| 亚洲欧洲成人精品av97| 丁香激情综合五月| 国产喷白浆一区二区三区| 国产一区二区三区四区五区美女| 精品电影一区二区三区| 精品一二三四在线| 精品国产欧美一区二区| 国产一区二区在线看| 久久久综合网站| 国产高清视频一区| 中文一区一区三区高中清不卡| 成人国产精品免费网站| 国产精品久久久久久一区二区三区| 菠萝蜜视频在线观看一区| 中文字幕在线观看不卡| 91亚洲精华国产精华精华液| 亚洲视频中文字幕| 在线视频综合导航| 亚洲一区二区三区影院| 欧美日韩国产a| 美女高潮久久久| 国产亚洲欧美一区在线观看| aaa亚洲精品| 午夜欧美电影在线观看| 91精品婷婷国产综合久久| 狠狠色2019综合网| 国产视频视频一区| 93久久精品日日躁夜夜躁欧美| 亚洲自拍偷拍网站| 日韩色视频在线观看| 国产精品一线二线三线| 国产精品久久久久久久久搜平片 | 国产色一区二区| 色综合天天综合狠狠| 亚洲成av人在线观看| 日韩美女一区二区三区| 不卡的电视剧免费网站有什么| 亚洲高清三级视频| 久久综合五月天婷婷伊人| 99re视频精品| 免费在线观看一区二区三区|