Documentos de Académico
Documentos de Profesional
Documentos de Cultura
Verilog AMS
Mast
use ieee.electrical_systems.all; p
+
entity capacitor is
generic( V
valor_capacitor: real);
port( i -
terminal p, m : electrical); m
end entity capacitor;
1
10/05/2013
entity derivador is
input output
port (quantity input: real;
quantity output: real); S
end entity derivador;
2
10/05/2013
nature electrical is
voltage across
current through
ground reference;
nature magnetic is
mmf across
flux through
magnetic_ground
reference;
3
10/05/2013
nature thermal is
temperature across
thermal_power through
thermal_ground reference;
nature fluidic is
pressure across
flow through
fluidic_ground_reference;
TERMINAL
4
10/05/2013
QUANTITY
Entity CB is
T1 Terminal positivo
I1 I2 V
T2 Terminal negativo
5
10/05/2013
ATRIBUTOS
6
10/05/2013
Ejemplo:
SENTENCIA SIMULTNEA IF
Se utiliza para especificar el comportamiento analgico de un sistema
basado en un conjunto de condiciones.
Ejemplo:
7
10/05/2013
Ejemplo:
SENTENCIA BREAK
La sentencia break permite especificar condiciones iniciales
Ejemplo:
8
10/05/2013
Ejemplo
CONSTANTES
Cumplen las mismas funciones que en VHDL digital.
La declaracin tiene la siguiente sintaxis:
Ejemplo:
GENRICOS
Sirven para configurar al modelo de acuerdo a una lista de parmetros.
Se deben declarar en la entidad.
Ejemplo:
9
10/05/2013
LIBRERA IEEE
PAQUETES PARA LA SIMULACIN DE SISTEMAS MULTI DOMINIO
Dominio Utilizacin
Elctrico use ieee.electrical_systems.all
Math_Real(1076.2)
Entidad (entity)
10
10/05/2013
Arquitectura (architecture)
Nombre arquitectura
declaracin
Nombre de la entidad
architecture behav of vsource is
MODELADO CONSERVATIVO
FUENTE DE CORRIENTE DE DC
use ieee.electrical_systems.all;
entity fuente_corriente is m
generic(
valor_corriente: real); i
port(
terminal p, m : electrical); p
end entity fuente_corriente;
11
10/05/2013
FUENTE DE TENSIN DE DC
use ieee.electrical_systems.all;
entity fuente_tension is
p
generic(
valor_tension: real); +
port(
V
terminal p, m : electrical);
end entity fuente_tension; i -
m
architecture simple of fuente_tension is
quantity v across i through p to m;
begin
v==valor_tension;
end architecture simple;
RESISTENCIA
p +
use ieee.electrical_systems.all;
entity resistor is
generic( V
valor_resistencia: real);
port( i
terminal p, m : electrical);
end entity resistor; m -
12
10/05/2013
CAPACITOR
p
use ieee.electrical_systems.all;
+
entity capacitor is V
generic(
valor_capacitor: real); i -
port( m
terminal p, m : electrical);
end entity capacitor;
INDUCTOR
p +
use ieee.electrical_systems.all;
V
entity inductor is
generic(
valor_inductor: real); i m -
port(
terminal p, m : electrical);
end entity capacitor;
13
10/05/2013
ARMANDO UN CIRCUITO
CON COMPONENTES
-- DEFINICIoN DE UNA FUENTE DE TENSION DE ALTERNA
-- ESQUEMATICO:
-- p o----(~)----o m
LIBRARY DISCIPLINES;
LIBRARY IEEE;
USE DISCIPLINES.ELECTROMAGNETIC_SYSTEM.ALL;
USE IEEE.MATH_REAL.ALL;
ENTITY fuente IS
PORT(TERMINAL p,m: ELECTRICAL);
END;
ARCHITECTURE behav OF fuente IS
QUANTITY v_in ACROSS i_out THROUGH p TO m;
BEGIN
v_in==10.0 * sin (2.0*3.14*500.0 * now);
END;
-- ESQUEMATICO:
-- p o----/\/\/\----o m
LIBRARY DISCIPLINES;
USE DISCIPLINES.ELECTROMAGNETIC_SYSTEM.ALL;
ENTITY resistor IS
PORT (TERMINAL p,m : ELECTRICAL);
END resistor;
ARCHITECTURE behav OF resistor IS
QUANTITY r_e ACROSS r_i THROUGH p TO m;
BEGIN
r_i == r_e/10.0;
END behav;
14
10/05/2013
-- p o----()()()----o m
LIBRARY DISCIPLINES;
USE DISCIPLINES.ELECTROMAGNETIC_SYSTEM.ALL;
ENTITY l IS
PORT(TERMINAL p,m: ELECTRICAL);
END l;
ARCHITECTURE behav OF l IS
QUANTITY u_l ACROSS i_l THROUGH p TO m;
BEGIN
u_l==10.0e-3 * i_l'dot;
END;
--TEST BENCH
LIBRARY DISCIPLINES;
USE DISCIPLINES.ELECTROMAGNETIC_SYSTEM.ALL;
ENTITY circuito IS
END;
ARCHITECTURE behav OF network IS
TERMINAL n1,n2: ELECTRICAL;
BEGIN
vsrc: ENTITY fuente (behav)
PORT MAP (n1, electrical_ground);
r1: ENTITY resistor (behav)
PORT MAP (n1, n2);
l1: ENTITY l (behav)
PORT MAP (n2, electrical_ground);
END;
15
10/05/2013
Rectificador de
Vs R media onda
LIBRARY DISCIPLINES;
LIBRARY IEEE;
USE DISCIPLINES.ELECTROMAGNETIC_SYSTEM.ALL;
USE IEEE.MATH_REAL.ALL;
--entity declaration
ENTITY hwr IS
END hwr;
t1 D t2
Vs R
16
10/05/2013
t1 D t2
BEGIN -- behavior
Vs R
--diode equations
END behavior ;
MODELADO NO CONSERVATIVO
VHDL AMS permite el modelado utilizando tcnicas de flujo de seales.
17
10/05/2013
BLOQUE DE GANANCIA
input output
K
in1 out
+
in2
entity sumador is
generic (k1, k2 : real :=1);
port (quantity in1, in2 :in real;
quantity out: out real);
end entity sumador;
18
10/05/2013
DERIVADOR
input output
S
entity derivador is
port (quantity input: real;
quantity output: real);
end entity derivador;
19