Exemplo n.º 1
0
def appfun(*args, **kwargs):
    return resultObj('x')
Exemplo n.º 2
0
def concat(l):
    l2 = [str(p) for p in l]
    cat = ','.join(l2)
    return resultObj('{' + cat + '}')
Exemplo n.º 3
0
def loadblk(m, a, n):
    return resultObj('{' + ','.join(
        [str(m) + '[' + str(a) + '+' + str(p) + ']' for p in range(n)]) + '}')
Exemplo n.º 4
0
def sgt(a, b):
    return resultObj('$sign(' + str(a) + ') > $sign(' + str(b) + ')')
Exemplo n.º 5
0
def readchunk(*args, **kwargs):
    return resultObj('x')
Exemplo n.º 6
0
def ite(e, t, f):
    return resultObj('(' + str(e) + ') ? (' + str(t) + ') : (' + str(f) + ')')
Exemplo n.º 7
0
 def reg(self, name, width):
     print 'adding %s:%d' % (name, width)
     self.state_list.append((name, width))
     self.pure_stateList.append(name)
     return resultObj(name)
Exemplo n.º 8
0
def writechunk(*args, **kwargs):
    return resultObj('x')
Exemplo n.º 9
0
 def stage(self, name, stageNo):
     if stageNo >= len(self.stageList):
         self.stageList.extend([''] * (stageNo - len(self.stageList) + 1))
     self.stageList[stageNo] = name
     return resultObj(name)
Exemplo n.º 10
0
 def mem(self, name, addw, dataw):
     print 'adding mem %s:%d->%d' % (name, addw, dataw)
     self.mem_list.append((name, addw, dataw))
     return resultObj(name)
Exemplo n.º 11
0
 def getmem(self, name):
     if name not in self.usedParentStates:
         self.usedParentStates.append(name)
     return resultObj(name)
Exemplo n.º 12
0
def bool(v):
    return resultObj("(" + str(v) + ") != 0")
Exemplo n.º 13
0
def const(v, w):
    return resultObj(str(v))
Exemplo n.º 14
0
def zero_extend(e, width):
    return resultObj(e)
Exemplo n.º 15
0
 def bit(self, name):
     print 'adding %s:%d' % (name, 1)
     self.state_list.append((name, 1))
     self.pure_stateList.append(name)
     return resultObj(name)
Exemplo n.º 16
0
def writeslice(self, *args, **kwargs):
    return resultObj('x')
Exemplo n.º 17
0
 def inp(self, name, width):
     print 'adding %s:%d' % (name, width)
     self.state_list.append((name, width))
     self.port.append(name)
     return resultObj(name)
Exemplo n.º 18
0
def readslice(self, *args, **kwargs):
    return resultObj('x')
Exemplo n.º 19
0
 def syn_elem(self, *args, **kwargs):
     return resultObj()
Exemplo n.º 20
0
def choice(*args, **kwargs):
    return resultObj('x')
Exemplo n.º 21
0
 def const(self, val, width):
     return resultObj("%d'd%d" % (width, val))
Exemplo n.º 22
0
def load(m, a):
    return resultObj(str(m) + '[' + str(a) + ']')
Exemplo n.º 23
0
def inrange(*args, **kwargs):
    return resultObj('x')
Exemplo n.º 24
0
def storeblk(m, a, d):
    return resultObj(str(m))  # unable to translate
Exemplo n.º 25
0
def sign_extend(e, width):
    return resultObj(e)