Skip to content

Commit

Permalink
Remove SystemC warning
Browse files Browse the repository at this point in the history
- When we built the project, we had the issue:
`warning: ‘sc_core::sc_has_process_used’ is deprecated: SC_HAS_PROCESS(user_module_name) is obsolete in IEEE 1666-2023, define SC_ALLOW_DEPRECATED_IEEE_API to suppress. [-Wdeprecated-declarations]`
So we define SC_ALLOW_DEPRECATED_IEEE_API where SC_HAS_PROCESS is called

Signed-off-by: tmarcero <tmarcero@quicinc.com>
  • Loading branch information
tmarcero authored and tmarcero committed Sep 5, 2024
1 parent abc23ff commit f16a1a2
Show file tree
Hide file tree
Showing 92 changed files with 199 additions and 0 deletions.
12 changes: 12 additions & 0 deletions platforms/cortex-m55-remote/src/main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause
*/

#define SC_ALLOW_DEPRECATED_IEEE_API

/* M55 mini-vp */
#include <chrono>
#include <string>
Expand All @@ -18,6 +20,10 @@
#include <keep_alive/include/keep_alive.h>
#include <module_factory_container.h>

#if SC_VERSION_MAJOR < 3
#warning PLEASE UPDATE TO SYSTEMC 3.0, OLDER VERSIONS ARE DEPRECATED AND MAY NOT WORK
#endif

