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

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

?? onewire_master.vhd

?? something is very important in life. So read it. Try reading it,. I do not care. Please read it/ Ple
?? VHD
?? 第 1 頁 / 共 3 頁
字號(hào):
-------------------------------------------------------------------------------

-- Title      : 1-Wire Master

-- Project    : 

-------------------------------------------------------------------------------

-- File       : onewire_master.vhd

-- Author     : Davy Huang <Dai.Huang@Xilinx.com>

-- Company    : Xilinx, Inc.

-- Created    : 2001/01/31

-- Last Update: 2001-04-18

-- Copyright  : (c) Xilinx Inc, 2001

-------------------------------------------------------------------------------

-- Uses       : SHReg, BitReg, ByteReg, CRCReg, JCounter

-------------------------------------------------------------------------------

-- Used by    : 1-Wire Interface

-------------------------------------------------------------------------------

-- Description: This is the master module to drive the Serial Number Device.

--

--              When communicate with the Serial Number Device, this module

--              works as the master, while the Serial Number Device works as

--              slave. For more information about the Serial Number Device,

--              please refer to the datasheet at:

--              http://www.dalsemi.com/datasheets/pdfs/2401.pdf

--

--              This module has been verified to work with Dallas DS2401 

--              Silicon Serial Number Device and DS2430A EEPROM.

--

--              The function provided by this master module include:

--              (1) Send "Reset Pulse" to the Serial Number Device to reset it

--              (2) Detect "Presence Pulse" from the Serial Number Device

--              (3) Control data flow on the bidirectional one-wire bus which

--                  connects the Serial Number Device and this master module

--                  through one-wire.

--              (4) Read in the 8 bytes of data from the Serial Number Device

--                  which include the family code (x01), the serial number

--                  (6 bytes), and the CRC value (1 byte)

--              (5) Output the data to the data bus (data) as individual

--                  bytes (total 8 bytes) with a data enable signal

--                  (data_valid)  as the strobe signal.

--                  The data bytes follow the sequence:

--                      1. Family Code:    (e.g. 0x01 for DS2401 device)

--                      2. Serial Number (Byte 0) 

--                      3. Serial Number (Byte 1) 

--                      4. Serial Number (Byte 2) 

--                      5. Serial Number (Byte 3) 

--                      6. Serial Number (Byte 4) 

--                      7. Serial Number (Byte 5) 

--                      8. CRC Value 

--              (6) (optional) Calculate CRC and match it with the CRC value

--                  received from the device.

--              (7) Assert CRC OK if [a] all the bytes has been received and

--                  sent out to the data bus, and [b] CRC values are

--                  matched ([b] is optional).

--              (8) Output the 48 bits serial number at the parallel port

--                  (sn_data)

--

--              This module needs an 1MHz (1us period) clock input.

-------------------------------------------------------------------------------

-- Revisions  :

-- Date        Version  Author  Description

-- 2001/01/31  1.0      Davy    Create the initial design

-- 2001/02/07  1.1      Davy    First release

-- 2001/02/08  1.2      Davy    Clearify/revise the comments

-- 2001/02/16  1.3      Davy    Remove one clock input, optimize design

-- 2001/02/23  1.3      Davy    Change name to onewire_master

-- 2001/03/06  1.3      Davy    Fix the timing spec err in INIT state

-- 2001/03/15  1.4      Davy    Change crc_ok to make it happen earlier, then

--                              use crc_ok to lead FSM back to INIT if CRC

--                              fails; Add parallel output

-- 2001/04/12  1.5      Davy    (1)detect pull-up in RX_PRE_PLS

--                              (2)use register instead of latch for din_pp

--                              (3)use register instead of latch for crcok_i

--                              (4)register the data_valid signal

-------------------------------------------------------------------------------

library IEEE;

use IEEE.STD_LOGIC_1164.ALL;

use IEEE.STD_LOGIC_ARITH.ALL;

use IEEE.STD_LOGIC_UNSIGNED.ALL;



-- synthesis translate_off

-- synopsys translate_off

library unisim;

use unisim.vcomponents.all;

-- synopsys translate_on

-- synthesis translate_on



