fc2ブログ

[Quartus]トラブルシューティング

■Niosメモリ初期値データ生成方法1 = これやってもシミュレーションに使える.datとか見当たらない。
NiosII SBT > BSPフォルダをActive > メニューのProject > Properties > Nios II BSP Properties > ModelSim Only, no hardware support

■Niosメモリ初期値データ生成方法2 = これで.hex、.datが生成される。
NiosII SBT > アプリケーションフォルダ(BSPでない方)をActive
 > 右クリック > Make Targets > Build > mem_init_generateを選択 > Build
 > 以下.hex、.datが生成される。確かaltsyncramでは.hexか.mifしか読み込めないので.datは使えないと記憶。
    PJフォルダ\software\appliフォルダ\mem_init\nios_mem.hex
    PJフォルダ\software\appliフォルダ\mem_init\hdl_sim\nios_mem.dat

■QuartusII 13.1 ModelSim Alteraが起動できない原因
Quartus > Tools > Options > General > EDA Tool Options >
誤: C:\altera\13.1\modelsim_ase\win32aloem\
正: C:\altera\13.1\modelsim_ase\win32aloem ⇒ 末尾に\を追加。
RTLシミュレーション方法
Quaruts > Tools > Run Simulation Tool > RTL Simulation > これでModelSimが起動した。


■Nios II SBT

test.c:91:1: warning: control reaches end of non-void function [-Wreturn-type]

main関数の末尾に
return 0;
を書かないと出るWARNING



test.c:30:6: warning: return type of 'main' is not 'int' [-Wmain]


main関数を、intで宣言しないと出るWARNING
誤: void main() {
正: int main() {



defineとかparameter設定ファイルのパスが異なる

Quartus > Assignments > Settings > Libraries > Project Libraries
ここにdefine宣言とかparameter宣言のファイルがあるフォルダを指定しておけば自動的に読み込んでくれる。



Error (10200): Verilog HDL Conditional Statement error at xxxx.v(8): cannot match operand(s) in the condition to the corresponding edges in the enclosing event control of the always construct

ここを参考にさせてもらった。
http://exp1gw.ec.t.kanazawa-u.ac.jp/PCIF-2/faq.html

こう書いてたらエラーが出た。

always @(posedge clk or negedge rstn) begin
if (wei & ~ff) begin
mem[mem_waddr] <= dati;
end
end

rstnは論理に無関係なので、正しくは以下だった。これでエラー消えた。

always @(posedge clk) begin
if (wei & ~ff) begin
mem[mem_waddr] <= dati;
end
end
スポンサーサイト



カレンダー
12 | 2017/01 | 02
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31 - - - -
累積訪問者
現在の訪問者
現在の閲覧者数:
最新記事
最新トラックバック
最新コメント
月別アーカイブ
カテゴリ
プロフィール

bobgosso

Author:bobgosso
FPGAのブログへようこそ!

検索フォーム
RSSリンクの表示
リンク
ブロとも申請フォーム

この人とブロともになる

QRコード
QRコード