summaryrefslogtreecommitdiff
path: root/translate/ghdldrv/ghdlsimul.adb
diff options
context:
space:
mode:
authorgingold2012-12-11 02:38:52 +0000
committergingold2012-12-11 02:38:52 +0000
commita47d1d61881e53c05ad9acf375f8b929da5c20e7 (patch)
treefd1d341f791b3587132aae9f27801fea403edf0a /translate/ghdldrv/ghdlsimul.adb
parent92d0ab4e50abbf6048d6e70e2e34a93bae2b5f9e (diff)
downloadghdl-a47d1d61881e53c05ad9acf375f8b929da5c20e7.tar.gz
ghdl-a47d1d61881e53c05ad9acf375f8b929da5c20e7.tar.bz2
ghdl-a47d1d61881e53c05ad9acf375f8b929da5c20e7.zip
Create grtlink to share references to grt.
Diffstat (limited to 'translate/ghdldrv/ghdlsimul.adb')
-rw-r--r--translate/ghdldrv/ghdlsimul.adb23
1 files changed, 20 insertions, 3 deletions
diff --git a/translate/ghdldrv/ghdlsimul.adb b/translate/ghdldrv/ghdlsimul.adb
index abeb7bb..6dffefe 100644
--- a/translate/ghdldrv/ghdlsimul.adb
+++ b/translate/ghdldrv/ghdlsimul.adb
@@ -15,6 +15,9 @@
-- along with GCC; see the file COPYING. If not, write to the Free
-- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
-- 02111-1307, USA.
+
+with Ada.Text_IO;
+
with Ghdllocal; use Ghdllocal;
with GNAT.OS_Lib; use GNAT.OS_Lib;
@@ -35,6 +38,10 @@ with Simulation;
with Ghdlcomp;
+with Grt.Vpi;
+pragma Unreferenced (Grt.Vpi);
+with Grtlink;
+
package body Ghdlsimul is
Flag_Expect_Failure : Boolean := False;
@@ -111,21 +118,31 @@ package body Ghdlsimul is
Sec_Id := Get_Identifier (Sec_Name.all);
end if;
Top_Conf := Configuration.Configure (First_Id, Sec_Id);
+ if Top_Conf = Null_Iir then
+ raise Compilation_Error;
+ end if;
+
+ Grtlink.Flag_String := Flags.Flag_String;
Simulation.Simulation_Entity (Top_Conf);
end Run;
function Decode_Option (Option : String) return Boolean
is
- pragma Unreferenced (Option);
begin
- return False;
+ if Option = "--debug" then
+ Simulation.Flag_Debugger := True;
+ else
+ return False;
+ end if;
+ return True;
end Decode_Option;
procedure Disp_Long_Help
is
+ use Ada.Text_IO;
begin
- null;
+ Put_Line (" --debug Run with debugger");
end Disp_Long_Help;