entity onewire_master is

    generic (CheckCRC : boolean := true);         -- turn on crc check circuit

                                                  -- if it's true; otherwise

                                                  -- the crc circuit will be

                                                  -- removed to save registers

                                                  

    port (

           clk_1MHz  : in  std_logic;             -- clock (typical 1 MHz)

                                                  

           reset     : in  std_logic;             -- reset this circuit,

  

           dq        : inout std_logic;           -- connect to external

                                                  -- one-wire bus.

                                                  -- A pullup resistor must be

                                                  -- attached to this wire

                                                  -- either externally or

                                                  -- internally.

                                                  

           

           data      : out std_logic_vector(7 downto 0); 

                                                  -- data output

                                                  -- A byte of data will be

                                                  -- available on this data bus

                                                  -- when data_valid is

                                                  -- asserted.

           

           data_valid: out std_logic;             -- data enable strobe,

                                                  -- indicates a byte of valid

                                                  -- data (20us pulse)

                                                  

           crcok     : out std_logic;             -- if CheckCRC = true, crcok

                                                  -- will give the result of

                                                  -- crc verification;

                                                  -- otherwise it will be

                                                  -- forced to '1' when all the

                                                  -- data have been received.

                                                  

           sn_data   : out std_logic_vector (47 downto 0)

                                                  -- The parallel output of the

                                                  -- serial number. If crcok

                                                  -- is active, sn_data will be

                                                  -- valid 48bits serial number

                                                  

              );

end onewire_master;



architecture rtl of onewire_master is



  ----------------------------------------------------------------------------

  -- Components Declaration

  ----------------------------------------------------------------------------



  component IOBUF  -- I/O Bidirectional buffer (T=0 : I=>IO; T=1: IO=>O)

    port (

               I : in std_logic;

               T : in std_logic;

              IO : inout std_logic;

               O : out std_logic);

  end component;  



  component SHReg  -- Parameterisable Shift Register

   generic (

          width  : natural;

        AsynReset: boolean;

        circular : boolean);

    port (

           reset : in  std_logic; -- synchronous reset

           clk   : in  std_logic;

           en    : in  std_logic;

           q     : out std_logic_vector((width - 1) downto 0) );

  end component;

 

  component BitReg  -- Parameterisable Bit Register

    generic ( numBits : integer);

  port (

           clk   : in  std_logic;

           reset : in  std_logic; -- asynchronous reset

           din   : in  std_logic; 

           en    : in  std_logic_vector((numBits - 1) downto 0);

           dout  : out std_logic_vector((numBits - 1) downto 0));

  end component;  

 

  component ByteReg  -- Parameterisable Byte Register

     generic ( numBytes : integer);

   port (

            clk   : in  std_logic;

            reset : in  std_logic; -- asynchronous reset

            din   : in  std_logic_vector(7 downto 0); 

            en    : in  std_logic_vector((numBytes - 1) downto 0);

            dout  : out std_logic_vector((numBytes * 8 -1) downto 0));

  end component;  

 

  component JCounter -- Parameterisable Johnson Counter 

   generic (

           width : natural;

        AsynReset: boolean);  -- use asynchronous reset if true

   port (  

           reset : in std_logic; 

             clk : in std_logic;

              en : in std_logic;

               q : out std_logic_vector((width - 1) downto 0));

  end component;



  component CRCReg --  Parameterisable CRC Shift Register 

    generic (

           width : natural;         

       feedback1 : natural;

       feedback2 : natural);  

    port (

           reset : in std_logic; -- asynchronous reset

             clk : in std_logic;           

              en : in std_logic;            

              d  : in std_logic;            

               q : out std_logic_vector((width - 1) downto 0));  

  end component;

 

  ----------------------------------------------------------------------------

  -- Signals Declaration

  ----------------------------------------------------------------------------

 

  -- FSM States

  type FSMState is (INIT, TX_RST_PLS, RX_PRE_PLS, TX_RD_CMD,

                    RX_DATA, IDLE);





  -- The state variables for the fsm

  signal thisState, nextState : FSMState;



  -- constant to issue Read ROM Command for DS2401 Serial Number Device

  -- which is either 0x33h (for both DS2401 and DS2430A)

  -- or 0x0Fh (for DS2401 only).

  constant ReadROMCmd       :  std_logic_vector(7 downto 0) := "00110011";





  -- command data bit to transmit

  signal tx_cmd_bit    : std_logic;



  -- internal generated clock (50KHz)

  signal clk_50KHz   : std_logic;

  

  -- time slot identification signals

  signal ts_60_to_80us  : std_logic;

  signal ts_0_to_10us   : std_logic;

  signal ts_0_to_1us    : std_logic;

  signal ts_14_to_15us  : std_logic;



  -- signals for shift register 1 (SR1)

  signal sr1_reset : std_logic;

  signal sr1_en    : std_logic;

  signal sr1_q     : std_logic_vector (7 downto 0);



  -- signals for shift register 2 (SR2)

  signal sr2_reset : std_logic;

  signal sr2_en    : std_logic;

  signal sr2_q     : std_logic_vector (7 downto 0);



  -- signals for Johnson counter 1(JC1)

  signal jc1_reset : std_logic;

  signal jc1_q     : std_logic_vector (1 downto 0);

    

  -- signals for Johnson counter 2(JC2)

  signal jc2_q     : std_logic_vector (9 downto 0);

    

  

  -- signals for the bidirectional data I/O buffer and data path

  signal din        : std_logic;  -- data from one-wire bus

  signal dout       : std_logic;  -- data to one-wire bus

  signal d_ctrl     : std_logic;  -- 0: dout=>dq (write to the bus)

                                  -- 1: din<=dq (read from the bus)

  signal din_pp     : std_logic;  -- data of presence pulse 

                                  -- it'll be 0 if presence pulse is detected.

  

  -- signals for bit register (BitReg)

  signal bitreg_en : std_logic_vector(7 downto 0); -- enable signal to load

                                  -- one bit of data into the register

  

  -- signals for byte register (ByteReg)

  signal bytereg_en : std_logic_vector(5 downto 0); -- enable signal to load

                                  -- one byte of data into the register

  

  -- several data valid signals

  signal databit_valid: std_logic;-- databit_valid signal generated from sr1

                                  -- (which identifies states), it's

                                  -- 1us pulse. It indicates

                                  -- the valid data received from the 

                                  -- Serial Number Device, excludes

                                  -- the Presence Pulse.

                                  



  signal databyte_valid: std_logic;

                                  -- valid signal for receiving a byte of

                                  -- the number data from the Serial Number

                                  -- Device.

                                  -- Include: family code, serial number

                                  -- and crc value. It's 1 us pulse.

  

  -- signals for CRC check circuit

  signal crcreg_en : std_logic;   -- enable one bit data loaded into

                                  -- the CRC Register.



  signal crcvalue_i: std_logic_vector (7 downto 0); -- The calculated

                                  -- CRC value from the CRC register

  



  -- some internal signals for internal wiring

  signal data_i  : std_logic_vector(7 downto 0); -- to data output

  signal crcok_i : std_logic;                 -- to crcok output





  -- some signals for wiring



  signal vcc : std_logic;



  signal gnd : std_logic;



  

