-
Notifications
You must be signed in to change notification settings - Fork 95
/
Copy pathAltera.files
75 lines (74 loc) · 2.87 KB
/
Altera.files
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# EMACS settings: -*- tab-width: 2; indent-tabs-mode: t -*-
# vim: tabstop=2:shiftwidth=2:noexpandtab
# kate: tab-width 2; replace-tabs off; indent-width 2;
# ==============================================================================
# Note: all files are relative to PoC root directory
#
path PreCompiled = ${CONFIG.DirectoryNames:PrecompiledFiles}
if (Tool = "GHDL") then
path GHDL_Directory = (PreCompiled / ${CONFIG.DirectoryNames:GHDLFiles})
path Altera_Directory = (GHDL_Directory / ${CONFIG.DirectoryNames:AlteraSpecificFiles})
if (VHDLVersion < 2002) then
if ?{Altera_Directory} then
if ?{(Altera_Directory / "lpm/v93/lpm-obj93.cf")} then
library lpm Altera_Directory
end if
if ?{(Altera_Directory / "sgate/v93/sgate-obj93.cf")} then
library sgate Altera_Directory
end if
if ?{(Altera_Directory / "altera/v93/altera-obj93.cf")} then
library altera Altera_Directory
end if
if ?{(Altera_Directory / "altera_mf/v93/altera_mf-obj93.cf")} then
library altera_mf Altera_Directory
end if
if ?{(Altera_Directory / "altera_lnsim/v93/altera_lnsim-obj93.cf")} then
library altera_lnsim Altera_Directory
end if
# TODO: add device libraries if needed
else
report "No precompiled Altera primitives for GHDL and VHDL-93 found."
end if
elseif (VHDLVersion <= 2008) then
if ?{Altera_Directory} then
if ?{(Altera_Directory / "lpm/v08/lpm-obj08.cf")} then
library lpm Altera_Directory
end if
if ?{(Altera_Directory / "sgate/v08/sgate-obj08.cf")} then
library sgate Altera_Directory
end if
if ?{(Altera_Directory / "altera/v08/altera-obj08.cf")} then
library altera Altera_Directory
end if
if ?{(Altera_Directory / "altera_mf/v08/altera_mf-obj08.cf")} then
library altera_mf Altera_Directory
end if
if ?{(Altera_Directory / "altera_lnsim/v08/altera_lnsim-obj08.cf")} then
library altera_lnsim Altera_Directory
end if
# TODO: add device libraries if needed
else
report "No precompiled Altera primitives for GHDL and VHDL-2008 found."
end if
else
report "No precompiled Altera primitives for GHDL found."
end if
elseif (Tool in ["Mentor_vSim", "Cocotb_QuestaSim"]) then
path Altera_Directory = (PreCompiled / (${CONFIG.DirectoryNames:QuestaSimFiles} / ${CONFIG.DirectoryNames:AlteraSpecificFiles}))
if ?{Altera_Directory} then
library lpm Altera_Directory
library sgate Altera_Directory
library altera Altera_Directory
library altera_mf Altera_Directory
library altera_lnsim Altera_Directory
# TODO: add device libraries if needed
else
report "No precompiled Altera primitives for QuestaSim/ModelSim found."
end if
elseif (ToolChain = "Altera_Quartus") then
# implicitly referenced; nothing to reference
elseif (Tool = "Aldec_aSim") then
# Active-HDL is shipped with Altera libraries.
else
report "No precompiled Altera primitives found."
end if