From 120f62fe854d3387e6bac702b8097e5c172c94a7 Mon Sep 17 00:00:00 2001 From: Todd Strader Date: Tue, 18 Feb 2020 18:19:55 -0500 Subject: [PATCH] Fix is probably to mark as a clock --- src/V3ProtectLib.cpp | 3 ++- test_regress/t/t_prot_lib_secret.v | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/V3ProtectLib.cpp b/src/V3ProtectLib.cpp index b44edf500..6e64d7563 100644 --- a/src/V3ProtectLib.cpp +++ b/src/V3ProtectLib.cpp @@ -353,7 +353,8 @@ class ProtectVisitor : public AstNVisitor { nodep->v3error("Unsupported: unpacked arrays with protect-lib on "<prettyNameQ()); } if (nodep->direction() == VDirection::INPUT) { - if (nodep->isUsedClock()) { + if (nodep->isUsedClock() + || nodep->attrClocker() == VVarAttrClocker::CLOCKER_YES) { handleClock(nodep); } else { handleDataInput(nodep); diff --git a/test_regress/t/t_prot_lib_secret.v b/test_regress/t/t_prot_lib_secret.v index 534aca6a1..05ca43e1b 100644 --- a/test_regress/t/t_prot_lib_secret.v +++ b/test_regress/t/t_prot_lib_secret.v @@ -25,7 +25,7 @@ module secret #(parameter GATED_CLK = 0) input [3:0] [31:0] s4x32_in, output logic [3:0] [31:0] s4x32_out, input clk_en, - input clk); + input clk /*verilator clocker*/); logic [31:0] secret_accum_q = 0; logic [31:0] secret_value = 7;