【文章內容簡介】
:= count2+1。 if(count1 = ???) then out1 = not out1。 count1 = 0。 end if。 if(count2 = ???) then out2 = not out2。 count2 := 0。 end if。 end if。 end if。 end process。 end Behavioral。 物理與電子工程學院 10 Cnt1: sig Cnt2: var 2,2 2,3 4,4 物理與電子工程學院 11 觸發(fā)器設計 library IEEE。 use 。 entity dff is port( d,clk:in std_logic。 q: buffer std_logic。 qbar: out std_logic)。 end dff。 architecture not_ok of dff is begin process(clk) begin if(clk39。event and clk=39。139。)then q=d。 進程結束后才生效 qbar=not q。進程結束后才生效, q的值此時還沒更新 ! end if。 end process。 end architecture not_ok。 物理與電子工程學院 12 qbar延遲了一個周期 物理與電子工程學院 13 改進的設計 library IEEE。 use 。 entity dff is port( d,clk:in std_logic。 q: buffer std_logic。 qbar: out std_logic)。 end dff。 architecture ok of dff is begin process(clk) begin if(clk39。event and clk=39。139。)then q=d。 end if。 end process。 qbar=not q。 end