process(reset, clk) begin -- Lighting frequency is 1KHz if reset='1' then lcnt <= (others => '0'); elsif clk'event and clk='1' then if lcnt = conv_std_logic_vector(clk_frequency, 16) then lcnt <= (others => '0'); else lcnt <= lcnt + 1; end if; end if; end process;
こうした。
process(clk) begin -- Lighting frequency is 1KHz if clk'event and clk='1' then if reset='1' then lcnt <= (others => '0'); elsif lcnt = conv_std_logic_vector(clk_frequency, 16) then lcnt <= (others => '0'); else lcnt <= lcnt + 1; end if; end if; end process;
この結果、非同期リセットのMAPの結果は以下の通り。
Design Summary -------------- Number of errors: 0 Number of warnings: 2 Logic Utilization: Number of Slice Flip Flops: 22 out of 3,840 1% Number of 4 input LUTs: 72 out of 3,840 1% Logic Distribution: Number of occupied Slices: 46 out of 1,920 2% Number of Slices containing only related logic: 46 out of 46 100% Number of Slices containing unrelated logic: 0 out of 46 0% *See NOTES below for an explanation of the effects of unrelated logic Total Number of 4 input LUTs: 87 out of 3,840 2% Number used as logic: 72 Number used as a route-thru: 15 Number of bonded IOBs: 19 out of 173 10% IOB Flip Flops: 5 Number of GCLKs: 1 out of 8 12%
Total equivalent gate count for design: 750 Additional JTAG gate count for IOBs: 912 Peak Memory Usage: 135 MB Total REAL time to MAP completion: 10 secs Total CPU time to MAP completion: 6 secs
次に、同期リセットに修正したMAP結果は以下の通り。
Design Summary -------------- Number of errors: 0 Number of warnings: 2 Logic Utilization: Number of Slice Flip Flops: 22 out of 3,840 1% Number of 4 input LUTs: 33 out of 3,840 1% Logic Distribution: Number of occupied Slices: 27 out of 1,920 1% Number of Slices containing only related logic: 27 out of 27 100% Number of Slices containing unrelated logic: 0 out of 27 0% *See NOTES below for an explanation of the effects of unrelated logic Total Number of 4 input LUTs: 48 out of 3,840 1% Number used as logic: 33 Number used as a route-thru: 15 Number of bonded IOBs: 19 out of 173 10% IOB Flip Flops: 5 Number of GCLKs: 1 out of 8 12%
Total equivalent gate count for design: 507 Additional JTAG gate count for IOBs: 912 Peak Memory Usage: 135 MB Total REAL time to MAP completion: 11 secs Total CPU time to MAP completion: 7 secs
Number of Slice Flip Flops:は22で同じだけれども、Number of 4 input LUTs: は非同期リセットが72、同期リセットが33で、同期リセットのほうが半分以下になっている。 さらにFloorplanerでも比較してみた。右が非同期リセット、左が同期リセットだ。