Require -gxtypes to use the Icarus extension for wire data types.

e.g. wire bool [1:0]; wire real;

Currently xtypes is enabled by default, so most users won't see a
difference.
This commit is contained in:
Martin Whitaker 2024-01-28 15:48:38 +00:00
parent 56f457d65e
commit a8144fd249
1 changed files with 7 additions and 1 deletions

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1998-2022 Stephen Williams (steve@icarus.com)
* Copyright (c) 1998-2024 Stephen Williams (steve@icarus.com)
* Copyright CERN 2013 / Stephen Williams (steve@icarus.com)
*
* This source code is free software; you can redistribute it
@ -3368,6 +3368,12 @@ void pform_check_net_data_type(const struct vlltype&loc, NetNet::Type net_type,
if (vec_type && vec_type->implicit_flag)
return;
if (!gn_cadence_types_flag)
VLerror(loc, "Net data type requires SystemVerilog or -gxtypes.");
if (vec_type)
return;
const real_type_t*rtype = dynamic_cast<const real_type_t*>(data_type);
if (rtype && rtype->type_code() == real_type_t::REAL)
return;