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

 

Accellera

Analog and Mixed-signal Extensions to Verilog HDL

Version 2.3.1, June 1, 2009

In order to derive a new nature from flow or potential of a discipline, the nature declaration shall also include the discipline name followed by the hierarchical separator (.) and the keyword flow or potential, as shown for Ttl_net_curr in the example below.

A nature derived from the flow or potential of a discipline can declare additional attributes or override values of the attributes already declared.

Examples:

nature Ttl_net_curr : Ttl.flow; // from the example in 3.6.2.5 endnature // abstol = 10u as modified in ttl

nature Ttl_net_volt : Ttl.potential; // from the example in 3.6.2.5 abstol = 1m; // modified for this nature

maxval = 12.3; // new attribute for this nature endnature

3.6.2.7 User-defined attributes

Like natures, a discipline can specify user-defined attributes. Discipline user-defined attributes are useful for the same reasons as nature user-defined attributes (see 3.6.1.3).

3.6.3 Net discipline declaration

Each net_discipline declaration associates nets and regs with an already declared discipline. Syntax 3-6 shows how to declare disciplines of nets and regs.

net_declaration ::=

// from A.2.1.3

...

 

| discipline_identifier [ range ] list_of_net_identifiers ;

 

| discipline_identifier [ range ] list_of_net_decl_assignments ;

 

...

 

range ::= [ msb_constant_expression : lsb_constant_expression ]

// from A.2.5

list_of_net_decl_assignments ::= net_decl_assignment { , net_decl_assignment }

// from A.2.3

list_of_net_identifiers ::= ams_net_identifier { , ams_net_identifier }

// from A.2.4

net_decl_assignment ::=

net_identifier = expression

 

| net_identifier { dimension } = constant_optional_arrayinit

 

ams_net_identifier ::=

 

net_identifier { dimension }

 

| hierarchical_net_identifier

 

 

 

Syntax 3-6—Syntax for net discipline declaration

 

If a range is specified for a net, the net is called a vector net; otherwise it is called a scalar net. A vector net is also called a bus.

Examples:

electrical [MSB:LSB] n1; // MSB and LSB are parameters voltage [5:0] n2, n3;

magnetic inductor;

39

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

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