Beispiel #1
0
 if token.kind is TokenKind.CHANGE_TIME and token.data == 0:
     prev_max = token.data
     index = index + 1
     try:
         token = next(lt)
         continue
     except StopIteration:
         index = 0
         list3.clear()
         break
 if token.kind is TokenKind.CHANGE_SCALAR and prev_max == 0:
     i = len(list3) - 1
     while i >= 0:
         for l in list3:
             v = Variable(ident=token.data.id_code,
                          type='wire',
                          size='1',
                          init=token.data.value)
             if l.ident == token.data.id_code:
                 if get_header == 1:
                     writer.dump_on(oldmax)
                 else:
                     writer.dump_on(oldmax)
                 if get_header == 1:
                     writer.change(l, oldmax, v.value)
                 else:
                     writer.change(l, oldmax, v.value)
         prev_max = 1
         i = i - 1
         try:
             token = next(lt)
             continue
Beispiel #2
0
def test_variable():
    var = Variable('ident0', 'integer', 16, 0)
    with pytest.raises(NotImplementedError):
        var.format_value(0)
Beispiel #3
0
def test_variable():
    var = Variable('ident0', 'integer', 16)
    with pytest.raises(NotImplementedError):
        var.format_value(0)