Beispiel #1
0
def test_gates(mydir):
    c = verilog.load(mydir / 'gates.v')
    df = sdf.load(mydir / 'gates.sdf')
    lt = df.annotation(c, dataset=1)
    nand_a = c.cells['nandgate'].ins[0]
    nand_b = c.cells['nandgate'].ins[1]
    and_a = c.cells['andgate'].ins[0]
    and_b = c.cells['andgate'].ins[1]

    assert lt[nand_a, 0, 0] == 0.103
    assert lt[nand_a, 0, 1] == 0.127

    assert lt[nand_b, 0, 0] == 0.086
    assert lt[nand_b, 0, 1] == 0.104

    assert lt[and_a, 0, 0] == 0.378
    assert lt[and_a, 0, 1] == 0.377

    assert lt[and_b, 0, 0] == 0.375
    assert lt[and_b, 0, 1] == 0.370
Beispiel #2
0
def test_b14_cuda(mydir):
    c = verilog.load(mydir / 'b14.v.gz', branchforks=True)
    df = sdf.load(mydir / 'b14.sdf.gz')
    lt = df.annotation(c)
    wsim = WaveSimCuda(c, lt, 8)
    compare_to_logic_sim(wsim)
Beispiel #3
0
def test_b14(mydir):
    df = sdf.load(mydir / 'b14.sdf.gz')
    assert df.name == 'b14'