Verilogを使用して2つのピンをアルテラのFPGAに接続しようとしています。fpga Verilogの入力ピンに入力ピンを割り当てる
具体的には、inout
ピンをinput
ピンに接続しています。私はエラーが発生します。
ピン "<名>は、" 複数のドライバ
エラーは、このリンク上で説明されています。
これが解決策です:
module multi_driver(inout o, input a, b, en);
// Input a directly drives the bidir pin w/o a tri-state condition
assign o = a;
// If en = 1 below, there will be an electrical conflict in the design.
// To avoid this possibility, the Quartus II software issues an error
assign o = (en) ? b : 1'bz;
endmodule
誰かがラインassign o = (en) ? b : 1'bz;
が正確に何を説明してもらえますか?
[Verilog疑問符(?)演算子の可能な複製](http://stackoverflow.com/questions/12336139/verilog-question-mark-operator) –
あなたが言及したコードは解決策ではありませんが、誤ったコードの例: "たとえば、次のデザインが正しく合成されていません"。 – Qiu