RE: [sv-bc] SV-BC #110 - 2-State Divide by 0 question

From: Rich, Dave <Dave_Rich@mentorg.com>
Date: Tue Nov 23 2004 - 17:29:57 PST

Cliff,

I looked at this a while ago and found that there is no easy way to
define a 2-state division that is backward compatible with Verilog. For
example

integer A = 100 / 0;

Is this a 2-state division?

or what about

integer A;
int B;

A = A << B/0;

Are the above a 2 or 4-state divisions.

I think it may be useful to use context determination rules similar to
those used for width or signed determination.

'100/0' in the example above should return 1'bx because it is being used
in the context of a 4-state assignment.

'B/0' would be a 2-state division because it is a self-determined
expression.

I would like to use the same rules for determining the result of an out
of range array reference. Currently, the spec says to return the default
un-initialized value. I think designers would rather see it return 'x
when used in a 4-state context.

Dave

-----Original Message-----
From: owner-sv-bc@eda.org [mailto:owner-sv-bc@eda.org] On Behalf Of
Clifford E. Cummings
Sent: Tuesday, November 23, 2004 4:06 PM
To: sv-bc@eda.org
Subject: [sv-bc] SV-BC #110 - 2-State Divide by 0 question

Hi, All -

Don Mills and I have been asked to make a proposal for Issue #110 on
divide
by 0 in 2-state.

I believe Don and I will propose that divide by 0 in 2-state just gives
zero as a result. The problem is that the errata refers to a 1364
section
and I am not sure where we should add this in the SystemVerilog
standard.
There is no addition-operator related section in the SV standard to
amend
with this information.

Any suggestions?

Regards - Cliff

----------------------------------------------------
Cliff Cummings - Sunburst Design, Inc.
14314 SW Allen Blvd., PMB 501, Beaverton, OR 97005
Phone: 503-641-8446 / FAX: 503-641-8486
cliffc@sunburst-design.com / www.sunburst-design.com
Expert Verilog, SystemVerilog, Synthesis and Verification Training
Received on Tue Nov 23 17:30:02 2004

This archive was generated by hypermail 2.1.8 : Tue Nov 23 2004 - 17:30:08 PST