T o w a rds a F o rmal Semantics of V erilog using Duration Calculus Gera rdo Schneider VERIMA G, F rance Xu Qiw en International Institute fo r Soft w a re T echnology United Nations Universit y (UNU/I IST) * Thanks: UNU/I IST 1
Overview of the p resentation � � WDCI � V erilog � Example � Semantics of some commands � Conclusions 2
Duration Calculus of W eakly Monotonic Time (WDC) System evolves b y Discrete steps Several steps at the same time 6 6 4 5 Casual Time 4 4 3 2 1 0 Stepp ed Time P oint ( t; i ) t real time p oint (o r macro time) t1 t2 t3 Real Time i causal time p oint (o r micro time) � WDCI: WDC with In�nite Intervals and Least Fixp oint Op erato r 3
V erilog It's a HDL that has (among others): � sha red states, up dated b y p ossibly instan- taneous assignments from di�erent p ro cesses; � zero-time computation � continuous assignments � dela y statements; � synchronisation b y w aiting fo r some condi- tions to b ecome true; � recursion (�nite and in�nite). 4
Example P : #1; P : #2; 1 2 x = 1; y = 5; y = 3; x = x + 2; #3; x = y + x ; (8, 5, 1) (3, 3, 1) (1, 3, 1) (1, *,1) (*,*,*) 5 0 1 2 3 4
Semantics of a VERILOG Program The semantics of a p rogram P (considered as a closed system) is: M ( P ) ^ Ax ^ Ax 1 2 where + Ax : 8 x 2 V a r : 2 ( cint ) b :x = e :x ) 1 Ax : 9 i 2 I : 2 ( dint ) e :@ = i ) 2 P r oc 6
Semantics of some Commands � Assignment def M ( v = e ) = _ ` = 0 ^ ( idle ( dint ^ e :v = b :e ^ i unchang ed ^ e :@ = i )) V a r �f v g � Sequential Comp osition def M ( begin S ; S ; : : : ; S end ) = n 1 2 _ M ( S ) M ( begin S ; : : : ; S end ) n 1 2 � Iteration def M ( while ( eb ) S ) = _ _ � X : (( M ( eb ) M ( S )) X ) _ M ( : eb )) 7
� P a rallel Comp osition def M ( P k : : : k P ) = n 1 W n _ (( M ( P ) idle ) ^ : : : ^ M ( P ) 1 i 1 i =1 _ ^ : : : ^ ( M ( P ) idle )) n n � Bo olean Exp ressions def M ( eb ) = _ ` = 0 ^ ( idle ( b :eb ^ dint ^ unchang ed ^ i V a r e :@ = i ))
Semantics of other commands � Dela y def c M (# n ) = idle ^ ` � n ^ ( �n ) ` = n ) i � Conditionals def M ( if ( eb ) S else S ) = 1 2 _ _ ( M ( eb ) M ( S )) _ ( M ( : eb ) M ( S )) 1 2 � Continuous assignment def M ( assign w = e ) = d d w = M ( e ) e e ^ inf 8
Conclusions � W e have given a fo rmal semantics of a sub- set of V erilog using � WDCI � Some features: { It is comp ositional { It is maximal (vs p re�x closed) { It has in�nite intervals (in�nite zero-time computations) { It allo ws to rep resent intermediate tran- sitions 9
Conclusions � F uture w o rks: { Extend the language (i.e. non-blo cking assignments) { Change the semantics fo r Hyb rid Sys- tems { Axiomatisation of � WDCI 10
Recommend
More recommend