class GreenSocsPlatform : public gs::ModuleFactory::Container
{
protected:
Expand All @@ -42,6 +48,12 @@ class GreenSocsPlatform : public gs::ModuleFactory::Container

int sc_main(int argc, char* argv[])
{
if (sc_core::sc_version_major < 3) {
SCP_WARN()
("\n********************************\nWARNING, USING A DEPRECATED VERSION OF SYSTEMC, PLEASE "
"UPGRADE\n********************************");
}

gs::ConfigurableBroker m_broker{};
cci::cci_originator orig{ "sc_main" };
auto broker_h = m_broker.create_broker_handle(orig);
Expand Down
2 changes: 2 additions & 0 deletions platforms/cortex-m55-remote/src/remote_cpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
#ifndef __REMOTE_CORTEX_M55__
#define __REMOTE_CORTEX_M55__

#define SC_ALLOW_DEPRECATED_IEEE_API

#include <systemc>
#include <tlm>
#include <cci_configuration>
Expand Down
12 changes: 12 additions & 0 deletions platforms/src/main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
* SPDX-License-Identifier: BSD-3-Clause
*/

#define SC_ALLOW_DEPRECATED_IEEE_API

#include <chrono>
#include <string>

Expand All @@ -15,6 +17,10 @@
#include <argparser.h>
#include <module_factory_container.h>

#if SC_VERSION_MAJOR < 3
#warning PLEASE UPDATE TO SYSTEMC 3.0, OLDER VERSIONS ARE DEPRECATED AND MAY NOT WORK
#endif

class GreenSocsPlatform : public gs::ModuleFactory::Container
{
protected:
Expand All @@ -36,6 +42,12 @@ class GreenSocsPlatform : public gs::ModuleFactory::Container

int sc_main(int argc, char* argv[])
{
if (sc_core::sc_version_major < 3) {
SCP_WARN()
("\n********************************\nWARNING, USING A DEPRECATED VERSION OF SYSTEMC, PLEASE "
"UPGRADE\n********************************");
}

scp::init_logging(scp::LogConfig()
.fileInfoFrom(sc_core::SC_ERROR)
.logAsync(false)
Expand Down
2 changes: 2 additions & 0 deletions qemu-components/arm_smmu/include/arm-smmu.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
#ifndef _LIBQBOX_COMPONENTS_MMU_ARM_SMMU_H
#define _LIBQBOX_COMPONENTS_MMU_ARM_SMMU_H

#define SC_ALLOW_DEPRECATED_IEEE_API

#include <string>
#include <cassert>

Expand Down
2 changes: 2 additions & 0 deletions qemu-components/common/include/ports/initiator.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
#ifndef _LIBQBOX_PORTS_INITIATOR_H
#define _LIBQBOX_PORTS_INITIATOR_H

#define SC_ALLOW_DEPRECATED_IEEE_API

#include <functional>
#include <limits>
#include <cassert>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

#pragma once

#define SC_ALLOW_DEPRECATED_IEEE_API

#include <string>

#include <cci_configuration>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

#include <string>

#define SC_ALLOW_DEPRECATED_IEEE_API
#include <cci_configuration>

#include <libqemu-cxx/target/aarch64.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

#pragma once

#define SC_ALLOW_DEPRECATED_IEEE_API

#include <string>

#include <cci_configuration>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

#pragma once

#define SC_ALLOW_DEPRECATED_IEEE_API

#include <string>

#include <cci_configuration>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include <string>

#include <libqemu-cxx/target/aarch64.h>
#define SC_ALLOW_DEPRECATED_IEEE_API
#include <module_factory_registery.h>

#include <irq-ctrl/armv7m_nvic/include/armv7m-nvic.h>
Expand Down
2 changes: 2 additions & 0 deletions qemu-components/cpu_arm/cpu_arm_cortex_m7/include/cortex-m7.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

#pragma once

#define SC_ALLOW_DEPRECATED_IEEE_API

#include <string>

#include <libqemu-cxx/target/aarch64.h>
Expand Down
2 changes: 2 additions & 0 deletions qemu-components/cpu_arm/cpu_arm_cortex_r5/include/cortex-r5.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

#pragma once

#define SC_ALLOW_DEPRECATED_IEEE_API

#include <string>

#include <cci_configuration>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

#pragma once

#define SC_ALLOW_DEPRECATED_IEEE_API

#include <string>

#include <cci_configuration>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

#pragma once

#define SC_ALLOW_DEPRECATED_IEEE_API

#include <string>

#include <cci_configuration>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

#pragma once

#define SC_ALLOW_DEPRECATED_IEEE_API

#include <string>

#include <cci_configuration>
Expand Down
2 changes: 2 additions & 0 deletions qemu-components/display/include/display.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
#ifndef _LIBQBOX_COMPONENTS_DISPLAY_H
#define _LIBQBOX_COMPONENTS_DISPLAY_H

#define SC_ALLOW_DEPRECATED_IEEE_API

#include <systemc>
#include <scp/report.h>

Expand Down
2 changes: 2 additions & 0 deletions qemu-components/irq-ctrl/arm_gicv2/include/arm-gicv2.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
#ifndef _LIBQBOX_COMPONENTS_IRQ_CTRL_ARM_GICV2_H
#define _LIBQBOX_COMPONENTS_IRQ_CTRL_ARM_GICV2_H

#define SC_ALLOW_DEPRECATED_IEEE_API

#include <systemc>
#include <cci_configuration>

Expand Down
2 changes: 2 additions & 0 deletions qemu-components/irq-ctrl/arm_gicv3/include/arm_gicv3.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
#ifndef _LIBQBOX_COMPONENTS_IRQ_CTRL_ARM_GICV3_H
#define _LIBQBOX_COMPONENTS_IRQ_CTRL_ARM_GICV3_H

#define SC_ALLOW_DEPRECATED_IEEE_API

#include <sstream>

#include <systemc>
Expand Down
2 changes: 2 additions & 0 deletions qemu-components/irq-ctrl/armv7m_nvic/include/armv7m-nvic.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

#pragma once

#define SC_ALLOW_DEPRECATED_IEEE_API

#include <cci_configuration>
#include <libqemu-cxx/target/aarch64.h>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
#ifndef _LIBQBOX_COMPONENTS_IRQ_CTRL_HEXAGON_L2VIC_H
#define _LIBQBOX_COMPONENTS_IRQ_CTRL_HEXAGON_L2VIC_H

#define SC_ALLOW_DEPRECATED_IEEE_API

#include <string>
#include <cassert>

Expand Down
2 changes: 2 additions & 0 deletions qemu-components/irq-ctrl/plic_sifive/include/plic-sifive.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
#ifndef _LIBQBOX_COMPONENTS_IRQ_CTRL_PLIC_SIFIVE_H
#define _LIBQBOX_COMPONENTS_IRQ_CTRL_PLIC_SIFIVE_H

#define SC_ALLOW_DEPRECATED_IEEE_API

#include <string>
#include <cassert>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

#pragma once

#define SC_ALLOW_DEPRECATED_IEEE_API

#include <vector>

#include <cci_configuration>
Expand Down
1 change: 1 addition & 0 deletions qemu-components/nvme/include/nvme.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#ifndef _LIBQBOX_COMPONENTS_PCI_NVME_H
#define _LIBQBOX_COMPONENTS_PCI_NVME_H

#define SC_ALLOW_DEPRECATED_IEEE_API
#include <cci_configuration>

#include <module_factory_registery.h>
Expand Down
2 changes: 2 additions & 0 deletions qemu-components/pci/qemu_gpex/include/qemu_gpex.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
#ifndef _LIBQBOX_COMPONENTS_PCI_GPEX_H
#define _LIBQBOX_COMPONENTS_PCI_GPEX_H

#define SC_ALLOW_DEPRECATED_IEEE_API

#include <cci_configuration>

#include <libgssync.h>
Expand Down
2 changes: 2 additions & 0 deletions qemu-components/pci/qemu_xhci/include/qemu_xhci.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
#ifndef _LIBQBOX_COMPONENTS_USB_XHCI_H
#define _LIBQBOX_COMPONENTS_USB_XHCI_H

#define SC_ALLOW_DEPRECATED_IEEE_API

#include <module_factory_registery.h>

#include <qemu_gpex.h>
Expand Down
2 changes: 2 additions & 0 deletions qemu-components/pci/rtl8139_pci/include/rtl8139_pci.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
#ifndef _LIBQBOX_COMPONENTS_RTL8139_PCI_H
#define _LIBQBOX_COMPONENTS_RTL8139_PCI_H

#define SC_ALLOW_DEPRECATED_IEEE_API

#include <cci_configuration>

#include <libgssync.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

#pragma once

#define SC_ALLOW_DEPRECATED_IEEE_API

#include <cci_configuration>

#include <libgssync.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

#pragma once

#define SC_ALLOW_DEPRECATED_IEEE_API

#include <cci_configuration>

#include <libgssync.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
#ifndef _LIBQBOX_COMPONENTS_TIMER_HEXAGON_QTIMER_H
#define _LIBQBOX_COMPONENTS_TIMER_HEXAGON_QTIMER_H

#define SC_ALLOW_DEPRECATED_IEEE_API

#include <string>
#include <cassert>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

#pragma once

#define SC_ALLOW_DEPRECATED_IEEE_API

#include <vector>

#include <cci_configuration>
Expand Down
2 changes: 2 additions & 0 deletions qemu-components/uart/16550/include/16550.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
#ifndef _LIBQBOX_COMPONENTS_UART_16550_H
#define _LIBQBOX_COMPONENTS_UART_16550_H

#define SC_ALLOW_DEPRECATED_IEEE_API

#include <cci_configuration>

#include <module_factory_registery.h>
Expand Down
2 changes: 2 additions & 0 deletions qemu-components/uart/qemu_pl011/include/qemu_pl011.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
#ifndef _LIBQBOX_COMPONENTS_UART_PL011_H
#define _LIBQBOX_COMPONENTS_UART_PL011_H

#define SC_ALLOW_DEPRECATED_IEEE_API

#include <cci_configuration>

#include <libgssync.h>
Expand Down
2 changes: 2 additions & 0 deletions qemu-components/uart/sifive_uart/include/sifive-uart.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
#ifndef _LIBQBOX_COMPONENTS_UART_SIFIVE_UART_H
#define _LIBQBOX_COMPONENTS_UART_SIFIVE_UART_H

#define SC_ALLOW_DEPRECATED_IEEE_API

#include <cci_configuration>

#include <libgssync.h>
Expand Down
2 changes: 2 additions & 0 deletions qemu-components/virtio_mmio_blk/include/virtio_mmio_blk.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

#pragma once

#define SC_ALLOW_DEPRECATED_IEEE_API

#include <vector>

#include <cci_configuration>
Expand Down
2 changes: 2 additions & 0 deletions qemu-components/virtio_mmio_gpugl/include/virtio_mmio_gpugl.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

#pragma once

#define SC_ALLOW_DEPRECATED_IEEE_API

#include <vector>

#include <cci_configuration>
Expand Down
2 changes: 2 additions & 0 deletions qemu-components/virtio_mmio_net/include/virtio_mmio_net.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

#pragma once

#define SC_ALLOW_DEPRECATED_IEEE_API

#include <vector>

#include <cci_configuration>
Expand Down
2 changes: 2 additions & 0 deletions qemu-components/virtio_mmio_sound/include/virtio_mmio_sound.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

#pragma once

#define SC_ALLOW_DEPRECATED_IEEE_API

#include <vector>

#include <cci_configuration>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@

#ifndef _GS_UART_BACKEND_FILE_H_
#define _GS_UART_BACKEND_FILE_H_

#define SC_ALLOW_DEPRECATED_IEEE_API

#include <systemc>
#include <tlm.h>
#include <tlm_utils/simple_target_socket.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
#ifndef _GS_UART_BACKEND_SOCKET_H_
#define _GS_UART_BACKEND_SOCKET_H_

#define SC_ALLOW_DEPRECATED_IEEE_API

#include <unistd.h>
#include <poll.h>
#include <errno.h>
Expand Down
Loading

0 comments on commit f16a1a2

Please sign in to comment.