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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? top.v

?? This build is for developing a "binary-to-BCD" converter for use in // displaying numerals in base-
?? V
字號:
//-----------------------------------------------------------------------------
//
// Author: John Clayton
// Date  : Aug.   18, 2003
// Update: Aug.   18, 2003 Obtained this file from "build_16" project.
//                         Removed extraneous code.
// Update: Nov.   24, 2003 Added "binary_to_bcd" instantiation and tested it.
// Update: Nov.   25, 2003 Added "bcd_to_binary" instantiation and tested it.
//                         Modified the register structure to provide for
//                         different test modes, including digit blanking
//                         which adjusts to displaying BCD digits or hex.
//                         Removed VGA LCD panel display driver and clock DLL
//                         circuitry preparatory to publishing this work.
//
// Description
//-----------------------------------------------------------------------------
// This targets an XC2S200E board which was created for educational purposes.
//
// There are:
//    8  LEDs (led[7:0])
//    4  switches (switch[3:0])
//    1  clock, present on GCLK1
//    1  clock, present on GCLK0
//    Many different I/O lines.  See PNDKR-1E reference manual for more details
//-----------------------------------------------------------------------------
//
// NOTE: This build is for developing a "binary-to-BCD" converter for use in
//       displaying numerals in base-10 so that people can read and interpret the
//       numbers more readily than they could if the numbers were displayed in
//       binary or hexadecimal format.  Also, a "BCD-to-binary" converter is
//       tested in this build.
//
// The following 'include line must be used with Synplify to create EDIF
// The line must be commented for ModelSim.
//`include "d:\synplicity\synplify_70\lib\xilinx\virtex.v"


`define SLOW_CE_TIMEOUT     12000    // 250us clock enable, based on 48MHz clock

module top (
  clk_0,
  clk_1,           // Unused
  switch,
  led,
  extra,           // extra pads
  A,
  rs232_0_o,       // rs232 is "B" port
  rs232_0_i,       // COM0 is serial debugger...
  rs232_1_o,       // COM1 is simple loopback
  rs232_1_i,
  C,               // LCD panel driver port, unused here
  D,               // Huge 48 bit IO port, unused here
  E,               // 18 bit IO port, used for some debugging
  F                // 18 bit IO port, used to drive LED display
  );

// I/O declarations
input clk_0;      // 48 MHz
input clk_1;
input [3:0] switch;
input rs232_0_i;
input rs232_1_i;
input [7:0] A;

output [12:0] extra;
output [7:0] led;
output [15:0] C;
output [47:0] D;
output [17:0] E;
output [17:0] F;
output rs232_0_o;
output rs232_1_o;

// Internal signal declarations

wire [4:0] r0_wire;  // "Read" regs.  Used to "hold" pin locations, so that
                     // the synthesis tools do not complain about these pins
                     // being present in the constraints file and not in the
                     // design...

     // System Clock signals
reg  [13:0] slow_ce_timer; // counter used to generate slow clock enables
wire slow_ce;              // a slow clock enable pulse

     // Signals from rs232_syscon
wire [15:0] adr;        // A side address
wire [7:0] dat;         // A side data
wire we;
wire stb;
wire rst;
wire master_br;

    // Address decode signals
wire       io_space;    // High for access to I/O space (AUX bus)
wire [3:0] io_sel;      // 1 of these is active high for I/O space accesses

    // LED display signals
wire [27:0] led_data;     // one nibble per digit
wire [7:0]  led_segments; // decimal point to be ignored...
wire [6:0]  led_commons;  // one per digit
wire [3:0]  led_bars;     // one cathode per display bar
wire [6:0]  led_digit_on; // used for digit blanking
wire [6:0]  led_digit_force_on; // used for digit blanking

    // Binary-BCD conversion signals
wire [15:0] binary_source; // Register data used to test conversions
wire start_slow_bcd;       // Start signal that lasts for many clocks
wire start_fast_bcd;       // Start signal that lasts for one clock
wire start_pulse_bcd;      // The final selected start signal
wire done_bcd;
wire start_slow_bin;       // Start signal that lasts for many clocks
wire start_fast_bin;       // Start signal that lasts for one clock
wire start_pulse_bin;      // The final selected start signal
wire done_bin;
wire [23:0] bcd_data;      // 6 digits of BCD data
wire [15:0] bin_data;      // 4 digits of binary data
wire start_fast_reset;     // Reset used to clear registers after 1 clock
wire [2:0] convert_mode;   // [0] bypasses second converter.
                           // [1] is "autorun" for first converter
                           // [2] is "autorun" for second converter

    // Other...
wire reset = switch[0];  // Simply a renaming exercise

wire [7:0]  a_led;       // For displaying data on LEDs
wire [7:0]  reg_led;     // For displaying register on LEDs

// For debugging
wire [5:0] debug;

//--------------------------------------------------------------------------
// Clock generation
//--------------------------------------------------------------------------

// Generate a 250us clock enable signal for use by the LED display
always @(posedge clk_0)
begin
  if (reset || slow_ce) slow_ce_timer <= 0;
  else slow_ce_timer <= slow_ce_timer + 1;
end
assign slow_ce = (slow_ce_timer == `SLOW_CE_TIMEOUT);

