中文字幕 另类精品,亚洲欧美一区二区蜜桃,日本在线精品视频免费,孩交精品乱子片免费

<sup id="3hn2b"></sup>

    1. <sub id="3hn2b"><ol id="3hn2b"></ol></sub><legend id="3hn2b"></legend>

      1. <xmp id="3hn2b"></xmp>

      2. 新聞中心

        EEPW首頁 > 嵌入式系統(tǒng) > 設計應用 > 數(shù)字電路中關鍵路徑的選取

        數(shù)字電路中關鍵路徑的選取

        作者: 時間:2015-11-03 來源:網(wǎng)絡 收藏

          所謂就是,在電路中頻繁調(diào)用,而且延遲過長,或者產(chǎn)生意外的幾率比較大的線路。

        本文引用地址:http://www.antipu.com.cn/article/282237.htm

          怎樣提取

          1:組合電路中的提?。?/p>

          q=a&b&c|d&e&b;

          因為b的傳輸要兩級,

          可以簡單的提取b作為一級的:

          q=(a&c|d&e)&b;

          2: always——block中的關鍵路徑提?。?/p>

          always中關鍵路徑的提取一般用分步法提取,請看下面一個always——block,

          always@(in)

          begin

          if(!a)

          if(c&&(!b&&e))

          out=out1;

          else out=out2;

          else if(b&&e) out =out1;

          end

          這里面e是關鍵路徑,我們可以分兩個步驟提取關鍵路徑

          (1) 當e=1的時候有:

          if(!a)

          if(c&&(!b))

          out=out1;

          else out=out2;

          (2)當e=0的時候有:

          if(!a) out=out2;

          因此這個always可以寫成這個樣子:

          always@(in)

          begin

          if(e)

          if(!a)

          if(c&&(!b))

          out=out1;

          else out=out2;

          else if(!a) out=out2;

          end

          這是中間形式,還要寫成最終形式:

          定義兩個臨時變量,為了在綜合時候不被綜合掉,要定義他們?yōu)檩敵龆丝?output)——切記!!!

          output out_temp1,out_temp2;

          out_temp1=a?out:(c&&(!b))?out1:out2;

          out_temp2=a?out:out2;

          assign out=e?out_temp1:out_temp2;

          3。FSM中的關鍵路徑的提?。宏P于狀態(tài)機,這是FPGA設計必備的基礎,編碼方式有很多中比如:one——hot,or one--cool

          還有就是組合電路和時序 電路的寫法,這里主要講關鍵路徑的提取至于狀態(tài)機的寫法,還是查閱一下資料啊!

          FSM中關鍵路徑的提取方法一般是先將要提取的關鍵路徑去掉

          然后將原來FSM中的next-state用另外一個符號代替,作為次FSM 的輸入,即有主從兩個FSM。

          來看一下這個簡單的狀態(tài)機啊:

          parameter s0=0;

          parameter s1=1;

          parameter s2=2;

          parameter s3=3;

          input in1,in2,in3,set;

          reg[1:0] nextstate,currentstate;

          always@(in1 or in2 or in3 or currentstate)

          begin

          nextstate=s0;// start state

          case(currentstate)

          s0: if(in1&&!set)

          nextstate=s1;

          else if(set) nextstate=s2;

          s1:if(in2&&set)

          nextstate=s3;

          else if(!set) nextstate=s2;

          s2:if(set) nexstate=s3;

          s3:if(in3) nextstate=s0;

          default:nextstate=s0;

          endcase

          end

          好,現(xiàn)在來看第一步,將狀態(tài)機中的關鍵路徑去掉,這里的關鍵路徑為set,試想如果狀態(tài)從s0一路到s3,都是set在起作用,如果有一個不小心的毛刺產(chǎn)生,就會執(zhí)行錯誤的行為,所以這里的set為關鍵路徑。

          提取后的狀態(tài)機如下:

          reg[1:0]temp;

          always@(in1 or in2 or in3 or currentstate)

          begin

          nextstate=s0;// start state

          temp=s0;

          case(currentstate)

          s0: if(in1)

          temp=s1;

          s1:if(in2)

          temp=s3;

          s2: temp=temp;

          s3:if(in3) temp=s0;

          default:temp=s0;

          endcase

          end

          第二步:

          always2(temp or currentstate or set)

          begin

          case(currentstate)

          s0:if(!set)

          nextstate=temp

          else nextstate=s2;

          s1: if(set)

          nextstate=temp;

          else nextstate=s2;

          s2:if(set) nextstate=s3;

          else nextstate=temp;

          s3: nextstate=temp;

          default:nextstate=temp;

          endcase

          end

        數(shù)字濾波器相關文章:數(shù)字濾波器原理


        評論


        相關推薦

        技術專區(qū)

        關閉