Skip to content

Commit

Permalink
Revert "Swap isinput isoutput logic"
Browse files Browse the repository at this point in the history
This reverts commit 0e56762.
  • Loading branch information
leonardt committed Jul 12, 2018
1 parent fd67997 commit 7112314
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions magma/testing/verilator.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def regression_harness(circuit,tests):

def harness(circuit,tests):

assert len(circuit.interface.ports.keys()) == len(tests[0]), (len(circuit.interface.ports.keys()), len(tests[0]))
assert len(circuit.interface.ports.keys()) == len(tests[0])

source = '''\
#include "V{name}.h"
Expand All @@ -94,7 +94,7 @@ def harness(circuit,tests):
testvector = ', '.join([t.as_binary_string() for t in test])
#testvector += ', {}'.format(int(func(*test[:nargs])))
source += '''\
{{ {} }},
{{ {} }},
'''.format(testvector)
source += '''\
};
Expand All @@ -107,7 +107,7 @@ def harness(circuit,tests):

i = 0
for name, port in circuit.interface.ports.items():
if port.isinput():
if port.isoutput():
source += '''\
top->{} = test[{}];
'''.format(name,i)
Expand All @@ -119,7 +119,7 @@ def harness(circuit,tests):

i = 0
for name, port in circuit.interface.ports.items():
if port.isoutput():
if port.isinput():
source += '''\
assert(top->{} == test[{}]);
'''.format(name,i)
Expand Down

0 comments on commit 7112314

Please sign in to comment.