Last change
on this file since 3175 was
3175,
checked in by ksherdy, 6 years ago

Modified test files for pabloS grammar.

File size:
729 bytes

Line  

1  function void Test() { 

2  

3  /* 

4  // transformations 

5  

6  x & y => simd_and(x, y) 

7  x & ~y => simd_andc(x, y) 

8  x  y => simd_or(x, y) 

9  x ^ y => simd_xor(x, y) 

10  ~x => simd_not(x) 

11  

12  // additional transformations not tested 

13  

14  if (x) {} => if (bitblock::any(x)){} 

15  while (x) {} => while (bitblock::any(x)){} 

16  

17  r = pablo.Mask(1,0); 

18  r = 

19  

20  */ 

21  

22  stream<1> x; 

23  stream<1> y; 

24  stream<1> r; 

25  

26  r = simd_and(x,y); // Expected result 

27  r = (x & y); // Translates to expected result 

28  

29  r = simd_andc(x, y); 

30  r = (x & ~ y); 

31  

32  r = simd_andc(y, x); 

33  r = (~x & y); 

34  

35  r = simd_xor(x,y); 

36  r = (x ^ y) ; 

37  

38  r = simd_or(x,y); 

39  r = (x  y) ; 

40  

41  r = simd_not(x); 

42  r = ~x; 

43  

44  } 

Note: See
TracBrowser
for help on using the repository browser.