Commit a29e6a9f authored by Tristan Gingold's avatar Tristan Gingold

Add the notion of system libraries.

Avoid reports of not satisfied relations for system libraries and modules.
parent d3cb6f5b
......@@ -152,9 +152,12 @@ class Action(object):
"""Build file set with only those files required by the top entity"""
if not self._deps_solved:
libs = None
system_libs = self.system_libs
if self.tool is not None:
libs = self.tool.get_standard_libs()
dep_solver.solve(self.parseable_fileset, self.system_libs, libs)
for l in self.tool.get_system_libs():
system_libs.add(l)
dep_solver.solve(self.parseable_fileset, system_libs, libs)
self._deps_solved = True
if self.options.all_files:
# If option -all is used, no need to compute dependencies.
......
......@@ -31,14 +31,20 @@ def build_xilinx():
"""Modules and packages provided by Xilinx system libraries"""
res = []
add_package(res, 'unisim', 'vcomponents')
for n in ['ibufds', 'ibufgds', 'ibufds_diff_out',
for n in ['ibuf', 'ibufds', 'ibufgds', 'ibufds_diff_out',
'ibufds_gte2',
'obufds', 'bufio',
'obufds', 'obuft', 'obuftds',
'oserdes2', 'oserdese2', 'iserdese2', 'iodelay2', 'odelaye2', 'idelaye2', 'idelayctrl',
'bufgmux_ctrl', 'bufg', 'bufr', 'bufpll',
'iobuf', 'iobufds',
'pullup', 'pulldown',
'bufio', 'bufio2',
'bufgmux_ctrl', 'bufg', 'bufgce', 'bufr', 'bufpll',
'startupe2',
'mmcme2_adv', 'mmcme2_base', 'pll_base', 'dcm_base', 'dcm_adv', 'dcm_sp',
'icap_spartan6', 'gtxe2_channel',
'mmcme2_adv', 'mmcme2_base', 'pll_base', 'pll_adv', 'dcm_base', 'dcm_adv', 'dcm_sp',
'bufpll_mcb', 'mcb', 'iodrp2', 'iodrp2_mcb',
'icap_spartan6', 'bscan_spartan6',
'gtxe2_channel', 'gtpa1_dual',
'dsp48a1',
'srlc32e']:
add_entity(res, n)
return res
......
......@@ -61,7 +61,8 @@ class ToolISE(MakefileSyn):
STANDARD_LIBS = ['ieee', 'ieee_proposed', 'iSE', 'simprims', 'std',
'synopsys', 'unimacro', 'unisim', 'XilinxCoreLib']
SYSTEM_LIBS = ['xilinx']
SUPPORTED_FILES = {
UCFFile: 'xfile add {srcfile}',
CDCFile: 'xfile add {srcfile}',
......
......@@ -39,6 +39,7 @@ class ToolMakefile(object):
HDL_FILES = {}
TOOL_INFO = {}
STANDARD_LIBS = []
SYSTEM_LIBS = []
CLEAN_TARGETS = {}
SUPPORTED_FILES = {}
......@@ -55,9 +56,15 @@ class ToolMakefile(object):
self._file.close()
def get_standard_libs(self):
"""Get the standard libs supported by the tool"""
"""Get the standard vhdl libraries supported by the tool. Any package
from these libraries are considered as satisfied"""
return self.STANDARD_LIBS
def get_system_libs(self):
"""Get the system libs supported by the tool. Any package or entities
provided by those are considered as satisfied"""
return self.SYSTEM_LIBS
def get_parseable_files(self):
"""Get the parseable HDL file types supported by the tool"""
return self.HDL_FILES
......
......@@ -45,6 +45,7 @@ class ToolVivado(ToolXilinx):
}
STANDARD_LIBS = ['ieee', 'std']
SYSTEM_LIBS = ['xilinx']
SUPPORTED_FILES = {
XDCFile: ToolXilinx._XILINX_SOURCE,
......
......@@ -40,6 +40,7 @@ class ToolVivadoSim(MakefileSim):
}
STANDARD_LIBS = ['ieee', 'std']
SYSTEM_LIBS = ['xilinx']
HDL_FILES = {VerilogFile: '', VHDLFile: '', SVFile: ''}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment