Skip to content

Commit

Permalink
coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
nanocoh committed Jan 6, 2025
1 parent ac76c00 commit 19b0c45
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/najaeda/test_najaeda_netlist0.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,11 @@ def test_instance(self):
self.model = snl.SNLDesign.create(lib)
self.submodel = snl.SNLDesign.create(lib, "submodel")
self.i0 = snl.SNLScalarTerm.create(self.model, snl.SNLTerm.Direction.Input, "I0")
self.assertEqual(self.i0.getFlatID(), 0)
self.i1 = snl.SNLBusTerm.create(self.model, snl.SNLTerm.Direction.Input, 4, 0, "I1")
self.assertEqual(self.i1.getBit(0).getBit(), 0)
self.assertEqual(self.i1.getBit(0).getFlatID(), 5)
self.assertEqual(self.i1.getFlatID(), 1)
self.o = snl.SNLScalarTerm.create(self.model, snl.SNLTerm.Direction.Output, "O")
ins2 = snl.SNLInstance.create(self.model, self.submodel, "ins2")
ins1 = snl.SNLInstance.create(self.top, self.model, "ins1")
Expand Down Expand Up @@ -217,6 +220,7 @@ def test_equipotential(self):
self.model = snl.SNLDesign.create(lib, "model")
self.submodel = snl.SNLDesign.createPrimitive(self.primitives, "submodel")
self.i0 = snl.SNLScalarTerm.create(self.model, snl.SNLTerm.Direction.Input, "I0")
self.assertEqual(self.i0.getFlatID(), 0)
self.i1 = snl.SNLBusTerm.create(self.model, snl.SNLTerm.Direction.Input, 4, 0, "I1")
self.o = snl.SNLScalarTerm.create(self.model, snl.SNLTerm.Direction.Output, "O")
self.i0sub = snl.SNLScalarTerm.create(self.submodel, snl.SNLTerm.Direction.Input, "I0")
Expand Down Expand Up @@ -251,6 +255,7 @@ def test_equipotential(self):
self.assertTrue(path2.getHeadInstance() == ins1)
#print(path2)
inst_term = netlist.Term(path2, sub_inst_terms[0].getBitTerm())
self.assertEqual(0, sub_inst_terms[0].getBitTerm().getFlatID())
equi = netlist.Equipotential(inst_term)
net_component_occurrence2 = snl.SNLNetComponentOccurrence(path1, sub_inst_terms[0])
snlequi = snl.SNLEquipotential(net_component_occurrence2)
Expand Down

0 comments on commit 19b0c45

Please sign in to comment.