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

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

?? rs232_syscon_v.htm

?? This a state-machine driven rs232 serial port interface to a "Wishbone" // type of bus.
?? HTM
?? 第 1 頁 / 共 4 頁
字號:
  reset_watchdog <= 0;
  incr_rd_field_count <= 0;
  incr_rd_digit_count <= 0;
  reset_rd_field_count <= 0;
  reset_rd_digit_count <= 0;

  case (m1_state) // synthesis parallel_case

    m1_initial_state :
      begin
        incr_msg_offset <= rs232_tx_load;
        if ((msg_offset == 15) && rs232_tx_load) begin
          m1_next_state <= m1_send_prompt;
          reset_msg_offset <= 1;
        end
        else m1_next_state <= m1_initial_state;
      end

    m1_send_ok :
      begin
        msg_base <= 5'b10101;     // Address of the OK message
        incr_msg_offset <= rs232_tx_load;
        if ((msg_offset == 1) && rs232_tx_load) begin
          m1_next_state <= m1_send_prompt;
          reset_msg_offset <= 1;
        end
        else m1_next_state <= m1_send_ok;
      end

    m1_send_prompt :
      begin
        msg_base <= 5'b10111;     // Address of the cr,lf,prompt message
        incr_msg_offset <= rs232_tx_load;
        if ((msg_offset == 4) && rs232_tx_load) begin
          m1_next_state <= m1_check_received_char;
          reset_cmd_ptr <= 1;
        end
        else m1_next_state <= m1_send_prompt;
      end

    // This state always leads to activating the parser...
    m1_send_crlf :
      begin
        msg_base <= 5'b10111;     // Address of the cr/lf message
        incr_msg_offset <= rs232_tx_load;
        if ((msg_offset == 1) && rs232_tx_load) begin
          m1_next_state <= m1_scan_command;
          reset_cmd_ptr <= 1;
        end
        else m1_next_state <= m1_send_crlf;
      end

    m1_check_received_char :
      begin
        rs232_echo <= 1;          // Allow echoing of characters
        if (rx_char_is_backspace && rs232_tx_load)
        begin
          m1_next_state <= m1_check_received_char;
          decr_cmd_ptr <= 1;     // This effectively eliminates the last char
        end
        else if (rx_char_is_enter && rs232_tx_load)
        begin
          m1_next_state <= m1_send_crlf;
          cmd_buffer_write <= 1;  // Store the enter as "marker" for parsing
          reset_msg_offset <= 1;
        end
        else if (rs232_tx_load && (cmd_ptr == CMD_BUFFER_SIZE_PP-1))
        begin
          m1_next_state <= m1_parse_error_indicator_crlf;
          reset_msg_offset <= 1;
          reset_cmd_ptr <= 1;
        end
        else if (rs232_tx_load)
        begin
          incr_cmd_ptr <= 1;
          cmd_buffer_write <= 1;
          m1_next_state <= m1_check_received_char;
        end
        else m1_next_state <= m1_check_received_char;
      end

    m1_bg_error_indicator :
      begin
        msg_base <= 5'b01011;    // Address of the B character
        incr_msg_offset <= rs232_tx_load;
        if ((msg_offset == 0) && rs232_tx_load) begin
          m1_next_state <= m1_ack_error_indicator;
          reset_msg_offset <= 1;
        end
        else m1_next_state <= m1_bg_error_indicator;
      end

    m1_ack_error_indicator :
      begin
        msg_base <= 5'b10100;    // Address of the ! error message
        incr_msg_offset <= rs232_tx_load;
        if ((msg_offset == 0) && rs232_tx_load) begin
          m1_next_state <= m1_send_prompt;
          reset_msg_offset <= 1;
        end
        else m1_next_state <= m1_ack_error_indicator;
      end

    // This state is used when the line is too long...
    m1_parse_error_indicator_crlf :
      begin
        msg_base <= 5'b10111;    // Address of the cr,lf message.
        incr_msg_offset <= rs232_tx_load;
        if ((msg_offset == 1) && rs232_tx_load) begin
          m1_next_state <= m1_parse_error_indicator;
          reset_msg_offset <= 1;
        end
        else m1_next_state <= m1_parse_error_indicator_crlf;
      end

    m1_parse_error_indicator :
      begin
        msg_base <= 5'b10011;    // Address of the ? message.
        incr_msg_offset <= rs232_tx_load;
        if ((msg_offset == 0) && rs232_tx_load) begin
          m1_next_state <= m1_send_prompt;
          reset_msg_offset <= 1;
        end
        else m1_next_state <= m1_parse_error_indicator;
      end

    m1_cmd_error_indicator :
      begin
        msg_base <= 5'b01100;    // Address of 'C'
        incr_msg_offset <= rs232_tx_load;
        if ((msg_offset == 0) && rs232_tx_load) begin
          m1_next_state <= m1_parse_error_indicator;
          reset_msg_offset <= 1;
        end
        else m1_next_state <= m1_cmd_error_indicator;
      end

    m1_adr_error_indicator :
      begin
        msg_base <= 5'b01010;    // Address of 'A'
        incr_msg_offset <= rs232_tx_load;
        if ((msg_offset == 0) && rs232_tx_load)
        begin
          m1_next_state <= m1_parse_error_indicator;
          reset_msg_offset <= 1;
        end
        else m1_next_state <= m1_adr_error_indicator;
      end

    m1_dat_error_indicator :
      begin
        msg_base <= 5'b01101;    // Address of 'D'
        incr_msg_offset <= rs232_tx_load;
        if ((msg_offset == 0) && rs232_tx_load)
        begin
          m1_next_state <= m1_parse_error_indicator;
          reset_msg_offset <= 1;
        end
        else m1_next_state <= m1_dat_error_indicator;
      end

    m1_qty_error_indicator :
      begin
        msg_base <= 5'b11100;    // Address of 'Q'
        incr_msg_offset <= rs232_tx_load;
        if ((msg_offset == 0) && rs232_tx_load)
        begin
          m1_next_state <= m1_parse_error_indicator;
          reset_msg_offset <= 1;
        end
        else m1_next_state <= m1_qty_error_indicator;
      end

    // The following states are for parsing and executing the command.

    // This state takes care of leading whitespace before the command
    m1_scan_command :
      begin
        rs232_echo <= 1;          // Don't send message characters
        reset_msg_offset <= 1;    // This one reset should cover all of the
                                  // parse/exec. states.  With rs232_echo
                                  // on, and no receive characters arrive,
                                  // then the msg_offset will remain reset.
                                  // This means the watchdog timer can take
                                  // a long time, if need be, during exec.
                                  // (NOTE: It might be better to disable
                                  //  the echoing of rx chars during these
                                  //  states.)
        init_qty <= 1;         // Set qty = 1 by default.  That can be
                               // overridden later, if the command has
                               // a different qty field.
        if (char_is_whitespace) begin
          m1_next_state <= m1_scan_command;
          incr_cmd_ptr <= 1;
        end
        else if (char_is_r) begin
          m1_next_state <= m1_scan_adr_whitespace;
          incr_cmd_ptr <= 1;
          cmd_r <= 1;
        end
        else if (char_is_w) begin
          m1_next_state <= m1_scan_adr_whitespace;
          incr_cmd_ptr <= 1;
          cmd_w <= 1;
        end
        else if (char_is_i) begin
          m1_next_state <= m1_start_execution;
          cmd_i <= 1;
        end
        else m1_next_state <= m1_cmd_error_indicator;
      end

    // The only way to determine the end of a valid field is to find
    // whitespace.  Therefore, char_is_whitespace must be used as an exit
    // condition from the "get_xxx_field" states.  So, this state is used to
    // scan through any leading whitespace prior to it.
    m1_scan_adr_whitespace :
      begin
        rs232_echo <= 1;          // Don't send message characters
        if (char_is_whitespace) begin
          m1_next_state <= m1_scan_adr_whitespace;
          incr_cmd_ptr <= 1;
        end
        else if (char_is_enter) m1_next_state <= m1_start_execution;
        else begin
          m1_next_state <= m1_get_adr_field;
          reset_adr <= 1;
        end
      end

    m1_get_adr_field :
      begin
        rs232_echo <= 1;          // Don't send message characters
        if (char_is_hex) begin
          m1_next_state <= m1_get_adr_field;
          store_adr <= 1;
          incr_cmd_ptr <= 1;
        end
        else if (char_is_whitespace) begin            // Normal exit
          m1_next_state <= m1_scan_dat_whitespace;
        end
        else if (char_is_enter) m1_next_state <= m1_start_execution;
        else m1_next_state <= m1_adr_error_indicator;
      end

    m1_scan_dat_whitespace :
      begin
        rs232_echo <= 1;          // Don't send message characters
        // There is no DAT field for reads, so skip it.
        if (command == `CMD_R) m1_next_state <= m1_scan_qty_whitespace;
        else if (char_is_whitespace) begin
          m1_next_state <= m1_scan_dat_whitespace;
          incr_cmd_ptr <= 1;
        end
        else if (char_is_enter) m1_next_state <= m1_start_execution;
        else begin
          m1_next_state <= m1_get_dat_field;
          reset_dat <= 1;
        end
      end

    m1_get_dat_field :
      begin
        rs232_echo <= 1;          // Don't send message characters
        if (char_is_hex) begin
          m1_next_state <= m1_get_dat_field;
          store_dat <= 1;
          incr_cmd_ptr <= 1;
        end
        else if (char_is_whitespace) begin            // Normal exit
          m1_next_state <= m1_scan_qty_whitespace;
        end
        else if (char_is_enter) m1_next_state <= m1_start_execution;
        else m1_next_state <= m1_dat_error_indicator;
      end

    m1_scan_qty_whitespace :
      begin
        rs232_echo <= 1;          // Don't send message characters
        if (char_is_whitespace) begin
          m1_next_state <= m1_scan_qty_whitespace;
          incr_cmd_ptr <= 1;
        end
        else if (char_is_enter) m1_next_state <= m1_start_execution;
        else begin
          m1_next_state <= m1_get_qty_field;
          reset_qty <= 1;
        end
      end

    m1_get_qty_field :
      begin
        rs232_echo <= 1;          // Don't send message characters
        if (char_is_hex) begin

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲动漫第一页| 久久久久久久av麻豆果冻| 国产成人综合在线| 国产在线一区二区| 久久99国产精品久久99果冻传媒| 婷婷久久综合九色综合绿巨人| 依依成人精品视频| 亚洲一区二区三区精品在线| 一区二区三区四区在线播放| 亚洲精品老司机| 性做久久久久久免费观看欧美| 欧美a级理论片| 国产91富婆露脸刺激对白| 国产一区二区毛片| 国产精品亚洲一区二区三区妖精 | 欧美日本韩国一区二区三区视频| 在线观看一区二区精品视频| 欧美日韩日日骚| 欧美电影在哪看比较好| 日韩欧美国产高清| 国产欧美日韩另类视频免费观看| 中文一区一区三区高中清不卡| 国产精品欧美一区二区三区| 悠悠色在线精品| 日韩电影在线观看一区| 黄色成人免费在线| fc2成人免费人成在线观看播放 | 亚洲地区一二三色| 日本成人超碰在线观看| 国产白丝网站精品污在线入口| 成人av动漫在线| 在线综合亚洲欧美在线视频| 久久青草欧美一区二区三区| 亚洲欧美视频一区| 久久精品国产秦先生| 成人性生交大片免费看视频在线| 91国模大尺度私拍在线视频| 日韩免费观看高清完整版| 中文字幕第一页久久| 日韩专区中文字幕一区二区| 国产福利一区二区| 337p亚洲精品色噜噜狠狠| 久久精品视频在线看| 亚洲一区二区免费视频| 国产一区不卡在线| 欧美三级视频在线观看| 欧美国产精品中文字幕| 蜜乳av一区二区三区| aaa欧美大片| 欧美精品一区二区三区高清aⅴ | 欧美色爱综合网| 国产人成亚洲第一网站在线播放 | 亚洲激情一二三区| 国产精品性做久久久久久| 欧美日韩精品一区二区三区四区| 国产网站一区二区三区| 日本欧美一区二区三区乱码| 欧美亚洲综合久久| 中文字幕第一区综合| 韩国女主播一区| 在线播放亚洲一区| 一区二区三区四区高清精品免费观看 | 一区二区三区鲁丝不卡| 国产盗摄女厕一区二区三区| 制服丝袜亚洲色图| 亚洲一区免费观看| 99国产精品99久久久久久| 久久中文娱乐网| 另类小说欧美激情| 欧美一区二区三区不卡| 石原莉奈一区二区三区在线观看| 91丨porny丨首页| 欧美高清在线精品一区| 国产成a人亚洲| 国产视频一区在线观看| 国产精品456| 国产拍欧美日韩视频二区| 韩国精品主播一区二区在线观看| 欧美一区二区久久| 开心九九激情九九欧美日韩精美视频电影 | 在线观看欧美黄色| 一区二区免费视频| 欧美日韩在线播放三区四区| 亚洲图片有声小说| 6080国产精品一区二区| 美女网站一区二区| 久久综合九色综合97婷婷女人| 蓝色福利精品导航| 国产色综合一区| 91在线精品秘密一区二区| 亚洲综合激情另类小说区| 欧美视频中文一区二区三区在线观看| 亚洲第一成年网| 精品嫩草影院久久| 成人久久18免费网站麻豆| 亚洲欧洲av在线| 欧美日韩日日骚| 激情成人午夜视频| 中文字幕中文字幕一区| 欧美三级视频在线| 精品一区二区三区日韩| 国产精品成人免费在线| 欧美在线播放高清精品| 久久精品国内一区二区三区| 国产亚洲福利社区一区| 欧美体内she精高潮| 免费一级片91| 国产精品灌醉下药二区| 欧美酷刑日本凌虐凌虐| 高清视频一区二区| 一区二区三区免费观看| 精品国产自在久精品国产| 不卡的看片网站| 青青草一区二区三区| 中文字幕制服丝袜成人av| 欧美三级中文字| 北岛玲一区二区三区四区| 香港成人在线视频| 国产精品色婷婷| 91麻豆精品国产无毒不卡在线观看| 国产成人av一区| 亚洲高清免费一级二级三级| 久久久99免费| 欧美高清一级片在线| av一二三不卡影片| 久久国产精品露脸对白| 亚洲v中文字幕| 亚洲欧洲日韩综合一区二区| 久久婷婷国产综合国色天香| 欧美一区二区三区四区五区| 一道本成人在线| 国产激情一区二区三区四区| 日韩电影免费在线| 亚洲天堂a在线| 国产欧美一区二区精品秋霞影院 | 蜜桃一区二区三区在线| 亚洲综合在线视频| 中文字幕一区二区三区四区不卡| 精品电影一区二区三区| 欧美一区二区三区喷汁尤物| 欧美午夜在线一二页| 免费欧美高清视频| 丝袜亚洲另类丝袜在线| 亚洲大片免费看| 亚洲男人的天堂在线观看| 欧美国产激情一区二区三区蜜月| 久久综合久久鬼色中文字| 日韩免费在线观看| 日韩午夜激情视频| 日韩精品中午字幕| 日韩一区二区三区四区| 日韩欧美不卡一区| 91精品国产乱| 日韩欧美一区二区不卡| 欧美一级精品在线| 精品久久免费看| 久久这里只有精品6| 国产女人18毛片水真多成人如厕| 亚洲精品在线三区| 久久久噜噜噜久噜久久综合| 久久久久久久久久电影| 国产日韩欧美精品一区| 中文文精品字幕一区二区| 国产精品美女久久久久aⅴ| 成人欧美一区二区三区白人| 亚洲女性喷水在线观看一区| 亚洲精品中文在线| 亚洲高清不卡在线| 日日夜夜精品视频天天综合网| 日韩国产在线观看一区| 极品美女销魂一区二区三区| 国产成人无遮挡在线视频| 99久久综合精品| 欧美日韩免费电影| 精品国产一区二区亚洲人成毛片 | 日本成人在线一区| 国产麻豆成人传媒免费观看| aaa亚洲精品一二三区| 欧美伊人精品成人久久综合97 | 一区二区三区久久| 免费成人在线视频观看| 福利一区福利二区| 欧美午夜寂寞影院| 久久婷婷色综合| 夜夜夜精品看看| 韩国视频一区二区| 色综合久久88色综合天天| 777午夜精品视频在线播放| 国产亚洲欧美日韩在线一区| 亚洲影视资源网| 国产精品一区二区在线观看不卡| 色综合色狠狠天天综合色| 日韩一级完整毛片| 亚洲同性同志一二三专区| 理论片日本一区| 91久久精品一区二区三| 久久久久国产精品厨房| 亚洲国产成人av| 91小视频在线观看| 精品不卡在线视频|