The definition of combinatorial process?

Discussion in 'VHDL' started by Weng Tianxiang, Jun 29, 2012.

  1. The following topic may be one of the longest debate in vhdl group:
    http://groups.google.com/group/comp...de3fe8ea3eec9ad?hl=en&q=combinatorial&lnk=ol&

    The debute focus later turns to which is best way to use one
    sequential process or two combinarotial process and sequential
    process.

    The most important and strange thing is that I cannot even find the
    word "combinarotial" in VHDL-2002 specification.

    I want to grammarly define a combinatorial process which cannot have a
    clock statement in one of my thinking.

    process_statement_part ::=
    { sequential_statement }

    sequential_statement ::=
    wait_statement
    | assertion_statement
    | report_statement
    | signal_assignment_statement
    | variable_assignment_statement
    | procedure_call_statement
    | if_statement
    | case_statement
    | loop_statement
    | next_statement
    | exit_statement
    | return_statement
    | null_statement

    combinatorial_process_statement_part ::=
    { combinatorial_sequential_statement }

    combinatorial_sequential_statement ::=
    assertion_statement -- wait_statement is deleted here !!!
    | report_statement
    | signal_assignment_statement
    | variable_assignment_statement
    | procedure_call_statement
    | if_statement
    | case_statement
    | loop_statement
    | next_statement
    | exit_statement
    | return_statement
    | null_statement

    Weng
     
    Weng Tianxiang, Jun 29, 2012
    #1
    1. Advertising

  2. Weng Tianxiang

    KJ Guest

    On Thursday, June 28, 2012 7:27:25 PM UTC-4, Weng Tianxiang wrote:

    > The debute focus later turns to which is best way to use one
    > sequential process or two combinarotial process and sequential
    > process.
    >
    > The most important and strange thing is that I cannot even find the
    > word "combinarotial" in VHDL-2002 specification.
    >


    Why do you consider it strange? The word 'clock' is not defined in the specification either because it is not relevant to the language definition.

    > I want to grammarly define a combinatorial process which cannot have a
    > clock statement in one of my thinking.
    >


    A 'clock' is generally considered to be a signal where one (or both) edges cause another signal(s) to be sampled at the desired edge. The VHDL language allows for the description of such a hardware sampling mechanism to be inferred because it defines the signal attribute called 'event. The definition of 'event enables the description of a 'clock' signal but it can be used for other purposes as well that have nothing at all to do with a 'clock'.

    Given that background, one could try to define a combinatorial process as being one that does not use the 'event attribute...but that would be both incomplete as well as too much. It is 'incomplete' in the sense that one could use other defined attributes to equivalently describe the sampling mechanism. It is 'too much' in that just because a process uses 'event, does not imply that the signal in question is used to sample anything else (for example in a testbench).

    Copyright 2012
    Kevin Jennings
     
    KJ, Jun 29, 2012
    #2
    1. Advertising

  3. Weng Tianxiang

    Guest

    On Thu, 28 Jun 2012 17:36:47 -0700 (PDT), KJ
    <> wrote:

    >A 'clock' is generally considered to be a signal where one (or both) edges cause another signal(s) to be sampled at the desired edge. The VHDL language allows for the description of such a hardware sampling mechanism to be inferred because it defines the signal attribute called 'event. The definition of 'event enables the description of a 'clock' signal but it can be used for other purposes as well that have nothing at all to do with a 'clock'.
    >
    >Given that background, one could try to define a combinatorial process as being one that does not use the 'event attribute...but that would be both incomplete as well as too much. It is 'incomplete' in the sense that one could use other defined attributes to equivalently describe the sampling mechanism. It is 'too much' in that just because a process uses 'event, does not imply that the signal in question is used to sample anything else (for example in a testbench).
    >


    You don't need 'event to describe a "clocked" process; a sensitivity
    list does the same thing for you. This means that you can define a
    "clocked process" with a concurrent signal assignment, because of the
    equivalent process. I haven't checked myself, but I think this works
    in some/many synthesisers.

    Weng: VHDL has no concept of "clocked" and "combinatorial". Signals
    just change at defined times. This has to be true, when you consider
    that even real F/Fs are just combinatorial circuits with feedback.
    What does "clocked" actually mean? The distinction between "clocked"
    and "combinatorial" is made heuristically, by *synthesisers*, to find
    out which primitives to use.

    >Copyright 2012


    You're kdding, right?
     
    , Jun 29, 2012
    #3
  4. Weng Tianxiang

    KJ Guest

    On Friday, June 29, 2012 4:35:47 AM UTC-4, (unknown) wrote:
    > On Thu, 28 Jun 2012 17:36:47 -0700 (PDT), KJ
    > <kkennings> wrote:
    >
    > You don't need 'event to describe a "clocked" process; a sensitivity
    > list does the same thing for you. This means that you can define a
    > "clocked process" with a concurrent signal assignment, because of the
    > equivalent process. I haven't checked myself, but I think this works
    > in some/many synthesisers.
    >


    A concurrent assignment can be used to define a clocked signal, but it would have to use either 'event or some other similar signal attribute that fires only on a signal change. The form would be

    y <= x when rising_edge(clock);

    This is recognized by Quartus and Synplify, haven't checked Xilinx.

    As I mentioned, prohibiting 'event would not be sufficient to conclude thata process is 'combinatorial' and you point out another possible form whichwould be

    process(clock)
    begin
    if (clock = '1') then
    y <= x;
    end if;
    end process;

    No commercial synthesis tool will infer a flip flop from the above because it will warn about an incomplete sensitivity list and add signals to the sensitivity list instead. But from the definition of the language the above does describe a flip flop, only the synthesis tools non-compliance to the language standard makes it synthesize to something else.

    > >Copyright 2012

    >
    > You're kdding, right?


    Nope, but I can't disclose the reason.
    Copyright 2012
    Kevin Jennings
     
    KJ, Jun 29, 2012
    #4
  5. wrote:

    > You don't need 'event to describe a "clocked" process; a sensitivity
    > list does the same thing for you. This means that you can define a
    > "clocked process" with a concurrent signal assignment, because of the
    > equivalent process. I haven't checked myself, but I think this works
    > in some/many synthesisers.


    Without 'event (or rising_edge)?

    q <= d when clk = '1';

    Think again: it is a latch.

    The equivalent process is:

    process(clk, d)
    begin
    if clk = '1' then
    q <= d;
    end if;
    end process;

    Yup: d is in the sensitivity list.
     
    Paul Uiterlinden, Jun 29, 2012
    #5
  6. On Friday, June 29, 2012 7:02:22 AM UTC-7, Paul Uiterlinden wrote:
    > wrote:
    >
    > > You don't need 'event to describe a "clocked" process; a sensitivity
    > > list does the same thing for you. This means that you can define a
    > > "clocked process" with a concurrent signal assignment, because of the
    > > equivalent process. I haven't checked myself, but I think this works
    > > in some/many synthesisers.

    >
    > Without 'event (or rising_edge)?
    >
    > q <= d when clk = '1';
    >
    > Think again: it is a latch.
    >
    > The equivalent process is:
    >
    > process(clk, d)
    > begin
    > if clk = '1' then
    > q <= d;
    > end if;
    > end process;
    >
    > Yup: d is in the sensitivity list.


    Actually I want to create something new in HDL, a new type of process, that leads to the problem: the concept of a concurrent combinatorial process:
    1. The new process is a concurrent process as other processes are.
    2. In the new process, no traditional clock statement, explicit or implicit, is allowed.
    3. In the new process all sequential statements, excluding wait statement, are allowed.

    Someone may ask that what "a traditional clock statement" means? All those who write logic programming in VHDL know it, but there is never a definition of it in VHDL language. I would like to have someone to fill the gap.

    Is it clear enough now?

    1. " if rising_edge(clk) then": the situation will be excluded by note 2, not by grammar.

    2. "wait for 1 ns;": wait statement is prohibited in the grammar.

    I don't see any conflicts now.

    I appreciate the SystemVerilog grammar by declaring three types of processes explicitly:
    a. always_comb;
    b. always_latch;
    c. always_ff.

    No any ambiguity is generated in any situations.

    Thank you for your discussion.

    Weng
     
    Weng Tianxiang, Jun 29, 2012
    #6
  7. Weng Tianxiang

    Guest

    Have you seen VHDL-2008, process(all):

    process(all)
    begin
    ... -- combinational logic
    end process ;


    IEEE std 1076 does not define combinational, however,
    the deprecated standard, IEEE 1076.6 does.
     
    , Jun 30, 2012
    #7
  8. On Friday, June 29, 2012 5:05:52 PM UTC-7, wrote:
    > Have you seen VHDL-2008, process(all):
    >
    > process(all)
    > begin
    > ... -- combinational logic
    > end process ;
    >
    >
    > IEEE std 1076 does not define combinational, however,
    > the deprecated standard, IEEE 1076.6 does.


    Hi,
    Could you send me a copy of IEEE 1076.6? wtxwtx @ gmail . com

    Weng
     
    Weng Tianxiang, Jun 30, 2012
    #8
  9. Weng Tianxiang

    Guest

    On Fri, 29 Jun 2012 16:02:22 +0200, Paul Uiterlinden
    <> wrote:

    > wrote:
    >
    >> You don't need 'event to describe a "clocked" process; a sensitivity
    >> list does the same thing for you. This means that you can define a
    >> "clocked process" with a concurrent signal assignment, because of the
    >> equivalent process. I haven't checked myself, but I think this works
    >> in some/many synthesisers.

    >
    >Without 'event (or rising_edge)?
    >
    >q <= d when clk = '1';
    >
    >Think again: it is a latch.


    That's *your* example; not mine. KJ stated that

    >The VHDL language allows for the description of such a hardware sampling
    > mechanism to be inferred because it defines the signal attribute called 'event


    and

    >It is 'incomplete' in the sense that one could use other defined attributes
    > to equivalently describe the sampling mechanism


    My response was that you don't need 'event (or any other attribute) to
    define a "register" mechanism. There is an obvious process model that
    doesn't use 'event; you can use a concurrent procedure which doesn't
    have the data input in its parameter list; you can use guarded
    signals/regs. And, fundamentally, you can just code up a flip/flop
    model using combinatorial feedback, or master/slave latches, or
    whatever, using no attributes. You might even be able to do it by
    delta-delaying a clock signal and using the overlap for sampling.

    Besides, this all irrelevant to the OP; the attempt to define
    "registered" has just added to the OP's confusion.
     
    , Jul 2, 2012
    #9
  10. wrote:

    > On Fri, 29 Jun 2012 16:02:22 +0200, Paul Uiterlinden
    > <> wrote:
    >
    >> wrote:
    >>
    >>> You don't need 'event to describe a "clocked" process; a sensitivity
    >>> list does the same thing for you. This means that you can define a
    >>> "clocked process" with a concurrent signal assignment, because of the
    >>> equivalent process. I haven't checked myself, but I think this works
    >>> in some/many synthesisers.

    >>
    >>Without 'event (or rising_edge)?
    >>
    >>q <= d when clk = '1';
    >>
    >>Think again: it is a latch.

    >
    > That's *your* example; not mine.


    That's correct. I never said is was your example.

    The only point I wanted to make clear is that you cannot describe a
    flip-flop with just a concurrent signal assignment, because "a sensitivity
    list does the same thing for you". The point I was trying to make is that
    there is no way to keep d out of the sensitivity list of the equivalent
    process when using a concurrent signal assignment.
     
    Paul Uiterlinden, Jul 2, 2012
    #10
  11. Weng Tianxiang

    Andy Guest

    Weng, That is a copyrighted standard, for which you must pay IEEE or
    one of their distributors (IHS, et al).

    Jim, I was not aware that 1076.6 was deprecated. When/why did that
    happen? Did/will something else replace it? The 2004 edition is quite
    good at describing the coded behavior necessary to infer a register
    and/or latch. Combinatorial processes are assumed to be everything
    else.

    Andy
     
    Andy, Jul 2, 2012
    #11
  12. Weng Tianxiang

    Gabor Guest

    Weng Tianxiang wrote:
    > The following topic may be one of the longest debate in vhdl group:
    > http://groups.google.com/group/comp...de3fe8ea3eec9ad?hl=en&q=combinatorial&lnk=ol&
    >
    > The debute focus later turns to which is best way to use one
    > sequential process or two combinarotial process and sequential
    > process.
    >
    > The most important and strange thing is that I cannot even find the
    > word "combinarotial" in VHDL-2002 specification.
    >
    > I want to grammarly define a combinatorial process which cannot have a
    > clock statement in one of my thinking.
    >
    > process_statement_part ::=
    > { sequential_statement }
    >
    > sequential_statement ::=
    > wait_statement
    > | assertion_statement
    > | report_statement
    > | signal_assignment_statement
    > | variable_assignment_statement
    > | procedure_call_statement
    > | if_statement
    > | case_statement
    > | loop_statement
    > | next_statement
    > | exit_statement
    > | return_statement
    > | null_statement
    >
    > combinatorial_process_statement_part ::=
    > { combinatorial_sequential_statement }
    >
    > combinatorial_sequential_statement ::=
    > assertion_statement -- wait_statement is deleted here !!!
    > | report_statement
    > | signal_assignment_statement
    > | variable_assignment_statement
    > | procedure_call_statement
    > | if_statement
    > | case_statement
    > | loop_statement
    > | next_statement
    > | exit_statement
    > | return_statement
    > | null_statement
    >
    > Weng


    The traditional meaning of "combinatorial" is that the outputs only
    depend on the current state of the inputs. i.e. there can be no
    saved state within the process. This not only includes constructs
    such as edge dependencies or waits, but also any sort of feedback
    from the process outputs or internal signals / variables.

    -- Gabor
     
    Gabor, Jul 2, 2012
    #12
  13. Weng Tianxiang

    Gabor Guest

    Gabor wrote:
    > Weng Tianxiang wrote:
    >> The following topic may be one of the longest debate in vhdl group:
    >> http://groups.google.com/group/comp...de3fe8ea3eec9ad?hl=en&q=combinatorial&lnk=ol&
    >>
    >> The debute focus later turns to which is best way to use one
    >> sequential process or two combinarotial process and sequential process.
    >> The most important and strange thing is that I cannot even find the
    >> word "combinarotial" in VHDL-2002 specification.
    >> I want to grammarly define a combinatorial process which cannot have a
    >> clock statement in one of my thinking.
    >> process_statement_part ::= { sequential_statement }
    >> sequential_statement ::= wait_statement | assertion_statement |
    >> report_statement | signal_assignment_statement |
    >> variable_assignment_statement | procedure_call_statement |
    >> if_statement | case_statement | loop_statement | next_statement |
    >> exit_statement | return_statement | null_statement
    >> combinatorial_process_statement_part ::= {
    >> combinatorial_sequential_statement }
    >> combinatorial_sequential_statement ::= assertion_statement --
    >> wait_statement is deleted here !!! | report_statement |
    >> signal_assignment_statement | variable_assignment_statement |
    >> procedure_call_statement | if_statement | case_statement |
    >> loop_statement | next_statement | exit_statement | return_statement |
    >> null_statement
    >> Weng

    >
    > The traditional meaning of "combinatorial" is that the outputs only
    > depend on the current state of the inputs. i.e. there can be no
    > saved state within the process. This not only includes constructs
    > such as edge dependencies or waits, but also any sort of feedback
    > from the process outputs or internal signals / variables.
    >
    > -- Gabor


    I forgot to add that feedback in the process isn't always obvious
    just by looking at the RHS of the equations. Implicit feedback
    occurs when you have incomplete state coverage, as in the latch
    example. This makes it a bit tougher to prevent sequential logic
    from being inferred just by excluding certain types of statements.

    -- Gabor
     
    Gabor, Jul 2, 2012
    #13
  14. Weng Tianxiang

    Guest

    , Jul 4, 2012
    #14
  15. Weng Tianxiang

    Guest

    > Jim, I was not aware that 1076.6 was deprecated.
    It was due for revision in 2009. Since no one stepped up to lead the group, DASC deprecated both it and the corresponding Verilog one.

    Largely users did not pay any attention to it and as a result vendors did not completely implement it. It would be nice to reform a group and revise it, however, someone would need to be willing to do the work. They would also need to get the vendors involved. With FPGAs a diverse set of tools inthe FPGA market, perhaps it can get done. At least for attributes, it really needs to get done.
     
    , Jul 4, 2012
    #15
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. RZ
    Replies:
    2
    Views:
    511
  2. Gunit
    Replies:
    2
    Views:
    560
    Just an Illusion
    Jun 28, 2004
  3. Ian Shef
    Replies:
    0
    Views:
    651
    Ian Shef
    Nov 5, 2010
  4. glen herrmannsfeldt
    Replies:
    5
    Views:
    743
    Newman
    Nov 7, 2010
  5. xohaibhassan
    Replies:
    1
    Views:
    1,328
    joris
    Feb 8, 2011
Loading...

Share This Page