source: trunk/symtab/marker_strms.py @ 1978

Last change on this file since 1978 was 1929, checked in by ksherdy, 8 years ago

Updated identity symbol table.

File size: 1.2 KB
Line 
1class Markers():
2    spans = 0
3    starts = 0
4    ends = 0
5
6# Calculate Symbol spans
7def Classify_markers(basis_bits, markers):
8    temp1 = (basis_bits.bit_6 & basis_bits.bit_7)
9    temp2 = (basis_bits.bit_5 | temp1)
10    temp3 = (basis_bits.bit_4 & temp2)
11    temp4 = (~temp3)
12    temp5 = (basis_bits.bit_4 | basis_bits.bit_5)
13    temp6 = (basis_bits.bit_6 | basis_bits.bit_7)
14    temp7 = (temp5 | temp6)
15    temp8 = ((basis_bits.bit_3 & temp4)|(~(basis_bits.bit_3) & temp7))
16    temp9 = (basis_bits.bit_1 &~ basis_bits.bit_0)
17    temp10 = (temp8 & temp9)
18    temp11 = (basis_bits.bit_0 | basis_bits.bit_1)
19    temp12 = (basis_bits.bit_2 & basis_bits.bit_3)
20    temp13 = (temp12 &~ temp11)
21    temp14 = (basis_bits.bit_5 | basis_bits.bit_6)
22    temp15 = (basis_bits.bit_4 & temp14)
23    temp16 = (temp13 &~ temp15)
24    markers.spans = (temp10 | temp16)
25
26# Determine Symbol starts, ends
27def Generate_markers(markers):
28    markers.starts = markers.spans &~ Advance(markers.spans)
29    markers.ends = ~markers.spans & Advance(markers.spans)
30    #ScanThru(markers.starts, markers.spans)
31    #markers.ends = ScanThru(markers.starts, markers.spans)
32
33def Main(markers):
34    Classify_markers(basis_bits, markers)
35    Generate_markers(markers)
36
Note: See TracBrowser for help on using the repository browser.