180 likes | 308 Views
Sugar 2.0 – Proposal Presented to Accellera FVTC. Cindy Eisner Joint Work with Dana Fisman. IBM Research Laboratory in Haifa. Overview. What ’ s new in Sugar 2.0 (reminder) What ’ s new since February presentation Sugar with respect to requirements Sugar advantages Summary.
E N D
Sugar 2.0 – Proposal Presented to Accellera FVTC Cindy Eisner Joint Work with Dana Fisman IBM Research Laboratory in Haifa
Overview • What’s new in Sugar 2.0 (reminder) • What’s new since February presentation • Sugar with respect to requirements • Sugar advantages • Summary Sugar 2.0 – Accellera Proposal
What’s new in Sugar 2.0 (reminder) • Sugar Foundation Language • Three “flavors” • Verilog, VHDL, EDL • Four layers: • boolean, temporal, modeling, verification • Verification layer • verification directives , statement grouping • Support for multiple clocks (strong/weak) • Abort operator • Formal definition of finite semantics Sugar 2.0 – Accellera Proposal
What’s new since February • No major changes since draft presentation of last month • Document proposal has been completed and fleshed out with more details • Added a discussion of Sugar formulas which are checked on-the-fly • VHDL flavor is left undefined at this time (but syntax has been checked so as not to conflict with VHDL boolean expressions) • Two minor changes – see next slides Sugar 2.0 – Accellera Proposal
p clkp q clkq Minor change #1 from February draft • Simplified use of multiple clocks doesn’t require as many parentheses always (p -> X q@clkq) @clkp Sugar 2.0 – Accellera Proposal
Minor change #2 from February draft • A module can be bound to a verification unit • Meaning is that signals of the verification unit map by name to signals in the bound module • Allows same specification to be used no matter how block is embedded in design • Vunit can also be bound to a specific instance (requirement R50a) • See example on next slide Sugar 2.0 – Accellera Proposal
Binding a vunit vunit default { property pulsed(s) = always (s -> next !s); } vunit myunit(blocka) { assume pulsed(req_in); assert pulsed(ack_out); } vunit yourunit(blockb) { assert pulsed(req_out); assume pulsed (ack_in); } Sugar 2.0 – Accellera Proposal
Sugar 2.0 with respect to requirements • Sugar 2.0 proposal fulfills all requirements • Highlights: • Layered definition • Three flavors • Powerful sequences • Multiple clocks • Reset support (through “abort” operator) • Named properties, sequences, and endpoints • Formal semantics – both finite and infinite • Can specify any omega-regular language Sugar 2.0 – Accellera Proposal
Advantage 1 –History and Track Record • Mature – eight years of practical experience • Extensive user base • Contrast with CBV which has recently undergone a major revolution Sugar 2.0 – Accellera Proposal
Advantage 2 –Easy to learn, use • A Sugar specification says what it means always ((snoop & hitm) |=> {!trans_start[*]; trans_start & writeback}) • Contrast to somewhat convoluted formulation in CBV using “not” and “fail”: always if (snoop & hitm) +(1) : not [fail [!trans_start{*}; trans_start & writeback]] ; Sugar 2.0 – Accellera Proposal
Advantage 3 –Succinct • A Sugar specification is concise: forall N: 1..8: always within(write_command_start & size=N; LAST){gx_start[=N]} • Contrast with verbosity of CBV: task sugar_within (r : regexp, b : bool, s : regexp) ; if (r) not [ fail [[!b{*} && s ]; b] ] ; endtask function \sugar_.[=.] (b : bool, n : nat) : regexp ; return [[!b{*};b]{n}; !b{*}] ; endfunction begin_and for (N : nat = 1; N <= 8; N = N + 1) always sugar_within ( write_command_start & (size == N), LAST, \sugar_.[=.] (gx_start, N) ) ; end Sugar 2.0 – Accellera Proposal
Advantage 4 –Elegant formal semantics • Semantics are • well defined – formal semantics appear in Sugar 2.0 proposal • elegant – formal semantics are only 3 pages long • Contrast with lengthy semantics document of CBV Sugar 2.0 – Accellera Proposal
Advantage 5 –Known efficient model checking algorithms • Known model checking algorithms • LTL and CTL model checking well-known • Translation of regular expressions to automata is well-known • Contrast with specialized algorithms of CBV Sugar 2.0 – Accellera Proposal
Advantage 6 –Known efficient simulation algorithms • Known algorithms for finite time reasoning: • as implemented in FoCs • implementation sketched in Sugar 2.0 proposal • Contrast with CBV, whose implementation of the newer parts of the language is untried Sugar 2.0 – Accellera Proposal
Advantage 7 –Declarative language • Temporal layer is declarative • Specification can be easily read • Contrast with CBV, which mixes declarative and procedural code Sugar 2.0 – Accellera Proposal
Advantage 8 –Expressive power • Sugar Foundation Language • allows the expression of any omega-regular language • Optional Branching Extension • allows specification of deadlock-freedom • Contrast with less expressive CBV Sugar 2.0 – Accellera Proposal
Advantage 9 –Built-in syntactic sugar • Specifications are unambiguous, so can be easily read always ((snoop & hitm) -> next next_event(trans_start)(writeback)) • Contrast with CBV, which requires the user to do a lot of the work: function cbv_next_event(e : bool) : regexp ; return [first_match [1{*};e]] ; endfunction always if (snoop & hitm) +(1) : if (cbv_next_event(trans_start)) writeback ; Sugar 2.0 – Accellera Proposal
Summary • Sugar is an elegant, powerful specification language with a strong track record both within and outside of IBM • Sugar has existing implementations in both model checking (RuleBase) and simulation (Focs) • Implementations are sketched in Sugar 2.0 proposal Sugar 2.0 – Accellera Proposal