Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > VHDL > Legal enable?

Reply
Thread Tools

Legal enable?

 
 
diogratia
Guest
Posts: n/a
 
      09-06-2008
On Sep 6, 5:22 am, (E-Mail Removed) wrote:
>
> (2) There's a technical inconsistency in sec 6.1.1. "only the values
> '0' and 1' shall be used in expressions representing clock levels".
> Then it says that the rising_edge() function is an allowable form of
> clock edge specification, but rising_edge (when elaborated as per LRM
> semantics), uses the To_X01 function which references both 'H' and
> 'L'. Nit-picking, to be sure, but that's what digital designers live
> for
>


1076.6:

6.1.1 Clock signal type

The allowed types for clock signals shall be: BIT, STD_ULOGIC and
their
subtypes (e.g. STD_LOGIC) with a minimum subset of '0' and '1'. Only
the
values 0' and 1' from these types shall be used in expressions
representing
clock levels and clock edges (See 6.1.2).

(Actual language can be important)

Only '1' and '0' are used in expressions representing clock (signal s)
levels in the rising_edge() function:


-------------------------------------------------------------------
-- edge detection

-------------------------------------------------------------------
FUNCTION rising_edge (SIGNAL s : std_ulogic) RETURN BOOLEAN IS
BEGIN
RETURN (s'EVENT AND (To_X01(s) = '1') AND
(To_X01(s'LAST_VALUE) = '0'));
END;

FUNCTION falling_edge (SIGNAL s : std_ulogic) RETURN BOOLEAN IS
BEGIN
RETURN (s'EVENT AND (To_X01(s) = '0') AND
(To_X01(s'LAST_VALUE) = '1'));
END;

------------------------------------------------------------------

Nary an 'U', 'X', 'Z', 'L', 'H', 'W' nor '-' in there.

rising_edge()/falling_edge() uses To_X01() which calls the
cvt_to_x01() to convert state values to logic values.

----------------------------------------------------------
CONSTANT cvt_to_x01 : logic_x01_table := (
'X', -- 'U'
'X', -- 'X'
'0', -- '0'
'1', -- '1'
'X', -- 'Z'
'X', -- 'W'
'0', -- 'L'
'1', -- 'H'
'X' -- '-'
);

----------------------------------------------------------

The implication is that a signal state 'L' is a logic value of '0'
and a logic value of 'H' maps to a state value of '1'. And yes, 'X'
is present as a signal value (the left hand column in the
logic_x01_table). A lookup table is a type conversion function.

Note that no where are 'U','Z', 'W', 'L', 'H' or '-' expressed as
signal values only as signal states.

B.95 expression: A formula that defines the computation of a value.(
7.1 )

Further an expression has a left side and a right side or is a factor/
term (including function calls and type conversions).

Nowhere in the rising_edge()/falling_edge() elaboration is a constant
value evaluated as a left hand side of an expression.

Nowhere in the rising_edge()/falling_edge() elaboration is a constant
value of 'U', 'X', 'Z', 'L','H', 'W', or '-' evaluated as the right
hand side of an expression.

Is the logic_x01_table an expression by itself? It doesn't match the
definition above, it's not a formula.

Note that neither value nor formula are defined in the glossary of the
LRM.

From websters for formula:

3 a: a general fact, rule, or principle expressed in usually
mathematical symbols b: a symbolic expression of the chemical
composition or constitution of a substance c: a group of symbols (as
letters and numbers) associated to express facts or data (as the
number and kinds of teeth in the jaw) concisely d: a combination of
signs in a logical calculus

A table hits definition c., above for formula, a group of symbols
associated to express facts or data.

By this (twisted) chain of logic, 'X' shows up in the elaborated
expression (but not 'U', 'X', 'Z', 'L','H', 'W', or '-').

You were right there was something creeping around in there contrary
to the statement in 6.1.1. It wasn't the 'L' or 'H', though. They
only show up in comments, and while you could have a comment embedded
in an expression:

LRM 13.8:
Furthermore, comments do not influence the execution of a simulation
module; their sole purpose is to enlighten the human reader.

Note that the language doesn't indicate that comments don't have
meaning for synthesis. There appears to be more angels dancing on the
head of that pin, yet.
 
Reply With Quote
 
 
 
 
diogratia
Guest
Posts: n/a
 
      09-06-2008
On Sep 6, 5:22 am, (E-Mail Removed) wrote:
>
> (2) There's a technical inconsistency in sec 6.1.1. "only the values
> '0' and 1' shall be used in expressions representing clock levels".
> Then it says that the rising_edge() function is an allowable form of
> clock edge specification, but rising_edge (when elaborated as per LRM
> semantics), uses the To_X01 function which references both 'H' and
> 'L'. Nit-picking, to be sure, but that's what digital designers live
> for
>


1076.6:

6.1.1 Clock signal type

The allowed types for clock signals shall be: BIT, STD_ULOGIC and
their
subtypes (e.g. STD_LOGIC) with a minimum subset of '0' and '1'. Only
the
values 0' and 1' from these types shall be used in expressions
representing
clock levels and clock edges (See 6.1.2).

(Actual language can be important)

Only '1' and '0' are used in expressions representing clock (signal s)
levels in the rising_edge() function:


-------------------------------------------------------------------
-- edge detection

-------------------------------------------------------------------
FUNCTION rising_edge (SIGNAL s : std_ulogic) RETURN BOOLEAN IS
BEGIN
RETURN (s'EVENT AND (To_X01(s) = '1') AND
(To_X01(s'LAST_VALUE) = '0'));
END;

FUNCTION falling_edge (SIGNAL s : std_ulogic) RETURN BOOLEAN IS
BEGIN
RETURN (s'EVENT AND (To_X01(s) = '0') AND
(To_X01(s'LAST_VALUE) = '1'));
END;

------------------------------------------------------------------

Nary an 'U', 'X', 'Z', 'L', 'H', 'W' nor '-' in there.

rising_edge()/falling_edge() uses To_X01() which calls the
cvt_to_x01() to convert state values to logic values.

----------------------------------------------------------
CONSTANT cvt_to_x01 : logic_x01_table := (
'X', -- 'U'
'X', -- 'X'
'0', -- '0'
'1', -- '1'
'X', -- 'Z'
'X', -- 'W'
'0', -- 'L'
'1', -- 'H'
'X' -- '-'
);

----------------------------------------------------------

The implication is that a signal state 'L' is a logic value of '0'
and a logic value of 'H' maps to a state value of '1'. And yes, 'X'
is present as a signal value (the left hand column in the
logic_x01_table). A lookup table is a type conversion function.

Note that no where are 'U','Z', 'W', 'L', 'H' or '-' expressed as
signal values only as signal states.

B.95 expression: A formula that defines the computation of a value.(
7.1 )

Further an expression has a left side and a right side or is a factor/
term (including function calls and type conversions).

Nowhere in the rising_edge()/falling_edge() elaboration is a constant
value evaluated as a left hand side of an expression.

Nowhere in the rising_edge()/falling_edge() elaboration is a constant
value of 'U', 'X', 'Z', 'L','H', 'W', or '-' evaluated as the right
hand side of an expression.

Is the logic_x01_table an expression by itself? It doesn't match the
definition above, it's not a formula.

Note that neither value nor formula are defined in the glossary of the
LRM.

From websters for formula:

3 a: a general fact, rule, or principle expressed in usually
mathematical symbols b: a symbolic expression of the chemical
composition or constitution of a substance c: a group of symbols (as
letters and numbers) associated to express facts or data (as the
number and kinds of teeth in the jaw) concisely d: a combination of
signs in a logical calculus

A table hits definition c., above for formula, a group of symbols
associated to express facts or data.

By this (twisted) chain of logic, 'X' shows up in the elaborated
expression (but not 'U', 'X', 'Z', 'L','H', 'W', or '-').

You were right there was something creeping around in there contrary
to the statement in 6.1.1. It wasn't the 'L' or 'H', though. They
only show up in comments, and while you could have a comment embedded
in an expression:

LRM 13.8:
Furthermore, comments do not influence the execution of a simulation
module; their sole purpose is to enlighten the human reader.

Note that the language doesn't indicate that comments don't have
meaning for synthesis. There appears to be more angels dancing on the
head of that pin, yet.
 
Reply With Quote
 
 
 
 
diogratia
Guest
Posts: n/a
 
      09-06-2008
On Sep 6, 5:22 am, (E-Mail Removed) wrote:
>
> (2) There's a technical inconsistency in sec 6.1.1. "only the values
> '0' and 1' shall be used in expressions representing clock levels".
> Then it says that the rising_edge() function is an allowable form of
> clock edge specification, but rising_edge (when elaborated as per LRM
> semantics), uses the To_X01 function which references both 'H' and
> 'L'. Nit-picking, to be sure, but that's what digital designers live
> for
>


1076.6:

6.1.1 Clock signal type

The allowed types for clock signals shall be: BIT, STD_ULOGIC and
their subtypes (e.g. STD_LOGIC) with a minimum subset of '0' and '1'.
Only the values 0' and 1' from these types shall be used in
expressions representing clock levels and clock edges (See 6.1.2).

(Actual language can be important)

Only '1' and '0' are used in expressions representing clock (signal s)
levels in the rising_edge() function:


-------------------------------------------------------------------
-- edge detection

-------------------------------------------------------------------
FUNCTION rising_edge (SIGNAL s : std_ulogic) RETURN BOOLEAN IS
BEGIN
RETURN (s'EVENT AND (To_X01(s) = '1') AND
(To_X01(s'LAST_VALUE) = '0'));
END;

FUNCTION falling_edge (SIGNAL s : std_ulogic) RETURN BOOLEAN IS
BEGIN
RETURN (s'EVENT AND (To_X01(s) = '0') AND
(To_X01(s'LAST_VALUE) = '1'));
END;

------------------------------------------------------------------

Nary an 'U', 'X', 'Z', 'L', 'H', 'W' nor '-' in there.

rising_edge()/falling_edge() uses To_X01() which calls the
cvt_to_x01() to convert state values to logic values.

----------------------------------------------------------
CONSTANT cvt_to_x01 : logic_x01_table := (
'X', -- 'U'
'X', -- 'X'
'0', -- '0'
'1', -- '1'
'X', -- 'Z'
'X', -- 'W'
'0', -- 'L'
'1', -- 'H'
'X' -- '-'
);

----------------------------------------------------------

The implication is that a signal state 'L' is a logic value of '0'
and a signal state of 'H' maps to a logic value of '1'. And yes,
'X' is present as a signal value (the left hand column in the
logic_x01_table). A lookup table is a type conversion function.

Note that no where are 'U','Z', 'W', 'L', 'H' or '-' expressed as
signal values only as signal states.

B.95 expression: A formula that defines the computation of a value.(
7.1 )

Further an expression has a left side and a right side or is a factor/
term (including function calls and type conversions).

Nowhere in the rising_edge()/falling_edge() elaboration is a constant
value evaluated as a left hand side of an expression.

Nowhere in the rising_edge()/falling_edge() elaboration is a constant
value of 'U', 'X', 'Z', 'L','H', 'W', or '-' evaluated as the right
hand side of an expression.

Is the logic_x01_table an expression by itself?

Note that neither value nor formula are defined in the glossary of the
LRM.

From websters for formula:

3 a: a general fact, rule, or principle expressed in usually
mathematical symbols b: a symbolic expression of the chemical
composition or constitution of a substance c: a group of symbols (as
letters and numbers) associated to express facts or data (as the
number and kinds of teeth in the jaw) concisely d: a combination of
signs in a logical calculus

A table hits definition c., above for formula, a group of symbols
associated to express facts or data.

By this (twisted) chain of logic, 'X' shows up in the elaborated
expression (but not 'U', 'X', 'Z', 'L','H', 'W', or '-').

You were right there was something creeping around in there contrary
to the statement in 6.1.1. It wasn't the 'L' or 'H', though. They
only show up in comments, and while you could have a comment embedded
in an expression:

LRM 13.8:
Furthermore, comments do not influence the execution of a simulation
module; their sole purpose is to enlighten the human reader.

Note that the language doesn't indicate that comments don't have
meaning for synthesis. There appears to be more angels dancing on the
head of that pin, yet.
 
Reply With Quote
 
diogratia
Guest
Posts: n/a
 
      09-06-2008
On Sep 6, 5:22 am, (E-Mail Removed) wrote:
>
> (2) There's a technical inconsistency in sec 6.1.1. "only the values
> '0' and 1' shall be used in expressions representing clock levels".
> Then it says that the rising_edge() function is an allowable form of
> clock edge specification, but rising_edge (when elaborated as per LRM
> semantics), uses the To_X01 function which references both 'H' and
> 'L'. Nit-picking, to be sure, but that's what digital designers live
> for
>


1076.6:

6.1.1 Clock signal type

The allowed types for clock signals shall be: BIT, STD_ULOGIC and
their subtypes (e.g. STD_LOGIC) with a minimum subset of '0' and '1'.
Only the values 0' and 1' from these types shall be used in
expressions representing clock levels and clock edges (See 6.1.2).

(Actual language can be important)

Only '1' and '0' are used in expressions representing clock (signal s)
levels in the rising_edge() function:


-------------------------------------------------------------------
-- edge detection

-------------------------------------------------------------------
FUNCTION rising_edge (SIGNAL s : std_ulogic) RETURN BOOLEAN IS
BEGIN
RETURN (s'EVENT AND (To_X01(s) = '1') AND
(To_X01(s'LAST_VALUE) = '0'));
END;

FUNCTION falling_edge (SIGNAL s : std_ulogic) RETURN BOOLEAN IS
BEGIN
RETURN (s'EVENT AND (To_X01(s) = '0') AND
(To_X01(s'LAST_VALUE) = '1'));
END;

------------------------------------------------------------------

Nary an 'U', 'X', 'Z', 'L', 'H', 'W' nor '-' in there.

rising_edge()/falling_edge() uses To_X01() which calls the
cvt_to_x01() to convert state values to logic values.

----------------------------------------------------------
CONSTANT cvt_to_x01 : logic_x01_table := (
'X', -- 'U'
'X', -- 'X'
'0', -- '0'
'1', -- '1'
'X', -- 'Z'
'X', -- 'W'
'0', -- 'L'
'1', -- 'H'
'X' -- '-'
);

----------------------------------------------------------

The implication is that a signal state 'L' is a logic value of '0'
and a signal state of 'H' maps to a logic value of '1'. And yes,
'X' is present as a signal value (the left hand column in the
logic_x01_table). A lookup table is a type conversion function.

Note that no where are 'U','Z', 'W', 'L', 'H' or '-' expressed as
signal values only as signal states.

B.95 expression: A formula that defines the computation of a value.(
7.1 )

Further an expression has a left side and a right side or is a factor/
term (including function calls and type conversions).

Nowhere in the rising_edge()/falling_edge() elaboration is a constant
value evaluated as a left hand side of an expression.

Nowhere in the rising_edge()/falling_edge() elaboration is a constant
value of 'U', 'X', 'Z', 'L','H', 'W', or '-' evaluated as the right
hand side of an expression.

Is the logic_x01_table an expression by itself?

Note that neither value nor formula are defined in the glossary of the
LRM.

From websters for formula:

3 a: a general fact, rule, or principle expressed in usually
mathematical symbols b: a symbolic expression of the chemical
composition or constitution of a substance c: a group of symbols (as
letters and numbers) associated to express facts or data (as the
number and kinds of teeth in the jaw) concisely d: a combination of
signs in a logical calculus

A table hits definition c., above for formula, a group of symbols
associated to express facts or data.

By this (twisted) chain of logic, 'X' shows up in the elaborated
expression (but not 'U', 'X', 'Z', 'L','H', 'W', or '-').

You were right there was something creeping around in there contrary
to the statement in 6.1.1. It wasn't the 'L' or 'H', though. They
only show up in comments, and while you could have a comment embedded
in an expression:

LRM 13.8:
Furthermore, comments do not influence the execution of a simulation
module; their sole purpose is to enlighten the human reader.

Note that the language doesn't indicate that comments don't have
meaning for synthesis. There appears to be more angels dancing on the
head of that pin, yet.
 
Reply With Quote
 
kennheinrich@sympatico.ca
Guest
Posts: n/a
 
      09-06-2008
On Sep 6, 5:33*pm, diogratia <(E-Mail Removed)> wrote:
> rising_edge()/falling_edge() uses To_X01() which calls the
> cvt_to_x01() to convert state values to logic values.
>
> * * ----------------------------------------------------------
> * * CONSTANT cvt_to_x01 : logic_x01_table := (
> * * * * * * * * * * * * *'X', *-- 'U'
> * * * * * * * * * * * * *'X', *-- 'X'
> * * * * * * * * * * * * *'0', *-- '0'
> * * * * * * * * * * * * *'1', *-- '1'
> * * * * * * * * * * * * *'X', *-- 'Z'
> * * * * * * * * * * * * *'X', *-- 'W'
> * * * * * * * * * * * * *'0', *-- 'L'
> * * * * * * * * * * * * *'1', *-- 'H'
> * * * * * * * * * * * * *'X' * -- '-'
> * * * * * * * * * * * * );
>
> * * ----------------------------------------------------------


D'oh... that's where I was getting ahead of myself. I mixed up the
text while paging through the file and somehow mentally associated the
explicit check written "case ... when '1' | 'H' return ('1')" in the
To_bit function with the definition of cvt_to_ux01, which is only a
few lines earlier. My bad.

<snip>

>
> *There appears to be more angels dancing on the
> head of that pin, yet.


My pin, my head

- Kenn
 
Reply With Quote
 
kennheinrich@sympatico.ca
Guest
Posts: n/a
 
      09-06-2008
On Sep 6, 5:33*pm, diogratia <(E-Mail Removed)> wrote:
> rising_edge()/falling_edge() uses To_X01() which calls the
> cvt_to_x01() to convert state values to logic values.
>
> * * ----------------------------------------------------------
> * * CONSTANT cvt_to_x01 : logic_x01_table := (
> * * * * * * * * * * * * *'X', *-- 'U'
> * * * * * * * * * * * * *'X', *-- 'X'
> * * * * * * * * * * * * *'0', *-- '0'
> * * * * * * * * * * * * *'1', *-- '1'
> * * * * * * * * * * * * *'X', *-- 'Z'
> * * * * * * * * * * * * *'X', *-- 'W'
> * * * * * * * * * * * * *'0', *-- 'L'
> * * * * * * * * * * * * *'1', *-- 'H'
> * * * * * * * * * * * * *'X' * -- '-'
> * * * * * * * * * * * * );
>
> * * ----------------------------------------------------------


D'oh... that's where I was getting ahead of myself. I mixed up the
text while paging through the file and somehow mentally associated the
explicit check written "case ... when '1' | 'H' return ('1')" in the
To_bit function with the definition of cvt_to_ux01, which is only a
few lines earlier. My bad.

<snip>

>
> *There appears to be more angels dancing on the
> head of that pin, yet.


My pin, my head

- Kenn
 
Reply With Quote
 
Andy
Guest
Posts: n/a
 
      09-08-2008
On Sep 5, 2:43*am, Jonathan Bromley <(E-Mail Removed)>
wrote:
> In other words, use a nested "if". *It will prevent
> raised eyebrows from colleagues and linting tools,
> and will assure portability among synthesis tools.


I respectfully disagree. Preventing "raised eyebrows" by avoiding such
constructs may serve a short term goal, but also severely dampens the
advancement of the state of the art in logic synthesis. Where would we
be if nobody had ever wanted to raise eyebrows by using single process
coding styles (combo logic and reg's in same clocked process)?

As for tool portability, those tools that do not support this need a
good public flogging! This very style was proposed in '01 or '02 by a
paper at SNUG. By pushing the envelope on individual tools, we create
competition ("brand Y does it!") to raise the bar everywhere. If we
are continually limited to the least common denominator, progress is
halted.

Andy
 
Reply With Quote
 
KJ
Guest
Posts: n/a
 
      09-09-2008
On Sep 8, 10:02*am, Andy <(E-Mail Removed)> wrote:

>
> As for tool portability, those tools that do not support this need a
> good public flogging!
>


Opening service requests to the tool vendors with the ("brand Y does
it!") statement is likely to be a more effective approach to advancing
the tools than public flogging

KJ
 
Reply With Quote
 
Andy
Guest
Posts: n/a
 
      09-09-2008
On Sep 9, 8:05*am, KJ <(E-Mail Removed)> wrote:
>
> Opening service requests to the tool vendors with the ("brand Y does
> it!") statement is likely to be a more effective approach to advancing
> the tools than public flogging
>
> KJ


I agree wholeheartedly! Unfortunately, some vendors don't care about
what the competition is doing, they see themselves as the de-facto
standard bearers anyway. Public flogging probably would not do any
good either, but at least you would feel better after administering
it.

Andy
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Is it legal to write an logical equation for a FPGA LUT in claims of a patent? Weng Tianxiang VHDL 12 12-10-2005 03:49 PM
Research: File-sharers big legal download spenders. Silverstrand Front Page News 0 07-27-2005 03:00 PM
State machine transition on internal signals - is it legal? Divyang M VHDL 9 05-18-2005 03:58 PM
State machine transition on internal signals -- is it legal? Divyang M VHDL 1 05-15-2005 09:36 AM
Is this legal? Valentin Tihomirov VHDL 20 10-29-2003 10:31 AM



Advertisments