Updates for issue #72
1) vectors in entity instantion port names are now upper cased.
This commit is contained in:
parent
b3d9dff2b3
commit
a2d0cfaa22
|
|
@ -280,7 +280,9 @@ class rule_011(instantiation_rule):
|
|||
def _fix_violations(self, oFile):
|
||||
for iLineNumber in self.violations:
|
||||
oLine = oFile.lines[iLineNumber]
|
||||
self._upper_case(oLine, oLine.line.split()[0])
|
||||
sPortName = oLine.line.split('=>')[0].split('(')[0].lstrip().rstrip()
|
||||
print '{0:5d} | {1:10s} | {2:s}'.format(iLineNumber, sPortName, oLine.line)
|
||||
self._upper_case(oLine, sPortName)
|
||||
|
||||
|
||||
class rule_012(instantiation_rule):
|
||||
|
|
|
|||
|
|
@ -66,5 +66,11 @@ begin
|
|||
);
|
||||
--This is a comment
|
||||
|
||||
U_INST1 : INST1
|
||||
port map (
|
||||
port_1(3 downto 0) => w_port_1,
|
||||
port_2 (3 downto 0) => w_port_2
|
||||
);
|
||||
|
||||
end architecture ARCH;
|
||||
|
||||
|
|
|
|||
|
|
@ -118,7 +118,7 @@ class testRuleInstantiationMethods(unittest.TestCase):
|
|||
self.assertEqual(oRule.name, 'instantiation')
|
||||
self.assertEqual(oRule.identifier, '011')
|
||||
|
||||
dExpected = [19,20,21,25,26,27,32,33,34,39,40,41,46,47,48,53,54,55]
|
||||
dExpected = [19,20,21,25,26,27,32,33,34,39,40,41,46,47,48,53,54,55,71,72]
|
||||
oRule.analyze(oFilePort)
|
||||
self.assertEqual(oRule.violations, dExpected)
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ class testVhdlFileInstantiationAssignments(unittest.TestCase):
|
|||
|
||||
|
||||
def test_isInstantiation_assignment(self):
|
||||
lExpected = [6,17,23,29,36,44,52,57,63]
|
||||
lExpected = [6,17,23,29,36,44,52,57,63,69]
|
||||
# Generic actual list
|
||||
lActual = []
|
||||
for iIndex, oLine in enumerate(oFile.lines):
|
||||
|
|
@ -22,7 +22,7 @@ class testVhdlFileInstantiationAssignments(unittest.TestCase):
|
|||
self.assertEqual(lActual, lExpected)
|
||||
|
||||
def test_insideInstantiation_assignment(self):
|
||||
lExpected = [6,7,8,9,10,11,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,44,45,46,47,48,49,50,52,53,54,55,57,58,59,60,61,63,64,65,66]
|
||||
lExpected = [6,7,8,9,10,11,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,44,45,46,47,48,49,50,52,53,54,55,57,58,59,60,61,63,64,65,66,69,70,71,72,73]
|
||||
# Generic actual list
|
||||
lActual = []
|
||||
for iIndex, oLine in enumerate(oFile.lines):
|
||||
|
|
@ -32,7 +32,7 @@ class testVhdlFileInstantiationAssignments(unittest.TestCase):
|
|||
self.assertEqual(lActual, lExpected)
|
||||
|
||||
def test_isInstantiationPortKeyword_assignment(self):
|
||||
lExpected = [7,18,24,31,37,45,52,58,64]
|
||||
lExpected = [7,18,24,31,37,45,52,58,64,70]
|
||||
# Generic actual list
|
||||
lActual = []
|
||||
for iIndex, oLine in enumerate(oFile.lines):
|
||||
|
|
@ -42,7 +42,7 @@ class testVhdlFileInstantiationAssignments(unittest.TestCase):
|
|||
self.assertEqual(lActual, lExpected)
|
||||
|
||||
def test_isInstantiationPortEnd_assignment(self):
|
||||
lExpected = [11,22,28,35,42,50,55,61,66]
|
||||
lExpected = [11,22,28,35,42,50,55,61,66,73]
|
||||
# Generic actual list
|
||||
lActual = []
|
||||
for iIndex, oLine in enumerate(oFile.lines):
|
||||
|
|
@ -52,7 +52,7 @@ class testVhdlFileInstantiationAssignments(unittest.TestCase):
|
|||
self.assertEqual(lActual, lExpected)
|
||||
|
||||
def test_isInstantiationPortAssignment_assignment(self):
|
||||
lExpected = [8,9,10,19,20,21,25,26,27,32,33,34,39,40,41,46,47,48,53,54,55,58,59,60,65]
|
||||
lExpected = [8,9,10,19,20,21,25,26,27,32,33,34,39,40,41,46,47,48,53,54,55,58,59,60,65,71,72]
|
||||
# Generic actual list
|
||||
lActual = []
|
||||
for iIndex, oLine in enumerate(oFile.lines):
|
||||
|
|
|
|||
Loading…
Reference in New Issue