這是原代碼 要求是


這是仿真程式

會出現如下錯誤
ERROR: [Common 17-39] 'launch_simulation' failed due to earlier errors.

我覺得我的代碼應該沒有寫錯,去賽靈思官網看了這個問題的回答也沒用,求大神指教一下這個該怎么辦呢??
萬分感謝!!
uj5u.com熱心網友回復:
錯誤路徑打開elaborate.log查看Vivado Simulator 2018.3
Copyright 1986-1999, 2001-2018 Xilinx, Inc. All Rights Reserved.
Running: E:/vivado/Vivado/2018.3/bin/unwrapped/win64.o/xelab.exe -wto a6f9ffc099a643df897540ea2176c83d --incr --debug typical --relax --mt 2 -L xil_defaultlib -L unisims_ver -L unimacro_ver -L secureip --snapshot tb_gates2_behav xil_defaultlib.tb_gates2 xil_defaultlib.glbl -log elaborate.log
Using 2 slave threads.
Starting static elaboration
ERROR: [VRFC 10-3236] concurrent assignment to a non-net 'b' is not permitted [E:/vivado/gate2/4input.srcs/sim_1/new/tb_gates2.v:30]
ERROR: [VRFC 10-3595] non-net variable cannot be connected to inout port 'b' [E:/vivado/gate2/4input.srcs/sim_1/new/tb_gates2.v:30]
ERROR: [XSIM 43-3322] Static elaboration of top level Verilog design unit(s) in library work failed.
知道是30行左右錯了,那請問哪里錯了呢?
uj5u.com熱心網友回復:
inout b ?雙埠? 不是這樣用的吧改成input吧
uj5u.com熱心網友回復:
一般情況都是仿真代碼寫錯了,比如格式不對,信號沒有定義,語法等錯誤造成的,通過Tcl Console視窗觀察ERRO的行數在哪,對應修改錯誤!或者可在專案檔案>仿真檔案>仿真檔案.sim>compile.log檔案中查看編譯錯誤。這些經驗是我剛在百度發現的,我也是遇到樓主的錯誤,然后用這些方法成功仿真了uj5u.com熱心網友回復:
提示里已經告訴你了:信號b如果定義成inout,不能用reg,改成wire型應該就好了uj5u.com熱心網友回復:
你這個是inout b;這個錯了吧,你應該要輸入的是input b吧uj5u.com熱心網友回復:
接樓上:inout b錯了,改成input b轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/40898.html
標籤:硬件設計
