Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

System Verilog restriction on assignments/NBA

Status
Not open for further replies.

polu

Newbie level 6
Joined
Jan 31, 2006
Messages
13
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,373
Hi,
System verilog LRM says:
Automatic variables and members or elements of dynamic variables—class properties and dynamically
sized variables—shall not be written with nonblocking, continuous, or procedural continuous assignments.
References to automatic variables and elements or members of dynamic variables shall be limited to procedural
blocks.

Can somebody tell what is the reason behind this restriction. Why can't we have continuous assignments and NBA assignments in the dynamic code.


Thanks.
 

Re: SystemVerilog restriction on assignments/NBA

You need to get the latest 1800-2012 LRM. It removes restrictions on NBAs to class properties.

The restriction on automatic variables is easy to explain. Automatic variables only exist while you are executing a procedural block of code, and you can only reference them from within the procedural block that is currently executing. So even without this restriction, you could never refer to an automatic variable in a continuous assignment or port connection. The issue with NBA's to automatic variables is that you could be scheduling an assignment to a variable in the future that could disappear when it's time to do the update. Trying to make that safe operation is a big implementation problem. In any case, you typically use NBA's when there is one process assigning a variable, and another process reading the same variable concurrently. So it is likely that you would want to be using a static, or more globally visible variable anyways.

The restrictions on dynamically allocated variables has lots of little issues that the IEEE committee has yet to deal with, like this one with an NBA to a queue.

If you have a continuous assignment like

assign aWire = aClassHandle.aVariable; you would need to guard against a fatal null handle reference at time 0.

Getting to these issues is a matter of priority.

Dave Rich
IEEE 1800 SystemVerilog Technical Co-chair
Mentor Graphics
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top