aboutsummaryrefslogtreecommitdiffstats
path: root/libraries
diff options
context:
space:
mode:
authorFrancisco Ayala Le Brun <frankxlebrun@gmail.com>2020-10-07 22:12:48 +0200
committertgingold <tgingold@users.noreply.github.com>2020-10-08 07:34:19 +0200
commitc16353e207fffe6b67d63822d6a5b556b3186f04 (patch)
tree6b6a3a65592523fe24b3c8812851b0a1c851ba48 /libraries
parent6e303efe5b1e3b6ab9f4f37d2e35c645496c03d7 (diff)
downloadghdl-c16353e207fffe6b67d63822d6a5b556b3186f04.tar.gz
ghdl-c16353e207fffe6b67d63822d6a5b556b3186f04.tar.bz2
ghdl-c16353e207fffe6b67d63822d6a5b556b3186f04.zip
vendor-libs: add machxo3d support
Diffstat (limited to 'libraries')
-rw-r--r--libraries/vendors/compile-lattice.ps119
-rwxr-xr-xlibraries/vendors/compile-lattice.sh3
2 files changed, 19 insertions, 3 deletions
diff --git a/libraries/vendors/compile-lattice.ps1 b/libraries/vendors/compile-lattice.ps1
index 7df1600f2..bcb7e1546 100644
--- a/libraries/vendors/compile-lattice.ps1
+++ b/libraries/vendors/compile-lattice.ps1
@@ -44,7 +44,7 @@
# o Lattice device libraries:
# - EC, ECP, ECP2, ECP3, ECP5U
# - LPTM, LPTM2
-# - MachXO, MachXO2, MachXO3L
+# - MachXO, MachXO2, MachXO3L, MachXO3D
# - SC, SCM
# - XP, XP2
#
@@ -78,6 +78,8 @@ param(
[switch]$MachXO2 = $false,
# Compile the Lattice MachXO3L device libraries
[switch]$MachXO3L = $false,
+ # Compile the Lattice MachXO3D device libraries
+ [switch]$MachXO3D = $false,
# Compile the Lattice SC device libraries
[switch]$sc = $false,
@@ -126,7 +128,7 @@ Import-Module $PSScriptRoot\shared.psm1 -Verbose:$false -Debug:$false -ArgumentL
$Help = $Help -or (-not ($All -or
($ec -or $ecp -or $ecp2 -or $ecp3 -or $ecp5u) -or
($lptm -or $lptm2) -or
- ($MachXO -or $MachXO2 -or $MachXO3L) -or
+ ($MachXO -or $MachXO2 -or $MachXO3L -or $MachXO3D) -or
($sc -or $scm) -or
($xp -or $xp2) -or
$Clean))
@@ -146,6 +148,7 @@ if ($All)
$MachXO = $true
$MachXO2 = $true
$MachXO3L = $true
+ $MachXO3D = $true
$sc = $true
$scm = $true
$xp = $true
@@ -201,6 +204,7 @@ $FileLists = @{
"machxo" = @("MACHXO_CMB.vhd", "MACHXO_SEQ.vhd", "MACHXOCOMP.vhd", "MACHXO_CNT.vhd", "MACHXO_IO.vhd", "MACHXO_LUT.vhd", "MACHXO_MEM.vhd", "MACHXO_MISC.vhd");
"machxo2" = @("MACHXO2_CMB.vhd", "MACHXO2_SEQ.vhd", "MACHXO2COMP.vhd", "MACHXO2_CNT.vhd", "gsr_pur_assign.vhd", "MACHXO2_IO.vhd", "MACHXO2_LUT.vhd", "MACHXO2_MEM.vhd", "MACHXO2_MISC.vhd");
"machxo3l" = @("MACHXO3L_CMB.vhd", "MACHXO3L_SEQ.vhd", "MACHXO3LCOMP.vhd", "gsr_pur_assign.vhd", "MACHXO3L_CNT.vhd", "MACHXO3L_IO.vhd", "MACHXO3L_LUT.vhd", "MACHXO3L_MEM.vhd", "MACHXO3L_MISC.vhd");
+ "machxo3d" = @("MACHXO3D_CMB.vhd", "MACHXO3D_SEQ.vhd", "MACHXO3DCOMP.vhd", "gsr_pur_assign.vhd", "MACHXO3D_CNT.vhd", "MACHXO3D_IO.vhd", "MACHXO3D_LUT.vhd", "MACHXO3D_MEM.vhd", "MACHXO3D_MISC.vhd");
"sc" = @("ORCA_CMB.vhd", "ORCA_SEQ.vhd", "ORCACOMP.vhd", "ORCA_CNT.vhd", "ORCA_IO.vhd", "ORCA_MEM.vhd", "ORCA_MIS.vhd", "ORCA_SL.vhd");
"scm" = @("ORCA_CMB.vhd", "ORCA_SEQ.vhd", "ORCACOMP.vhd", "ORCA_CNT.vhd", "ORCA_IO.vhd", "ORCA_MEM.vhd", "ORCA_MIS.vhd", "ORCA_SL.vhd");
"xp" = @("ORCA_CMB.vhd", "ORCA_SEQ.vhd", "ORCACOMP.vhd", "ORCA_LUT.vhd", "ORCA_MISC.vhd", "ORCA_CNT.vhd", "ORCA_IO.vhd", "ORCA_MEM.vhd");
@@ -328,6 +332,17 @@ if ((-not $StopCompiling) -and $machxo3l)
$StopCompiling = $HaltOnError -and ($ErrorCount -ne 0)
}
+# Lattice MachXO3D library
+# ==============================================================================
+if ((-not $StopCompiling) -and $machxo3d)
+{ $Library = "machxo3d"
+ $SourceFiles = $FileLists[$Library] | % { "$SourceDirectory\$Library\src\$_" }
+
+ $ErrorCount += 0
+ Start-PackageCompilation $GHDLBinary $GHDLOptions $DestinationDirectory $Library $VHDLVersion $SourceFiles $SuppressWarnings $HaltOnError -Verbose:$EnableVerbose -Debug:$EnableDebug
+ $StopCompiling = $HaltOnError -and ($ErrorCount -ne 0)
+}
+
# Lattice SC library
# ==============================================================================
if ((-not $StopCompiling) -and $sc)
diff --git a/libraries/vendors/compile-lattice.sh b/libraries/vendors/compile-lattice.sh
index 066793bb4..988f2df69 100755
--- a/libraries/vendors/compile-lattice.sh
+++ b/libraries/vendors/compile-lattice.sh
@@ -45,7 +45,7 @@ WorkingDir=$(pwd)
ScriptDir="$(dirname $0)"
ScriptDir="$($READLINK -f $ScriptDir)"
-DeviceList="ec ecp ecp2 ecp3 ecp5u lptm lptm2 machxo machxo2 machxo3l sc scm xp xp2"
+DeviceList="ec ecp ecp2 ecp3 ecp5u lptm lptm2 machxo machxo2 machxo3l machxo3d sc scm xp xp2"
# source configuration file from GHDL's 'vendors' library directory
. $ScriptDir/../ansi_color.sh
@@ -246,6 +246,7 @@ FileLists[lptm2]="MACHXO2_CMB.vhd MACHXO2_SEQ.vhd MACHXO2COMP.vhd gsr_pur_assign
FileLists[machxo]="MACHXO_CMB.vhd MACHXO_SEQ.vhd MACHXOCOMP.vhd MACHXO_CNT.vhd MACHXO_IO.vhd MACHXO_LUT.vhd MACHXO_MEM.vhd MACHXO_MISC.vhd"
FileLists[machxo2]="MACHXO2_CMB.vhd MACHXO2_SEQ.vhd MACHXO2COMP.vhd MACHXO2_CNT.vhd gsr_pur_assign.vhd MACHXO2_IO.vhd MACHXO2_LUT.vhd MACHXO2_MEM.vhd MACHXO2_MISC.vhd"
FileLists[machxo3l]="MACHXO3L_CMB.vhd MACHXO3L_SEQ.vhd MACHXO3LCOMP.vhd gsr_pur_assign.vhd MACHXO3L_CNT.vhd MACHXO3L_IO.vhd MACHXO3L_LUT.vhd MACHXO3L_MEM.vhd MACHXO3L_MISC.vhd"
+FileLists[machxo3d]="MACHXO3D_CMB.vhd MACHXO3D_SEQ.vhd MACHXO3DCOMP.vhd gsr_pur_assign.vhd MACHXO3D_CNT.vhd MACHXO3D_IO.vhd MACHXO3D_LUT.vhd MACHXO3D_MEM.vhd MACHXO3D_MISC.vhd"
FileLists[sc]="ORCA_CMB.vhd ORCA_SEQ.vhd ORCACOMP.vhd ORCA_CNT.vhd ORCA_IO.vhd ORCA_MEM.vhd ORCA_MIS.vhd ORCA_SL.vhd"
FileLists[scm]="ORCA_CMB.vhd ORCA_SEQ.vhd ORCACOMP.vhd ORCA_CNT.vhd ORCA_IO.vhd ORCA_MEM.vhd ORCA_MIS.vhd ORCA_SL.vhd"
FileLists[xp]="ORCA_CMB.vhd ORCA_SEQ.vhd ORCACOMP.vhd ORCA_LUT.vhd ORCA_MISC.vhd ORCA_CNT.vhd ORCA_IO.vhd ORCA_MEM.vhd"