Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
language:expressions [2022/07/22 15:13]
rajit [Functions]
language:expressions [2022/07/22 15:15]
rajit [Functions]
Line 91: Line 91:
 The first kind of function is typically used when constructing the circuit, and its value can be statically computed during the circuit construction phase. The second kind of function is viewed as CHP, and can be implemented either by inlining the function or through some other approach (e.g. shared, partially shared, etc). The first kind of function is typically used when constructing the circuit, and its value can be statically computed during the circuit construction phase. The second kind of function is viewed as CHP, and can be implemented either by inlining the function or through some other approach (e.g. shared, partially shared, etc).
  
-For example, the following function that takes an ''int<8>'' argument  can be called in the CHP sub-language:+For example, the following function that takes an ''int<8>'' argument  can be called from the CHP sub-language:
 <code act> <code act>
 /* look at the MSB to determine if this is a negative 2's complement integer */ /* look at the MSB to determine if this is a negative 2's complement integer */
Line 97: Line 97:
 { {
   chp {   chp {
-    self := bool(x{7});+    self := bool(x{7})
   }   }
 } }
 </code> </code>