1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Nios II メモ

Last updated at Posted at 2019-07-07

良く調べることをメモします。

ドキュメント

Performance Counter

参考:ALTERA 28-1 パフォーマンスカウンタコア
https://www.intel.co.jp/content/dam/altera-www/global/ja_JP/pdfs/literature/hb/nios2/qts_qii55001_j.pdf

Plat formdesigner → IP Catalog → Performance Counter Unit Intel FPGA IP を追加
「Number of ssimultaneously-measured sections」は測定する箇所の個数を、プルダウンから選択する。

コード中に以下を追記する。

hoge.c
#include "altera_avalon_performance_counter.h"
~中略~
PERF_RESET (PERFORMANCE_COUNTER_0_BASE);
PERF_START_MEASURING(PERFORMANCE_COUNTER_0_BASE);
PERF_BEGIN (PERFORMANCE_COUNTER_0_BASE, 1); //複数個所の場合は、2、3とする。
//ここに測定したいコードを書く
PERF_END (PERFORMANCE_COUNTER_0_BASE, 1); //複数個所の場合は、2、3とする。
PERF_STOP_MEASURING(PERFORMANCE_COUNTER_0_BASE);
perf_print_formatted_report(PERFORMANCE_COUNTER_0_BASE, ALT_CPU_CPU_FREQ,1,"test section 1");//複数個所の場合は引数を増やす。

データ型

##小手先高速化

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?