2012-04-13 03:08:20 +02:00
|
|
|
// -*- mode: C++; c-file-style: "cc-mode" -*-
|
2006-08-26 13:35:28 +02:00
|
|
|
//*************************************************************************
|
|
|
|
|
// DESCRIPTION: Verilator: Configure source; system configuration
|
|
|
|
|
//
|
2008-06-10 03:25:10 +02:00
|
|
|
// This file is part of Verilator.
|
2006-08-26 13:35:28 +02:00
|
|
|
//
|
2019-11-08 04:33:59 +01:00
|
|
|
// Code available from: https://verilator.org
|
2006-08-26 13:35:28 +02:00
|
|
|
//
|
|
|
|
|
//*************************************************************************
|
|
|
|
|
//
|
2023-01-01 16:18:39 +01:00
|
|
|
// Copyright 2003-2023 by Wilson Snyder. This program is free software; you
|
2020-03-21 16:24:24 +01:00
|
|
|
// can redistribute it and/or modify it under the terms of either the GNU
|
2009-05-04 23:07:57 +02:00
|
|
|
// Lesser General Public License Version 3 or the Perl Artistic License
|
|
|
|
|
// Version 2.0.
|
2020-03-21 16:24:24 +01:00
|
|
|
// SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
2008-06-10 03:25:10 +02:00
|
|
|
//
|
2006-08-26 13:35:28 +02:00
|
|
|
//*************************************************************************
|
2019-10-05 02:17:11 +02:00
|
|
|
|
2006-08-26 13:35:28 +02:00
|
|
|
//**********************************************************************
|
|
|
|
|
//**** Version and host name
|
|
|
|
|
|
2023-07-27 11:42:35 +02:00
|
|
|
#include "config_package.h"
|
2006-08-26 13:35:28 +02:00
|
|
|
|
|
|
|
|
//**********************************************************************
|
|
|
|
|
//**** Functions
|
2010-12-18 01:40:08 +01:00
|
|
|
|
2006-08-26 13:35:28 +02:00
|
|
|
//**********************************************************************
|
|
|
|
|
//**** Headers
|
2010-12-18 01:40:08 +01:00
|
|
|
|
2008-03-18 21:26:37 +01:00
|
|
|
//**********************************************************************
|
|
|
|
|
//**** Default environment
|
|
|
|
|
|
|
|
|
|
// Set defines to defaults for environment variables
|
|
|
|
|
// If set to "", this default is ignored and the user is expected
|
|
|
|
|
// to set them at Verilator runtime.
|
|
|
|
|
|
2020-04-14 04:51:35 +02:00
|
|
|
// clang-format off
|
2008-03-18 21:26:37 +01:00
|
|
|
#ifndef DEFENV_SYSTEMC
|
|
|
|
|
# define DEFENV_SYSTEMC ""
|
|
|
|
|
#endif
|
|
|
|
|
#ifndef DEFENV_SYSTEMC_ARCH
|
|
|
|
|
# define DEFENV_SYSTEMC_ARCH ""
|
|
|
|
|
#endif
|
2012-01-20 02:30:41 +01:00
|
|
|
#ifndef DEFENV_SYSTEMC_INCLUDE
|
|
|
|
|
# define DEFENV_SYSTEMC_INCLUDE ""
|
|
|
|
|
#endif
|
|
|
|
|
#ifndef DEFENV_SYSTEMC_LIBDIR
|
|
|
|
|
# define DEFENV_SYSTEMC_LIBDIR ""
|
|
|
|
|
#endif
|
2008-03-18 21:26:37 +01:00
|
|
|
#ifndef DEFENV_VERILATOR_ROOT
|
|
|
|
|
# define DEFENV_VERILATOR_ROOT ""
|
|
|
|
|
#endif
|
2020-04-14 04:51:35 +02:00
|
|
|
// clang-format on
|
2008-03-18 21:26:37 +01:00
|
|
|
|
2006-08-26 13:35:28 +02:00
|
|
|
//**********************************************************************
|
|
|
|
|
//**** Compile options
|
|
|
|
|
|
2008-06-30 19:11:25 +02:00
|
|
|
#include <cstdio>
|
2023-07-27 11:44:05 +02:00
|
|
|
#include <cstdlib>
|
2008-10-15 16:49:05 +02:00
|
|
|
#include <cstring>
|
2018-02-02 03:24:41 +01:00
|
|
|
#include <iostream>
|
2023-07-27 11:44:05 +02:00
|
|
|
#include <string>
|
|
|
|
|
|
|
|
|
|
#include <sys/types.h>
|
2006-08-26 13:35:28 +02:00
|
|
|
|
2018-02-02 03:24:41 +01:00
|
|
|
// Avoid needing std:: prefixes on some very common items
|
2021-03-13 00:10:45 +01:00
|
|
|
using string = std::string;
|
2018-02-02 03:24:41 +01:00
|
|
|
using std::cout;
|
|
|
|
|
using std::endl;
|
2006-08-26 13:35:28 +02:00
|
|
|
|
|
|
|
|
//**********************************************************************
|
|
|
|
|
//**** OS and compiler specifics
|
|
|
|
|
|
|
|
|
|
#include "verilatedos.h"
|