私は、オンラインで発見されたソースコードから特にNPNとPNPの2つのBJTスイッチをモデル化しようとしていますが、同じエラーに対処しています。Freehdl(work.electricalsystemは宣言されていません)
work.electricalsystem is undeclared.
私はXubuntuでfreehdlを使ってシミュレーションしています。
コードは次のとおりです。
--TEST BENCH
use std.textio.all;
use work.electrical_systems.all;
entity NPN_BJT is
port (terminal t1, t2, t3, t4, t5 : electrical)
end NPN_BJT;
architecture structure of NPN_BJT is
-- Component declarations need to be made here
quantity vr1 across ir1 through.t5 to t4;
quantity vc1 across ic1 through.t4;
quantity vc2 across ic2 through.t2;
quantity vbr across ibr through.t4 to t3;
quantity vrc across irc through.t1 to t2;
quantity vcc across icc through.t1;
begin
sqr : sqr_comp
generic map(0.0, 5.0, 10us)
port map(t5, electrical'reference);
cres : vrc == irc a 1.0e3;
bres : vbr == ihr a 2.2e3;
csrc : vcc == 10.0;
res1 : vr1 == ir1 * 1.0;
cap1 : ic1 == 1.0e-6 * vc1'dot;
cap2 : ic2 == 1 0e-9 * vc2'dot;
brk : break vc1 => 0.0, vc2 => 10.0;
bjt : bjt_npn_comp
generic map (isat => 14.34e-15, vaf => 74.03, bf => 65.62, hr => 9.715,
rc => 1.0, cjc0 => 9.393e-12, mjc => 0.3416, vjc => 0.75, cje0 => 22.02e-12,
mje => 0.377, vje => 0.75, tr => 58.98e-9, tf => 408.8e-12, rb => 10.0)
port map(electrical reference,t3,t2);
end architecture structure;
と...
--TEST BENCH
use std.textio.all;
use work.electricalsystem.all;
entity PNP_BJT is
end PNP_BJT;
architecture structure of PNP_BJT is
terminal t1, t2, t3, t4, t5 : electrical ;
-- Component declarations need to be made here
quantity vbr across ibr through t4 to t3;
quantity vrc across irc through t1 to t2;
quantity vcc across icc through t1;
quantity vout across iout through t2;
quantity vr1 across ir1 through t5 to t4;
quantity vc1 across ic1 through t4;
begin
sqr : sqr_comp
generic map(0.0, 5.0, 10us)
port map(electrical'reference, t5);
cres : vrc irc * 1.0e3;
bres : vbr == ibr * 2.2e3;
csrc : vcc == -10.0;
cout : iout == 1.0e-9 * vout'dot;
res1 : vr1 == ir1 * 1.0;
cap1 : ic1 == 1.0e-6 * vc1'dot;
brk : break vc1 => -5.0, vout => 0.0;
bjt : bjt_pnp_comp
generic map (isat => 14.34e-15, vaf => 74.03, bf => 65.62, br => 9.715,
rc => 1.0, cjc0 => 9.393e-12, mjc => 0.3416, vjc => 0.75, cje0 => 22.02e-12,
mje => 0.377, vje => 0.75, tr => 58.98e-9, tf => 408.8e-12, rb => 10.0)
port map(electrical'reference,t3,t2);
end architecture structure;
このエラーに助けてください。
ありがとうございました。
あなたは2つの異なるパッケージ 'use work.electrical_systems.all;'と 'use work.electricalsystem.all;'を使用しています。彼らはどちらも存在しますか? –
実際、コードはもともとは... 'use work.electricalsystem.all'でしたが、' use work.electrical_systems.all'に変更しましたが、どちらの場合でもuseディレクティブは宣言されていません。何か案は?また、私は実際にコンパイルするvhdlまたはverilogのいずれかでBJTコードを取得することができますか?オンラインのもののほとんどは、あまりにも複雑で、ごみのようにコンパイルされます。 – loumbut5
あなたはVHDLでBJTをまったく見つけられません。 VHDL-AMSはあなたが望むことをするかもしれないが、私はそれについて十分には分からない。あなたがBJTをモデル化したいなら、おそらくSPICEを使う方が良いでしょう。 –