abra
Newbie level 1
Dear VHDL-AMS expert,
I need an advice for the following codes for transmission line model example. I can compile it, but i will not get any result. Something missing perhaps
.........................................................
entity transmission_line is
port (terminal a,b,g : electrical);
end entity transmission_line;
architecture bhv of transmission_line is
constant Lz : real :=1.0;
constant Cz : real :=1.0;
constant Lenght : real :=1.0;
constant N : real :=5.0;
constant dz : real :=Lenght/N;
constant C : real :=Lz*dz;
constant L : real :=Cz*dz;
constant Zs : real :=1.0;
constant ZL : real :=1.0;
constant Vs : real :=5.0;
quantity Vin across Iin through a to g;
quantity Vout across Iout through b to g;
quantity V1,V2,V3,V4 : real;
quantity I2,I3,I4,I5 : real;
begin
-(V1-Vin) == L*Iin'dot;
-(I2-Iin) == C*V1'dot;
-(V2-V1) == L*I2'dot;
-(I3-I2) == C*V2'dot;
-(V3-V2) == L*I3'dot;
-(I4-I3) == C*V3'dot;
-(V4-V3) == L*I4'dot;
-(I5-I4) == C*V4'dot;
-(Vout-V4) == L*I5'dot;
-(Iout-I5) == C*Vout'dot;
end architecture bhv;
and, when I add inteface condition, I will get "too many equation, ambiguous model".
Vin == Vs - Iin*Zs;
Vout == Iout*ZL;
Thanks in advance
I need an advice for the following codes for transmission line model example. I can compile it, but i will not get any result. Something missing perhaps
.........................................................
entity transmission_line is
port (terminal a,b,g : electrical);
end entity transmission_line;
architecture bhv of transmission_line is
constant Lz : real :=1.0;
constant Cz : real :=1.0;
constant Lenght : real :=1.0;
constant N : real :=5.0;
constant dz : real :=Lenght/N;
constant C : real :=Lz*dz;
constant L : real :=Cz*dz;
constant Zs : real :=1.0;
constant ZL : real :=1.0;
constant Vs : real :=5.0;
quantity Vin across Iin through a to g;
quantity Vout across Iout through b to g;
quantity V1,V2,V3,V4 : real;
quantity I2,I3,I4,I5 : real;
begin
-(V1-Vin) == L*Iin'dot;
-(I2-Iin) == C*V1'dot;
-(V2-V1) == L*I2'dot;
-(I3-I2) == C*V2'dot;
-(V3-V2) == L*I3'dot;
-(I4-I3) == C*V3'dot;
-(V4-V3) == L*I4'dot;
-(I5-I4) == C*V4'dot;
-(Vout-V4) == L*I5'dot;
-(Iout-I5) == C*Vout'dot;
end architecture bhv;
and, when I add inteface condition, I will get "too many equation, ambiguous model".
Vin == Vs - Iin*Zs;
Vout == Iout*ZL;
Thanks in advance