source: proto/Compiler/workspace/prototype.py @ 669

Last change on this file since 669 was 669, checked in by ksherdy, 9 years ago

Update demo prototype.

File size: 909 bytes
Line 
1# -*- coding: utf-8 -*-
2#
3# prototype.py
4#
5# Parallel Prototype Skeleton
6#
7# Ken Herdy
8# Oct. 13, 2010
9#
10#----------------------------------------------------------------------------
11#
12# We use python's unlimited precision integers for unbounded bit streams.
13# This permits simple logical operations on the entire stream.
14# Assumption: bitstreams are little-endian (e.g., as on x86).
15#
16#----------------------------------------------------------------------------
17#
18
19import bitutil
20import byteclass
21import sys
22
23filename = "prototype.py"
24
25def XXX(data):
26        """
27        >>> XXX('Expected Value')
28        'Expected Value'
29        """
30        return data
31
32def demo_XXX(data):
33        XXX(data)
34        return data
35
36def main():
37
38        return
39       
40if __name__ == "__main__":
41        import doctest
42        doctest.testmod()
43
44        if len(sys.argv) < 1:
45                sys.stderr.write("Usage: " + filename + "\n")
46                sys.exit(2)
47
48        data = bitutil.readfile(sys.argv[1]) 
49        demo_validate_number(data)
50
Note: See TracBrowser for help on using the repository browser.