예제 #1
0
def verifier_input(inputs):
    paramstr = '\n'.join([
        inputs[1][x]
        for x in ["nInputs", "nCopyBits", "nParBitsV", "defDebug"]
    ])
    top = util.load_template('verifier_input_template.sv')

    return top.format(paramstr)
예제 #2
0
def computation_layer(inputs, layNum):
    tlvals = inputs[1]

    paramstr = '\n'.join([ tlvals[x] for x in ["nMuxSels", "nCopyBits", "nParBitsP", "defDebug"] ])
    paramstr += '\n' + "localparam layNum = %d;" % layNum

    for ty in inputs[2:]:
        paramstr += '\n' + ty[layNum]

    top = util.load_template('computation_layer_template.sv')

    return top.format(paramstr, layNum)
예제 #3
0
def prover_shim(inputs):
    paramstr = '\n'.join([ inputs[1][x] for x in ["nCopyBits", "nOutputs", "defDebug"] ])
    top = util.load_template('prover_shim_template.sv')

    return top.format(paramstr)