![]() |
|
|
|
#1 |
|
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; Tao Chen |
|
|
![]() |
| Thread Tools | Search this Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| VHDL problem with variables | krkrkr | Hardware | 0 | 10-16-2009 07:36 PM |
| vhdl std_logic_vector slice access problem | topi1234 | Software | 0 | 04-18-2008 12:07 PM |
| VHDL problem - Signal counter cannot be synthesized, bad synchronous description. | shipacpoloy | Software | 0 | 08-14-2007 07:26 AM |
| Problem in VHDL code. | caylakprogramci | Hardware | 2 | 05-07-2007 07:30 PM |
| Re: Serious Computer Problem | hootnholler | A+ Certification | 1 | 11-24-2003 12:18 PM |