//--------------------------------------------------------------------------
// Module instantiations and code
//--------------------------------------------------------------------------

// Assign values to ports
assign rs232_1_o = rs232_1_i;  // RS232 loopback on COM1
assign extra = 13'hzzzz;
assign C = 16'hzzzz;
assign D = 48'hzzzzzzzzzzzz;
assign E = {18'hzzzzz,debug};  // Lazily concatenate debug signals to lsbs
                               // of port E.  Whatever the size of the debug
                               // signals, they just "shove over" the extra
                               // "z" signals, and the synthesizer drops
                               // the extra ones anyway.

// Here are the debug signals
assign debug = {start_fast_bin,start_slow_bin,done_bin};


// This block is the rs232 user interface for debugging, programming etc.
rs232_syscon #(
               4,             // Number of Hex digits for addresses.
               2,             // Number of Hex digits for data.
               2,             // Number of Hex digits for quantity.
               16,            // Characters in the input buffer
               4,             // Bits in the buffer pointer
               63,            // Clocks before watchdog timer expires
               6,             // Bits in watchdog timer
               8,             // Number of data fields displayed per line
               3,             // Number of bits in the fields counter
               2              // Number of bits in the digits counter
               )
  syscon_1 (                  // instance name
  .clk_i(clk_0),
  .reset_i(reset),
  .master_bg_i(master_br),
  .ack_i(io_space),
  .err_i(1'b0),
  .master_adr_i(),
  .master_stb_i(),
  .master_we_i(),
  .rs232_rxd_i(rs232_0_i),
  .dat_io(dat),
  .rst_o(rst),
  .master_br_o(master_br),
  .stb_o(stb),
  .cyc_o(),
  .adr_o(adr),
  .we_o(we),
  .rs232_txd_o(rs232_0_o)
  );

assign io_space   = ((adr[15:8]  == 8'hff) && stb); // last 256 bytes
assign io_sel   = (io_space)?(1 << adr[4:3]):0;

// Some signals are included in this XOR so that the optimizer will not
// erroneously optimize logic away "because no outputs are connected."
// Basically, I want the switch inputs to be used no matter what.
assign a_led = (switch==4'b0100)?8'haa:debug;
assign led = ~(reg_led ^ a_led);  // LEDS are active low, so invert

reg_8_iorw_clrset #(
             8,                        // Size of r0
             8,                        // Size of r1
             8,                        // Size of r2
             1,                        // Size of r3
             1,                        // Size of r4
             8,                        // Size of r5
             7,                        // Size of r6
             8,                        // Size of r7
             8                         // Size of the data bus.
             )
  reg_8_block1                // Instance name
  (
   .clk_i(clk_0),
   .rst_i(reset),
   .clr_i(8'b00000000),
   .set_i(8'b00000000),
   .sel_i(io_sel[0]),
   .we_i(we),
   .rd_i(8'b00000111),        // Determines direction of ports
   .adr_i(adr[2:0]),
   .dat_io(dat),
   .r0_i(8'h55),
   .r1_i(8'haa),
   .r2_i(A),
   .r3_o(),
   .r4_o(),
   .r5_o({led_bars,led_data[27:24]}),
   .r6_o(led_digit_force_on),
   .r7_o(reg_led)
   );

reg_8_iorw_clrset #(
             3,                        // Size of r0
             2,                        // Size of r1
             8,                        // Size of r2
             2,                        // Size of r3
             2,                        // Size of r4
             2,                        // Size of r5
             8,                        // Size of r6
             8,                        // Size of r7
             8                         // Size of the data bus.
             )
  reg_8_block2                // Instance name
  (
   .clk_i(clk_0),
   .rst_i(reset),
   .clr_i({4'b0000,start_fast_reset,3'b000}),
   .set_i(8'b00000000),
   .sel_i(io_sel[1]),
   .we_i(we),
   .rd_i(8'b00000000),        // Determines direction of ports
   .adr_i(adr[2:0]),
   .dat_io(dat),
   .r0_o(convert_mode),
   .r1_o({start_slow_bin,start_slow_bcd}),
   .r2_o(),
   .r3_o({start_fast_bin,start_fast_bcd}),
   .r4_o(),
   .r5_o(),
   .r6_o(binary_source[15:8]),
   .r7_o(binary_source[7:0])
   );
assign start_fast_reset = start_fast_bin || start_fast_bcd;


assign start_pulse_bcd = convert_mode[1]?done_bcd:start_fast_bcd;
binary_to_bcd #(
     16,            // Binary input bits
     6,             // BCD output digits
     4              // Width of bit counter
     )
  binary_to_bcd_1
  (
   .clk_i(clk_0),
   .ce_i(1'b1),
   .rst_i(rst),
   .start_i(start_pulse_bcd || start_slow_bcd),
   .dat_binary_i(binary_source),
   .dat_bcd_o(bcd_data),
   .done_o(done_bcd)
  );


assign start_pulse_bin = convert_mode[2]?done_bin:start_fast_bin;
bcd_to_binary #(
     6,             // Digits of BCD input
     16,            // Binary output bits
     4              // Width of bit counter
     )
  bcd_to_binary_1
  (
   .clk_i(clk_0),
   .ce_i(1'b1),
   .rst_i(rst),
   .start_i(start_pulse_bin || start_slow_bin),
   .dat_bcd_i(bcd_data),
   .dat_binary_o(bin_data),
   .done_o(done_bin)
  );

// The LED data is either the BCD data or the binary data, depending upon
// the state of convert_mode[0]...
// Also, the digits are blanked appropriately depending upon the mode.
// BCD mode displays 5 digits, while binary displays only 4 digits.
// Truly, only 5 BCD digits are needed to represent "65535" which is the
// largest 16-bit binary number.  However, in order to test the behaviour
// of these modules with extra BCD digits, a sixth digit is actually present.
// It can be forced to display by setting the register for "led_digit_force_on"
// When it does display, it will always be zero, since it is an "extra" digit,
// and it is not really needed during the conversions.

assign led_data[23:0] = convert_mode[0]?bcd_data:{8'h00,bin_data};
assign led_digit_on = led_digit_force_on | (convert_mode[0]?7'b0011111:7'b0001111);
led_display_driver #(
      7,               // Digits in LED display
      8,               // Duty cycle
      1,               // Common cathode, segment high=on...
      0,               // Common cathode, no external drive transistors
      3,               // timer runs for this # clock enables per digit
      2,               // width of digit timer
      3                // width of digit counter
      )
  led_muxer_1
  (
   .clk_i(clk_0),
   .ce_i(slow_ce),
   .rst_i(reset),
   .data_i(led_data),
   .point_i(7'b0000000),
   .digit_on_i(led_digit_on),
   .segment_o(led_segments),
   .common_o(led_commons)
   );

// Assign output for LED display
assign F = {led_bars,led_commons,led_segments[6:0]};



endmodule

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91视频.com| 国产乱子伦一区二区三区国色天香| 成人综合日日夜夜| 国产欧美日韩精品一区| 国产成人啪午夜精品网站男同| 久久久久久久久久久久久久久99 | 777午夜精品免费视频| 天堂影院一区二区| 精品国产乱码久久久久久老虎 | 高清成人在线观看| 国产精品国产三级国产普通话三级 | 在线影院国内精品| 首页欧美精品中文字幕| 欧美tickling网站挠脚心| 国产精品亚洲综合一区在线观看| 国产精品妹子av| 欧美亚洲动漫精品| 激情都市一区二区| 亚洲情趣在线观看| 91精品国产综合久久久久久久| 久久99久久精品| 18涩涩午夜精品.www| 欧美精品一二三| 国产成人免费在线观看不卡| 亚洲精品日韩一| 久久综合久久久久88| 色综合久久久久久久久久久| 日本不卡一区二区三区高清视频| 中文字幕免费观看一区| 欧美老女人第四色| 成人免费福利片| 美脚の诱脚舐め脚责91| 成人欧美一区二区三区小说| 欧美日韩免费电影| 成人午夜大片免费观看| 天堂成人免费av电影一区| 国产女主播视频一区二区| 欧美另类高清zo欧美| 国产91在线看| 久久草av在线| 亚洲国产视频a| 国产精品久久久久久福利一牛影视| 中文字幕在线不卡一区二区三区| 欧美性色综合网| 成人在线视频首页| 激情综合一区二区三区| 亚洲一区二区影院| 欧美高清在线一区| 久久亚洲精品国产精品紫薇| 欧美日韩免费电影| 91香蕉国产在线观看软件| 国产在线精品免费| 偷拍自拍另类欧美| 一区二区三区毛片| 亚洲欧洲国产专区| 中文字幕免费观看一区| 精品成人一区二区三区| 欧美一区二区在线视频| 欧美视频一区二区三区| 99久久99久久久精品齐齐| 国产成人一区在线| 国产一区激情在线| 久久精品国产一区二区三区免费看| 亚洲一区二区三区三| 亚洲精品免费电影| 亚洲视频图片小说| 亚洲天堂精品在线观看| 国产精品福利av| 国产精品国产自产拍高清av王其 | 日韩高清不卡在线| 五月天欧美精品| 亚洲bdsm女犯bdsm网站| 午夜精品久久久久影视| 亚洲午夜av在线| 亚洲午夜久久久久久久久电影院| 亚洲乱码国产乱码精品精的特点| 中文字幕一区二区三区视频| 国产精品久久久久久久第一福利| 中文字幕免费观看一区| 国产精品久久毛片a| 中文字幕中文乱码欧美一区二区| 国产精品情趣视频| 中文字幕一区二区三区四区| 综合色中文字幕| 一区二区三区成人| 亚洲成人动漫在线观看| 青草av.久久免费一区| 久久精品国产77777蜜臀| 久久精品99国产精品| 国产精品一二三| 99国产精品99久久久久久| 91久久国产最好的精华液| 欧洲激情一区二区| 亚洲欧洲国产日韩| 夜夜嗨av一区二区三区| 首页国产丝袜综合| 国产精品一区二区三区乱码| 成人在线视频一区| 欧美性一级生活| 精品国产一二三| 国产精品日韩精品欧美在线| 亚洲精品久久久蜜桃| 日本欧美一区二区三区| 狠狠网亚洲精品| gogo大胆日本视频一区| 欧美私模裸体表演在线观看| 91精品国产高清一区二区三区蜜臀| 26uuu色噜噜精品一区二区| 国产精品无码永久免费888| 一区二区三区四区精品在线视频| 日韩激情在线观看| 国产不卡视频在线播放| 欧美视频日韩视频在线观看| 亚洲精品在线观看网站| 亚洲美女在线一区| 精品中文字幕一区二区小辣椒| 成人黄色网址在线观看| 欧美人妖巨大在线| 中文在线一区二区 | 亚洲高清免费一级二级三级| 精品一区二区三区在线视频| 成人黄色在线视频| 日韩免费在线观看| 一区二区不卡在线播放| 国产在线看一区| 欧美吞精做爰啪啪高潮| 国产欧美精品区一区二区三区| 亚洲va韩国va欧美va| 懂色av一区二区三区蜜臀 | 丝袜亚洲另类欧美| 成人动漫一区二区三区| 欧美一级日韩不卡播放免费| 中文字幕一区二区5566日韩| 麻豆精品视频在线观看免费 | 亚洲成人中文在线| 成人免费视频视频在线观看免费 | 精品乱人伦小说| 国产高清不卡二三区| 欧美三级视频在线观看| 国产日韩欧美精品综合| 美女爽到高潮91| 欧美日韩日日夜夜| 亚洲男女一区二区三区| 国产高清在线精品| 欧美v亚洲v综合ⅴ国产v| 亚洲一区二区欧美激情| 99精品桃花视频在线观看| 26uuu精品一区二区三区四区在线| 亚洲成av人片在线观看| 色成人在线视频| 国产精品久线观看视频| 成人免费视频播放| 久久久精品综合| 国内精品伊人久久久久av一坑| 91精品国产91久久综合桃花| 亚洲在线视频免费观看| 色香蕉久久蜜桃| 亚洲色图视频网站| jlzzjlzz国产精品久久| 国产精品成人在线观看| 高清国产一区二区| 中文在线一区二区| 波多野结衣视频一区| 中文字幕乱码久久午夜不卡| 丁香天五香天堂综合| 中文字幕va一区二区三区| 国产成人亚洲精品青草天美| 国产清纯白嫩初高生在线观看91| 国产综合色在线视频区| 久久久影视传媒| 国产99久久久国产精品潘金| 国产精品久久久久毛片软件| 成人高清伦理免费影院在线观看| 中文字幕av一区二区三区| 成人开心网精品视频| 亚洲三级在线观看| 日本精品一级二级| 午夜精品一区二区三区三上悠亚| 欧美绝品在线观看成人午夜影视| 五月天丁香久久| 日韩欧美一二三| 国产精品乡下勾搭老头1| 国产欧美日韩不卡| 91片黄在线观看| 亚洲激情在线播放| 欧美日韩黄色一区二区| 日韩精品免费专区| 久久久精品日韩欧美| 成人av在线观| 午夜伊人狠狠久久| 26uuu色噜噜精品一区二区| 成人激情免费视频| 一区二区三区波多野结衣在线观看| 欧美日韩亚洲综合在线| 精品一区二区免费| 国产精品福利一区| 国产精品午夜在线| 欧美日韩精品一区二区天天拍小说 | 欧美在线色视频| 久久国内精品自在自线400部|