summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/ghdl.texi7
-rw-r--r--ortho/mcode/ortho_code-consts.adb15
-rw-r--r--ortho/mcode/ortho_code-sysdeps.adb6
-rw-r--r--ortho/mcode/ortho_code-sysdeps.ads4
-rw-r--r--ortho/mcode/ortho_code-types.adb6
-rw-r--r--ortho/mcode/ortho_mcode.adb2
-rw-r--r--sem_assocs.adb2
-rw-r--r--translate/grt/grt-processes.ads1
-rw-r--r--translate/grt/grt-signals.adb1
-rw-r--r--translate/grt/grt-signals.ads3
-rw-r--r--translate/grt/grt-vpi.ads1
-rw-r--r--translate/mcode/winbuild.bat2
-rw-r--r--translate/mcode/windows/compile.bat4
-rw-r--r--translate/mcode/windows/ghdl.nsi2
-rw-r--r--translate/mcode/windows/ortho_code-sysdeps.adb8
-rw-r--r--translate/mcode/windows/ortho_code-x86-flags.ads2
16 files changed, 35 insertions, 31 deletions
diff --git a/doc/ghdl.texi b/doc/ghdl.texi
index eed41f1..ea44ebb 100644
--- a/doc/ghdl.texi
+++ b/doc/ghdl.texi
@@ -1931,7 +1931,8 @@ completely analyzed using either the 87 or the 93 version of the VHDL standard.
@node PSL implementation, Source representation, VHDL standards, GHDL implementation of VHDL
@comment node-name, next, previous, up
@section PSL implementation
-GHDL understands embedded PSL annotations in VHDL files, but in separate files.
+GHDL understands embedded PSL annotations in VHDL files, but not in
+separate files.
As PSL annotations are embedded within comments, you must analyze and elaborate
your design with option @option{-fpsl} to enable PSL annotations.
@@ -1941,8 +1942,8 @@ with the @code{psl} keyword. The keyword must be followed (on the
same line) by a PSL keyword such as @code{assert} or @code{default}.
To continue a PSL statement on the next line, just start a new comment.
-A PSL statement is considered as a concurrent statement, and therefore is
-allowed only where processes are.
+A PSL statement is considered as a process. So it is not allowed within
+a process.
All PSL assertions must be clocked (GHDL doesn't support unclocked assertion).
Furthermore only one clock per assertion is allowed.
diff --git a/ortho/mcode/ortho_code-consts.adb b/ortho/mcode/ortho_code-consts.adb
index dcd7d28..affe82c 100644
--- a/ortho/mcode/ortho_code-consts.adb
+++ b/ortho/mcode/ortho_code-consts.adb
@@ -26,43 +26,52 @@ package body Ortho_Code.Consts is
Kind : OC_Kind;
Lit_Type : O_Tnode;
end record;
+ for Cnode_Common'Size use 64;
type Cnode_Signed is record
Val : Integer_64;
end record;
+ for Cnode_Signed'Size use 64;
type Cnode_Unsigned is record
Val : Unsigned_64;
end record;
+ for Cnode_Unsigned'Size use 64;
type Cnode_Float is record
Val : IEEE_Float_64;
end record;
+ for Cnode_Float'Size use 64;
type Cnode_Enum is record
Id : O_Ident;
Val : Uns32;
end record;
+ for Cnode_Enum'Size use 64;
type Cnode_Addr is record
Decl : O_Dnode;
Pad : Int32;
end record;
+ for Cnode_Addr'Size use 64;
type Cnode_Aggr is record
Els : Int32;
Nbr : Int32;
end record;
+ for Cnode_Aggr'Size use 64;
type Cnode_Sizeof is record
Atype : O_Tnode;
Pad : Int32;
end record;
+ for Cnode_Sizeof'Size use 64;
type Cnode_Union is record
El : O_Cnode;
Field : O_Fnode;
end record;
+ for Cnode_Union'Size use 64;
package Cnodes is new GNAT.Table
(Table_Component_Type => Cnode_Common,
@@ -86,7 +95,7 @@ package body Ortho_Code.Consts is
function To_Cnode_Unsigned is new Ada.Unchecked_Conversion
(Cnode_Common, Cnode_Unsigned);
begin
- return To_Cnode_Unsigned (Cnodes.Table (Cst + 1)).Val;
+ return To_Cnode_Unsigned (Cnodes.Table (Cst + 1)).Val;
end Get_Const_U64;
function Get_Const_I64 (Cst : O_Cnode) return Integer_64
@@ -94,7 +103,7 @@ package body Ortho_Code.Consts is
function To_Cnode_Signed is new Ada.Unchecked_Conversion
(Cnode_Common, Cnode_Signed);
begin
- return To_Cnode_Signed (Cnodes.Table (Cst + 1)).Val;
+ return To_Cnode_Signed (Cnodes.Table (Cst + 1)).Val;
end Get_Const_I64;
function Get_Const_F64 (Cst : O_Cnode) return IEEE_Float_64
@@ -102,7 +111,7 @@ package body Ortho_Code.Consts is
function To_Cnode_Float is new Ada.Unchecked_Conversion
(Cnode_Common, Cnode_Float);
begin
- return To_Cnode_Float (Cnodes.Table (Cst + 1)).Val;
+ return To_Cnode_Float (Cnodes.Table (Cst + 1)).Val;
end Get_Const_F64;
function To_Cnode_Common is new Ada.Unchecked_Conversion
diff --git a/ortho/mcode/ortho_code-sysdeps.adb b/ortho/mcode/ortho_code-sysdeps.adb
deleted file mode 100644
index c5e0629..0000000
--- a/ortho/mcode/ortho_code-sysdeps.adb
+++ /dev/null
@@ -1,6 +0,0 @@
-package body Ortho_Code.Sysdeps is
- procedure Init is
- begin
- null;
- end Init;
-end Ortho_Code.Sysdeps;
diff --git a/ortho/mcode/ortho_code-sysdeps.ads b/ortho/mcode/ortho_code-sysdeps.ads
deleted file mode 100644
index e680e4d..0000000
--- a/ortho/mcode/ortho_code-sysdeps.ads
+++ /dev/null
@@ -1,4 +0,0 @@
-package Ortho_Code.Sysdeps is
- -- OS dependant initializations.
- procedure Init;
-end Ortho_Code.Sysdeps;
diff --git a/ortho/mcode/ortho_code-types.adb b/ortho/mcode/ortho_code-types.adb
index 63e6770..1a505b7 100644
--- a/ortho/mcode/ortho_code-types.adb
+++ b/ortho/mcode/ortho_code-types.adb
@@ -722,6 +722,12 @@ package body Ortho_Code.Types is
Put (", nbr_fields: ");
Put (To_Int32 (Get_Type_Record_Nbr_Fields (Atype)));
New_Line;
+ when OT_Subarray =>
+ Put (" base type: ");
+ Put (Int32 (Get_Type_Subarray_Base (Atype)));
+ Put (", length: ");
+ Put (To_Int32 (Get_Type_Subarray_Length (Atype)));
+ New_Line;
when others =>
null;
end case;
diff --git a/ortho/mcode/ortho_mcode.adb b/ortho/mcode/ortho_mcode.adb
index f9335fa..722e884 100644
--- a/ortho/mcode/ortho_mcode.adb
+++ b/ortho/mcode/ortho_mcode.adb
@@ -17,7 +17,6 @@
-- 02111-1307, USA.
with Ada.Text_IO;
with Ortho_Code.Debug;
-with Ortho_Code.Sysdeps;
with Ortho_Ident;
-- with Binary_File;
@@ -80,7 +79,6 @@ package body Ortho_Mcode is
if New_Access_Type (O_Tnode_Null) /= O_Tnode_Ptr then
raise Program_Error;
end if;
- Ortho_Code.Sysdeps.Init;
-- Do not finish the access, since this creates an infinite recursion
-- in gdb (at least for GDB 6.3).
--Finish_Access_Type (O_Tnode_Ptr, O_Tnode_Ptr);
diff --git a/sem_assocs.adb b/sem_assocs.adb
index 820f50d..b3fc42c 100644
--- a/sem_assocs.adb
+++ b/sem_assocs.adb
@@ -467,6 +467,7 @@ package body Sem_Assocs is
Sub : Iir;
Formal_Object : Iir;
begin
+ -- Recurse.
Formal_Object := Name_To_Object (Formal);
case Get_Kind (Formal_Object) is
when Iir_Kind_Indexed_Name
@@ -518,6 +519,7 @@ package body Sem_Assocs is
end case;
end Add_Individual_Association_1;
+ -- Insert ASSOC into the tree of individual assoc rooted by IASSOC.
procedure Add_Individual_Association (Iassoc : Iir; Assoc : Iir)
is
Formal : Iir;
diff --git a/translate/grt/grt-processes.ads b/translate/grt/grt-processes.ads
index b59a5b1..3218d72 100644
--- a/translate/grt/grt-processes.ads
+++ b/translate/grt/grt-processes.ads
@@ -127,6 +127,7 @@ package Grt.Processes is
private
-- Access to a process subprogram.
type Proc_Acc is access procedure (Self : System.Address);
+ pragma Convention (C, Proc_Acc);
-- State of a process.
type Process_State is
diff --git a/translate/grt/grt-signals.adb b/translate/grt/grt-signals.adb
index 8704aab..fc24077 100644
--- a/translate/grt/grt-signals.adb
+++ b/translate/grt/grt-signals.adb
@@ -1804,6 +1804,7 @@ package body Grt.Signals is
end Compute_Resolved_Signal;
type Conversion_Func_Acc is access procedure (Instance : System.Address);
+ pragma Convention (C, Conversion_Func_Acc);
function To_Conversion_Func_Acc is new Ada.Unchecked_Conversion
(Source => System.Address, Target => Conversion_Func_Acc);
diff --git a/translate/grt/grt-signals.ads b/translate/grt/grt-signals.ads
index bab73ce..79d6e55 100644
--- a/translate/grt/grt-signals.ads
+++ b/translate/grt/grt-signals.ads
@@ -76,7 +76,8 @@ package Grt.Signals is
-- Function access type used to evaluate the guard expression.
type Guard_Func_Acc is access function (This : System.Address)
- return Ghdl_B2;
+ return Ghdl_B2;
+ pragma Convention (C, Guard_Func_Acc);
-- Simply linked list of processes to be resumed in case of events.
diff --git a/translate/grt/grt-vpi.ads b/translate/grt/grt-vpi.ads
index a7f06f7..694db8c 100644
--- a/translate/grt/grt-vpi.ads
+++ b/translate/grt/grt-vpi.ads
@@ -137,6 +137,7 @@ package Grt.Vpi is
(Source => Address, Target => p_cb_data);
type cb_rtn_type is access function (Cb : p_cb_data) return Integer;
+ pragma Convention (C, cb_rtn_type);
type s_cb_data is record
Reason : Integer;
diff --git a/translate/mcode/winbuild.bat b/translate/mcode/winbuild.bat
index bbe031d..8c28268 100644
--- a/translate/mcode/winbuild.bat
+++ b/translate/mcode/winbuild.bat
@@ -7,7 +7,7 @@ if errorlevel 1 goto end
gnatmake windows/ghdlversion -o windows/ghdlversion.exe
windows\ghdlversion < ../../version.ads > windows/version.nsi
-"f:\Program Files\NSIS\makensis" windows\ghdl.nsi
+"c:\Program Files\NSIS\makensis" windows\ghdl.nsi
if errorlevel 1 goto end
exit /b 0
diff --git a/translate/mcode/windows/compile.bat b/translate/mcode/windows/compile.bat
index be0aaec..c668ef0 100644
--- a/translate/mcode/windows/compile.bat
+++ b/translate/mcode/windows/compile.bat
@@ -8,7 +8,7 @@ gcc -c %CFLAGS% ../../grt/grt-cvpi.c
gcc -c %CFLAGS% ../../grt/config/clock.c
gcc -c %CFLAGS% ../../../ortho/mcode/memsegs_c.c
gcc -c %CFLAGS% -DWITH_GNAT_RUN_TIME ../../grt/config/win32.c
-gnatmake %CFLAGS% -gnatn -aI../windows -aI../../.. -aI../.. -aI../../ghdldrv -aI../../grt -aI../../../ortho/mcode ghdl_mcode -o ghdl.exe -largs grt-cbinding.o clock.o grt-cvpi.o memsegs_c.o win32.o -largs -Wl,--stack,8404992
+gnatmake %CFLAGS% -gnatn -aI../windows -aI../../.. -aI../.. -aI../../ghdldrv -aI../../../psl -aI../../grt -aI../../../ortho/mcode ghdl_mcode -aI../../../ortho -o ghdl.exe -largs grt-cbinding.o clock.o grt-cvpi.o memsegs_c.o win32.o -largs -Wl,--stack,8404992
if errorlevel 1 goto failed
@@ -21,4 +21,4 @@ exit /b 0
echo "Compilation failed"
cd ..
exit /b 1
- \ No newline at end of file
+
diff --git a/translate/mcode/windows/ghdl.nsi b/translate/mcode/windows/ghdl.nsi
index 528a7df..aa4d559 100644
--- a/translate/mcode/windows/ghdl.nsi
+++ b/translate/mcode/windows/ghdl.nsi
@@ -149,7 +149,7 @@ SectionEnd
Section "Documentation (Recommended)"
SetOutPath $INSTDIR
- File ghdl.htm
+ File /oname=ghdl.htm ..\..\..\doc\ghdl.html
SectionEnd
Section "Add in PATH (Recommended)"
diff --git a/translate/mcode/windows/ortho_code-sysdeps.adb b/translate/mcode/windows/ortho_code-sysdeps.adb
deleted file mode 100644
index dbff7b6..0000000
--- a/translate/mcode/windows/ortho_code-sysdeps.adb
+++ /dev/null
@@ -1,8 +0,0 @@
-with Ortho_Code.X86.Flags;
-
-package body Ortho_Code.Sysdeps is
- procedure Init is
- begin
- Ortho_Code.X86.Flags.Flag_Alloca_Call := True;
- end Init;
-end Ortho_Code.Sysdeps;
diff --git a/translate/mcode/windows/ortho_code-x86-flags.ads b/translate/mcode/windows/ortho_code-x86-flags.ads
new file mode 100644
index 0000000..8915f31
--- /dev/null
+++ b/translate/mcode/windows/ortho_code-x86-flags.ads
@@ -0,0 +1,2 @@
+with Ortho_Code.X86.Flags_Windows;
+package Ortho_Code.X86.Flags renames Ortho_Code.X86.Flags_Windows;