begin



  -------------------------------------------------------------------

  -- internal wiring

  -------------------------------------------------------------------

  vcc     <= '1';



  gnd     <= '0';



  data    <= data_i;           -- a byte of number data to outside

  

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久久久青草大香线综合精品| 亚洲一区二区三区小说| 欧美一级二级三级蜜桃| 欧美自拍丝袜亚洲| 色婷婷久久一区二区三区麻豆| 99精品视频在线观看免费| www.欧美.com| 99精品国产一区二区三区不卡| 99精品久久只有精品| 色婷婷综合五月| 在线观看成人小视频| 欧美色图一区二区三区| 欧美日韩国产成人在线免费| 欧美区在线观看| 日韩一区二区三免费高清| 日韩欧美专区在线| 日韩免费看的电影| 国产亚洲美州欧州综合国| 国产午夜精品一区二区三区四区| 欧美激情综合五月色丁香| 日本一区二区视频在线观看| 亚洲欧洲一区二区三区| 亚洲精品ww久久久久久p站| 亚洲与欧洲av电影| 亚洲gay无套男同| 秋霞午夜av一区二区三区| 经典一区二区三区| 成人美女视频在线看| 色综合中文字幕国产 | 亚洲国产sm捆绑调教视频 | 成人夜色视频网站在线观看| www.欧美.com| 在线91免费看| 久久久久久久久久久99999| 欧美激情在线免费观看| 亚洲精品国久久99热| 天天综合色天天| 国内国产精品久久| 99久久免费国产| 欧美人xxxx| 国产欧美中文在线| 亚洲午夜私人影院| 国产原创一区二区| 91国在线观看| 欧美成人vr18sexvr| 中文字幕一区二区三区蜜月| 午夜精品一区二区三区三上悠亚| 国产一区二区0| 91女厕偷拍女厕偷拍高清| 91精品国产一区二区三区香蕉| 久久久九九九九| 亚洲综合激情网| 国产精品羞羞答答xxdd| 色综合久久88色综合天天| 欧美成人女星排名| 亚洲另类春色校园小说| 久久国内精品自在自线400部| 97国产一区二区| 日韩久久久精品| 亚洲激情中文1区| 国产永久精品大片wwwapp| 色狠狠一区二区三区香蕉| 亚洲精品在线一区二区| 亚洲一区二区三区四区不卡| 国产成人在线视频播放| 在线播放亚洲一区| 国产精品美日韩| 久久aⅴ国产欧美74aaa| 欧美这里有精品| 国产精品私人影院| 久久超碰97人人做人人爱| 欧美亚一区二区| 国产精品久久久一本精品| 久久国产剧场电影| 国产精品国产a| 蜜桃视频在线观看一区二区| 日本韩国欧美国产| 国产精品美女久久久久高潮| 捆绑变态av一区二区三区| 91官网在线免费观看| 国产精品久久久久一区二区三区共 | 中文字幕一区二区三区四区| 国产一区二区三区精品欧美日韩一区二区三区| 色94色欧美sute亚洲线路一ni| 国产欧美一区二区在线观看| 久久99久久精品欧美| 制服视频三区第一页精品| 亚洲精品菠萝久久久久久久| 成人理论电影网| 久久久99免费| 加勒比av一区二区| 日韩欧美一区二区免费| 天堂av在线一区| 欧美天天综合网| 亚洲老司机在线| 91在线视频播放地址| 国产精品福利一区| 国产91综合网| 欧美高清一级片在线观看| 久久精品99久久久| 51午夜精品国产| 亚洲高清在线视频| 一本久久精品一区二区| 国产精品乱子久久久久| 国产乱对白刺激视频不卡| www国产亚洲精品久久麻豆| 久久国产精品99久久人人澡| 欧美日韩激情一区二区| 一区二区久久久| 色婷婷激情一区二区三区| 亚洲欧洲日本在线| 精油按摩中文字幕久久| 日韩一级黄色大片| 美女精品一区二区| 69堂成人精品免费视频| 亚洲成人av电影在线| 99久久久国产精品免费蜜臀| 中文字幕中文字幕一区| 色综合色综合色综合色综合色综合 | 国产视频911| 粉嫩av一区二区三区粉嫩| 国产精品蜜臀av| 在线观看不卡一区| 日本不卡的三区四区五区| 欧美成人vr18sexvr| 高清不卡在线观看| 亚洲视频一区二区在线观看| 欧美午夜精品一区二区三区| 日本最新不卡在线| 精品国精品国产| 成人不卡免费av| 亚洲永久精品大片| 欧美一区二区三区视频在线 | 成人免费电影视频| 亚洲自拍与偷拍| 欧美成人欧美edvon| www.日韩在线| 日韩高清不卡在线| 国产亚洲精品aa| 91麻豆福利精品推荐| 日韩国产欧美在线观看| 欧美精品一区二区三区四区 | 亚洲影院久久精品| 欧美精品色一区二区三区| 久久精品二区亚洲w码| 欧美国产精品一区二区| av在线不卡免费看| 亚洲一区二区三区视频在线播放| 欧美午夜宅男影院| 麻豆国产精品一区二区三区| 欧美极品另类videosde| 日本高清不卡aⅴ免费网站| 午夜视频在线观看一区二区| 欧美成人女星排名| 成人激情动漫在线观看| 一区二区三区在线视频免费| 欧美一区二区视频在线观看2022 | www日韩大片| 欧美色综合网站| 国产一区二区三区美女| 亚洲伦理在线精品| 欧美欧美欧美欧美首页| 国产综合色精品一区二区三区| 中文字幕一区二区在线播放| 欧美视频完全免费看| 国产最新精品精品你懂的| 亚洲欧美偷拍三级| 欧美日韩日本视频| 国产精品一二一区| 日韩国产欧美在线播放| 亚洲少妇最新在线视频| 国产日产欧美一区二区三区 | 水蜜桃久久夜色精品一区的特点| 中文成人av在线| 日韩视频123| 日本韩国精品一区二区在线观看| 国产精品一区二区在线播放| 三级在线观看一区二区| 亚洲欧美成人一区二区三区| 国产日韩一级二级三级| 91精品国产日韩91久久久久久| 色妞www精品视频| 国产成人av电影在线| 久热成人在线视频| 日日噜噜夜夜狠狠视频欧美人 | 亚洲欧美偷拍另类a∨色屁股| 久久综合九色综合欧美98| 8v天堂国产在线一区二区| 一本高清dvd不卡在线观看| 成人性色生活片| 国产精品一区二区三区乱码| 日韩一区欧美二区| 亚洲精品乱码久久久久久黑人| 自拍偷在线精品自拍偷无码专区 | 亚洲色图.com| 国产精品久久久久久久久免费相片 | 三级久久三级久久| 亚洲一区二区三区四区在线观看| 亚洲精品国产第一综合99久久 | 一区二区免费在线|