VHDL-AMS problem

T

Tao Chen

Hi,

I am trying to define an a2d/d2a boundry myself. But "vacom" always
give error on my codes:
Error: The characteristic number (3) does not match the number of
scalar equations (2) [LRM section 12.6.6]

The VHDL-AMS codes are attached below. The purpose of the code is to
convert two digital input "oscon_d" and "icon_d" into analog output
"oscon_a" and "icon_a", and to convert the analog input "vout_a" into
the digital output "vout_d".

The reason seems to be that the equation number is smaller than the
variable number. But one of my terminal ("vout_a") is connected to a
spice netlist and its voltage is determined by the result of the spice
simulation, so I cannot give the equation on that voltage. My question
is, how should I deal with such a situation? Thanks!

-----------------------------------
------ The source file ---------
-----------------------------------
library disciplines;
use disciplines.electromagnetic_system.all;

library ieee;
use ieee.std_logic_1164.all;

entity boundry is

generic (
tf : real := 0.1e-9; -- falling time
tr : real := 0.1e-9; -- rising time
vhigh : real := 1.8;
vlow : real := 0.0;
threshold:real := 0.9);

port (
signal oscon_d : in std_logic; -- oscon from digital to analog
signal icon_d : in std_logic;
signal vout_d : out std_logic;
terminal oscon_a : Electrical;
terminal icon_a : Electrical;
terminal vout_a : Electrical);

end entity boundry;

architecture behavior of boundry is
terminal ground : Electrical; -- global ground
QUANTITY voscon ACROSS ioscon THROUGH oscon_a to ground;
QUANTITY vicon ACROSS iicon THROUGH icon_a to ground;
quantity vvout across ivout through vout_a to ground;
signal oscon_eff : real;
signal icon_eff : real;
begin -- architecture behavior

oscon_eff <= vhigh when (oscon_d = '1') else vlow;
icon_eff <= vhigh when (icon_d = '1') else vlow;

voscon == oscon_eff'Ramp(tr,tf);
vicon == icon_eff'Ramp(tr,tf);

vout_d <= '1' when vvout'above(threshold) else '0';

end architecture behavior;
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

Forum statistics

Threads
473,764
Messages
2,569,566
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top