Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
language:migrate [2020/12/02 01:00] 127.0.0.1 external edit |
language:migrate [2022/05/13 11:23] (current) rajit [Canonical names] |
||
---|---|---|---|
Line 15: | Line 15: | ||
==== Channel and data type bodies ==== | ==== Channel and data type bodies ==== | ||
- | The old ACT had channel and data type bodies for send/ | + | The old ACT had channel and data type bodies for send/ |
Line 21: | Line 21: | ||
The old ACT only had single-assignment parameters. So | The old ACT only had single-assignment parameters. So | ||
- | < | + | < |
pint x; | pint x; | ||
Line 28: | Line 28: | ||
</ | </ | ||
would result in an error. This was sometimes used to implement assertions. For example, if a parameter '' | would result in an error. This was sometimes used to implement assertions. For example, if a parameter '' | ||
- | < | + | < |
x=2*y; | x=2*y; | ||
</ | </ | ||
Line 34: | Line 34: | ||
The new ACT supports [[language: | The new ACT supports [[language: | ||
- | < | + | < |
{x=2*y}; | {x=2*y}; | ||
</ | </ | ||
If a more meaningful message is required, the following syntax is also supported: | If a more meaningful message is required, the following syntax is also supported: | ||
- | < | + | < |
{x=2*y : "This assertion failed" | {x=2*y : "This assertion failed" | ||
</ | </ | ||
Line 46: | Line 46: | ||
In the previous version of ACT, one could do the following: | In the previous version of ACT, one could do the following: | ||
- | < | + | < |
bool x[2][2]; | bool x[2][2]; | ||
bool y[2]; | bool y[2]; | ||
Line 59: | Line 59: | ||
</ | </ | ||
Instead, you can get the same effect by saying: | Instead, you can get the same effect by saying: | ||
- | < | + | < |
x[0][0..1] = y; | x[0][0..1] = y; | ||
</ | </ | ||
Line 67: | Line 67: | ||
When two signals are connected to each other, ACT picks one of them to be the canonical name for the signal and tracks the other names as aliases. In older versions, the canonical name was selected as the //outer most, shortest// name. Here, //outer most// means the name accessible with the fewest dots. So, for example, if you had an '' | When two signals are connected to each other, ACT picks one of them to be the canonical name for the signal and tracks the other names as aliases. In older versions, the canonical name was selected as the //outer most, shortest// name. Here, //outer most// means the name accessible with the fewest dots. So, for example, if you had an '' | ||
- | < | + | < |
defproc test (e1of2 x) | defproc test (e1of2 x) | ||
{ | { |