ネットリスト・ビューワ

netlistviewer

時々は、ネットリスト・ビューワを使うのも有用です。

// FPGA
if(get_now == 1'b1) begin
    rx_shift <= {rx2, rx_shift[7:1]}; //LSB first
end

assign get_now = (async_count ==  9 || async_count == 17 || async_count == 25
               || async_count == 33 || async_count == 41 || async_count == 49
               || async_count == 57 || async_count == 65 )? 1'b1 : 1'b0;

netlistviewer2

比較器Equal*は、なぜ32-bit幅なのでしょうか?そうです、Verilogでは、整数はsigned 32-bitなのです。16’h9, 16’h11等々と明示的に書くべきでした。

assign get_now = (async_count == 16'h9  || async_count == 16'h11 || async_count == 16'h19
               || async_count == 16'h21 || async_count == 16'h29 || async_count == 16'h31
               || async_count == 16'h39 || async_count == 16'h41 )? 1'b1 : 1'b0;

そらね!

netlistviewer3

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.