Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
VAMS-LRM-2-3-1.pdf
Скачиваний:
43
Добавлен:
05.06.2015
Размер:
3.73 Mб
Скачать

Accellera

 

Version 2.3.1, June 1, 2009

VERILOG-AMS

7. Mixed signal

7.1 Overview

With the mixed use of digital and analog simulators, a common terminology is needed. This clause provides the core terminology used in this LRM and highlights the behavior of the mixed-signal capabilities of Ver- ilog-AMS HDL.

Verilog-AMS HDL provides the ability to accurately model analog, digital, and mixed-signal blocks. Mixed-signal blocks provide the ability to access data and be controlled by events from the other domain. In addition to providing mixed-signal interaction directly through behavioral descriptions, Verilog-AMS HDL also provides a mechanism for the mixed-signal interaction between modules.

Verilog-AMS HDL is a hierarchical language which enables top-down design of mixed-signal systems. Connect modules are used in the language to resolve the mixed-signal interaction between modules. These modules can be manually inserted (by the user) or automatically inserted (by the simulator) based on rules provided by the user.

Connect rules and the discipline of the mixed signals can be used to control auto-insertion throughout the hierarchy. Prior to insertion, all net segments of a mixed signal shall first be assigned a discipline. This is commonly needed for interconnect, which often does not have a discipline declared for it. Once a discipline has been assigned (usually through use of a discipline resolution algorithm), connect modules shall be inserted based on the specified connect rules. Connect rules control which connect modules are used and where are they inserted.

Connect modules are a special form of a mixed-signal module which allow accurate modeling of the interfaces between analog and digital blocks. They help ensure the drivers and receivers of a connect module are correctly handled so the simulation results are not impacted.

This clause also details a feature which allows analog to accurately model the effects the digital receivers for mixed signals containing both drivers and receivers. In addition, special functions provide access to driver values so a more accurate connect module can be created.

The following subclauses define these capabilities in more detail.

7.2 Fundamentals

The most important feature of Verilog-AMS HDL is that it combines the capabilities of both analog and digital modeling into a single language. This subclause describes how the continuous (analog) and discrete (digital) domains interact together, as well as the mixed-signal-specific features of the language.

7.2.1 Domains

The domain of a value refers to characteristics of the computational method used to calculate it. In VerilogAMS HDL, a variable is calculated either in the continuous (analog) domain or the discrete (digital) domain every time. The potentials and flows described in natures are calculated in the continuous domain, while register contents and the states of gate primitives are calculated in the discrete domain. The values of real and integer variables can be calculated in either the continuous or discrete domain depending on how their values are assigned.

Copyright © 2009 Accellera Organization, Inc.

148

 

Accellera

Analog and Mixed-signal Extensions to Verilog HDL

Version 2.3.1, June 1, 2009

Values calculated in the discrete domain change value instantaneously and only at integer multiples of a minimum resolvable time. For this reason, the derivative with respect to time of a digital value is always zero (0). Values calculated in the continuous domain, on the other hand, are continuously varying.

7.2.2 Contexts

Statements in a Verilog-AMS HDL module description can appear in the body of an analog block, in the body of an initial or always block, or outside of any block (in the body of the module itself). Those statements which appear in the body of an analog block are said to be in the continuous (analog) context; all others are said to be in the discrete (digital) context. A given variable can be assigned values only in one context or the other, but not in both. The domain of a variable is that of the context from which its value is assigned.

7.2.3 Nets, nodes, ports, and signals

In Verilog-AMS HDL, hierarchical structures are created when higher-level modules create instances of lower level modules and communicate with them through input, output, and bidirectional ports. A port represents the physical connection between an expression in the instantiating or parent module and an expression in the instantiated or child module. The expressions involved are referred to as nets, although they can include registers, variables, and nets of both continuous and discrete disciplines. A port of an instantiated module has two nets, the upper connection (vpiHiConn) which is a net in the instantiating module and the lower connection (vpiLoConn) which is a net in the instantiated module, as shown in Figure 7-1. The vpiLoConn and vpiHiConn connections to a port are frequently referred to as the formal and actual connections respectively.

Signal out := Net Top.out

 

 

Module Top

+

Net A.a_out

 

Module A

 

+

Net B.b_out

 

out

 

 

+

Net C.c_out

Module B

a_out

 

+

Net D.d_out

 

 

Module C

 

 

 

 

 

 

 

 

Module D

b_out

 

 

 

 

 

 

 

Module

d_out

c_out

vpiHiConn

 

 

 

 

 

 

 

 

Port

 

 

 

 

 

vpiLoConn

 

 

Figure 7-1: Signal “out” hierarchy of net segments

A net can be declared with either a discrete or analog discipline or no discipline (neutral interconnect). Within the Verilog-AMS language, only digital blocks and primitives can drive a discrete net (drivers), and only analog blocks can contribute to an analog net (contributions). A signal is a hierarchical collection of nets which, because of port connections, are contiguous. If all the nets that make up a signal are in the discrete domain, the signal is a digital signal. If all the nets that make up a signal are in the continuous domain, the signal is an analog signal. A signal that consists of nets from both domains is called a mixed signal.

Similarly, a port whose connections are both analog is an analog port, a port whose connections are both digital is a digital port, and a port whose connections are analog and digital is a mixed port.

149

Copyright © 2009 Accellera Organization, Inc. All rights reserved.

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]