freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

基于fpga的串口設(shè)計(jì)微電子論文-資料下載頁

2025-06-22 01:18本頁面
  

【正文】 etb=reset,bclk=b)。 —頂層映射 u2:reciever port map(bclkr=b,resetr=reset,rxdr=rxd,r_ready=rec_ready, rbuf=rec_buf)。 u3:transfer port map(bclkt=b,resett=reset,xmit_cmd_p=xmit_cmd_p_in,txdbuf=txdbuf_in, txd=txd_out,txd_done=txd_done_out)。 end Behavioral 。(2)波特率發(fā)生器模塊()library ieee。use 。use 。use 。entity last isport (resetb : in std_logic。 clk: in std_logic。 bclk: out std_logic)。end last。architecture cc of last issignal clk_t : unsigned(3 downto 0)。signal clk_bit : std_logic。beginprocess(clk,resetb)beginif(resetb=39。139。) thenclk_t=0000。clk_bit=39。039。elsif rising_edge(clk) thenif (clk_t=4) thenclk_t=0000。clk_bit=not clk_bit。elseclk_t= clk_t+1。end if。end if。end process。bclk=clk_bit。end cc。(3)UART接收器()library ieee。use 。use 。use 。entity reciever is generic (framlenr:integer:=8)。 port(bclkr,resetr,rxdr:in std_logic。 —定義輸入輸出信號 r_ready:out std_logic。 rbuf:out std_logic_vector(7 downto 0))。end reciever。architecture Behavioral of reciever is type states is (r_start,r_center,r_wait,r_sample,r_stop)。 —定義各個狀態(tài) signal state :states:=r_start。 signal rxd_sync:std_logic。beginprol :process (rxdr) begin if rxdr =39。039。 then rxd_sync=39。039。 else rxd_sync =39。139。 end if。end process。pro2:process (bclkr,resetr,rxd_sync) —主控時序、組合進(jìn)程 variable count :std_logic_vector (3 downto 0)?!x中間變量 variable rt: integer:=0。 variable rbufs:std_logic_vector(7 downto 0)。begin if resetr =39。139。 then state =r_start。count:=0000。 —復(fù)位 elsif rising_edge (bclkr) then case state is when r_start = —狀態(tài)1,等待起始位 if rxd_sync=39。039。 then state=r_center。r_ready=39。039。rt:=0。 else state =r_start。r_ready=39。039。 end if。 when r_center= —狀態(tài)2,求出每位的中點(diǎn) if rxd_sync =39。039。 then if count =0100 then state =r_wait 。count:=0000。 else count :=count+1。state=r_center。 end if 。 else state=r_start。 end if。 when r_wait= —狀態(tài)3,等待狀態(tài) if count =1101 then if rt=framlenr then state =r_stop。 else state =r_sample 。 end if 。 count:=0000。 else count:=count+1。state=r_wait。 end if。when r_sample=rbufs(rt):=rxd_sync。rt:=rt+1。state=r_wait?!獱顟B(tài)4,數(shù)據(jù)采樣檢測 when r_stop=r_ready=39。139。rbuf=rbufs。state=r_start。 —狀態(tài)4,輸出幀接收完畢信號 when others =state=r_start。 end case。 end if。end process。end Behavioral 。(4):UART發(fā)送器()library ieee。use 。use 。use 。entity transfer is generic (framlent :integer :=8)。 port (bclkt,resett,xmit_cmd_p:in std_logic。 —定義輸入輸出信號 txdbuf:in std_logic_vector(7 downto 0):=11001010。 txd:out std_logic。 txd_done:out std_logic)。end transfer。architecture Behavioral of transfer is type states is (x_idle,x_start,x_wait,x_shift,x_stop)。 —定義各個子狀態(tài) signal state :states:=x_idle。 signal tt :integer:=0。beginprocess(bclkt,resett,xmit_cmd_p,txdbuf) —主控時序、組合進(jìn)程 variable xt16:std_logic_vector(4 downto 0):=00000?!x中間變量 variable xbitt :integer:=0。 variable txds:std_logic。begin if resett=39。139。 then state =x_idle。 txd_done=39。039。txds:=39。139。 —復(fù)位 elsif rising_edge(bclkt) then case state is when x_idle= —狀態(tài)1,等待數(shù)據(jù)幀發(fā)送命令 if xmit_cmd_p=39。139。 then state =x_start。 txd_done=39。039。 else state =x_idle 。 end if。 when x_start= —狀態(tài)2,發(fā)送信號至起始位 if xt16=01111 then state =x_wait。xt16:=00000。 else xt16:=xt16+1。txds:=39。039。state=x_start。 end if 。 when x_wait= —狀態(tài)3,等待狀態(tài) if xt16=01110 then if xbitt=framlent then state =x_stop。xbitt:=0。 else state =x_shift。 end if。 xt16:=00000。 else xt16:=xt16+1。state=x_wait。 end if。 when x_shift=txds:=txdbuf(xbitt)。xbitt:=xbitt+1。state=x_wait。 —狀態(tài)4,將待發(fā)數(shù)據(jù)進(jìn)行并串轉(zhuǎn)換 when x_stop= —狀態(tài)5,停止發(fā)送狀態(tài) if xt16=01111 then if xmit_cmd_p=39。039。 then state =x_idle。xt16:=00000。 else xt16:=xt16。state=x_stop。 end if。txd_done=39。139。 else xt16:=xt16+1。txds:=39。139。state=x_stop。 end if。 when others=state =x_idle。 end case。 end if。 txd=txds。 end process。end Behavioral。
點(diǎn)擊復(fù)制文檔內(nèi)容
規(guī)章制度相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1