<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??碼云GVP開源項目 12k star Uniapp+ElementUI 功能強大 支持多語言、二開方便! 廣告
                ` `在使用FPGA時,常使用時序電路,利用時鐘邊沿來讀數據或者寫數據,若是對于同一個時鐘,在想通邊沿寫數據和讀數據,是怎么樣的結果? ` `以下是在[iverilog網頁版](https://hdlbits.01xz.net/wiki/Iverilog)測試的module和仿真結果。 ``` module top_module (); reg clk; reg din; reg rst_n; wire [0:0]dout; always #4 clk = ~clk; // Create clock with period=10 initial `probe_start; // Start the timing diagram //`probe(clk); // Probe signal "clk" // A testbench initial begin clk=0; rst_n=0; #10 din = 0; #4 rst_n=1; #4 din=1; #9 din=0; //$display ("Hello world! The current time is (%0d ps)", $time); #100 $finish; // Quit the simulation end test inst1( .rst_n(rst_n), .clk(clk), .div(32'd1) ); `probe(clk); endmodule module test ( input rst_n, input wire clk, input [31:0]div, output clk_ot ); reg [3:0]data; reg rd; always@(posedge clk) if(!rst_n)data <= 0; else data <= data + 1; reg [2:0]cnt; always@(posedge clk) begin if(!rst_n)cnt <= 0; else begin cnt <= cnt + 1; end end reg [3:0]rdata; always@(posedge clk) begin if(!rst_n)rd <= 0; else begin rd <= (cnt%3 == 0)? 1:0; rdata <= (cnt%3 == 0)? data:0; end end `probe(rst_n); `probe(clk); `probe(data); `probe(rd); `probe(rdata); endmodule ``` ![](https://img.kancloud.cn/8c/43/8c43c185bd7abfd4d2e5fcdb49e6eea2_1092x540.png) ` `可以看到讀出的數據,是上一次寫入數據,因此根據時序圖寫時序模塊時,讀取的數據是跳變沿之前緊跟著的數據。
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看