Fix compile error on structs with queues (and ignore toggle coverage on queues).
This commit is contained in:
parent
efff630763
commit
13b7cce8be
1
Changes
1
Changes
|
|
@ -45,6 +45,7 @@ Verilator 5.021 devel
|
||||||
* Fix tracing chandles (#4860). [Nathan Graybeal]
|
* Fix tracing chandles (#4860). [Nathan Graybeal]
|
||||||
* Fix $fwrite of null (#4862). [Jose Tejada]
|
* Fix $fwrite of null (#4862). [Jose Tejada]
|
||||||
* Fix GCC tautological-compare warnings.
|
* Fix GCC tautological-compare warnings.
|
||||||
|
* Fix compile error on structs with queues (and ignore toggle coverage on queues).
|
||||||
|
|
||||||
|
|
||||||
Verilator 5.020 2024-01-01
|
Verilator 5.020 2024-01-01
|
||||||
|
|
|
||||||
|
|
@ -395,6 +395,8 @@ class CoverageVisitor final : public VNVisitor {
|
||||||
newent.cleanup();
|
newent.cleanup();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else if (VN_IS(dtypep, QueueDType)) {
|
||||||
|
// Not covered
|
||||||
} else {
|
} else {
|
||||||
dtypep->v3fatalSrc("Unexpected node data type in toggle coverage generation: "
|
dtypep->v3fatalSrc("Unexpected node data type in toggle coverage generation: "
|
||||||
<< dtypep->prettyTypeName());
|
<< dtypep->prettyTypeName());
|
||||||
|
|
|
||||||
|
|
@ -70,10 +70,12 @@ public:
|
||||||
return v3Global.opt.modPrefix() + "_" + VIdProtect::protect(nodep->name());
|
return v3Global.opt.modPrefix() + "_" + VIdProtect::protect(nodep->name());
|
||||||
}
|
}
|
||||||
static bool isAnonOk(const AstVar* varp) {
|
static bool isAnonOk(const AstVar* varp) {
|
||||||
|
AstNodeDType* const dtp = varp->dtypep()->skipRefp();
|
||||||
return v3Global.opt.compLimitMembers() != 0 // Enabled
|
return v3Global.opt.compLimitMembers() != 0 // Enabled
|
||||||
&& !varp->isStatic() // Not a static variable
|
&& !varp->isStatic() // Not a static variable
|
||||||
&& !varp->isSc() // Aggregates can't be anon
|
&& !varp->isSc() // Aggregates can't be anon
|
||||||
&& !VN_IS(varp->dtypep()->skipRefp(), SampleQueueDType) // Aggregates can't be anon
|
&& !VN_IS(dtp, SampleQueueDType) // Aggregates can't be anon
|
||||||
|
&& !(VN_IS(dtp, NodeUOrStructDType) && !VN_CAST(dtp, NodeUOrStructDType)->packed())
|
||||||
&& (varp->basicp() && !varp->basicp()->isOpaque()); // Aggregates can't be anon
|
&& (varp->basicp() && !varp->basicp()->isOpaque()); // Aggregates can't be anon
|
||||||
}
|
}
|
||||||
static bool isConstPoolMod(const AstNode* modp) {
|
static bool isConstPoolMod(const AstNode* modp) {
|
||||||
|
|
|
||||||
|
|
@ -40,6 +40,11 @@
|
||||||
%000000 wire [7:0] cyc_copy = cyc[7:0];
|
%000000 wire [7:0] cyc_copy = cyc[7:0];
|
||||||
%000002 wire toggle_up;
|
%000002 wire toggle_up;
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
int q[$];
|
||||||
|
} str_queue_t;
|
||||||
|
str_queue_t str_queue;
|
||||||
|
|
||||||
alpha a1 (/*AUTOINST*/
|
alpha a1 (/*AUTOINST*/
|
||||||
// Outputs
|
// Outputs
|
||||||
.toggle_up (toggle_up),
|
.toggle_up (toggle_up),
|
||||||
|
|
@ -80,9 +85,11 @@
|
||||||
utoggle.val1 <= real'(cyc[7:0]);
|
utoggle.val1 <= real'(cyc[7:0]);
|
||||||
ptoggle[0][0] <= toggle;
|
ptoggle[0][0] <= toggle;
|
||||||
if (cyc == 3) begin
|
if (cyc == 3) begin
|
||||||
|
str_queue.q.push_back(1);
|
||||||
toggle <= '1;
|
toggle <= '1;
|
||||||
end
|
end
|
||||||
if (cyc == 4) begin
|
if (cyc == 4) begin
|
||||||
|
if (str_queue.q.size() != 1) $stop;
|
||||||
toggle <= '0;
|
toggle <= '0;
|
||||||
end
|
end
|
||||||
else if (cyc == 10) begin
|
else if (cyc == 10) begin
|
||||||
|
|
|
||||||
|
|
@ -39,6 +39,11 @@ module t (/*AUTOARG*/
|
||||||
wire [7:0] cyc_copy = cyc[7:0];
|
wire [7:0] cyc_copy = cyc[7:0];
|
||||||
wire toggle_up;
|
wire toggle_up;
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
int q[$];
|
||||||
|
} str_queue_t;
|
||||||
|
str_queue_t str_queue;
|
||||||
|
|
||||||
alpha a1 (/*AUTOINST*/
|
alpha a1 (/*AUTOINST*/
|
||||||
// Outputs
|
// Outputs
|
||||||
.toggle_up (toggle_up),
|
.toggle_up (toggle_up),
|
||||||
|
|
@ -79,9 +84,11 @@ module t (/*AUTOARG*/
|
||||||
utoggle.val1 <= real'(cyc[7:0]);
|
utoggle.val1 <= real'(cyc[7:0]);
|
||||||
ptoggle[0][0] <= toggle;
|
ptoggle[0][0] <= toggle;
|
||||||
if (cyc == 3) begin
|
if (cyc == 3) begin
|
||||||
|
str_queue.q.push_back(1);
|
||||||
toggle <= '1;
|
toggle <= '1;
|
||||||
end
|
end
|
||||||
if (cyc == 4) begin
|
if (cyc == 4) begin
|
||||||
|
if (str_queue.q.size() != 1) $stop;
|
||||||
toggle <= '0;
|
toggle <= '0;
|
||||||
end
|
end
|
||||||
else if (cyc == 10) begin
|
else if (cyc == 10) begin
|
||||||
|
|
|
||||||
|
|
@ -60,6 +60,11 @@
|
||||||
%000002 wire toggle_up;
|
%000002 wire toggle_up;
|
||||||
-000002 point: comment=toggle_up
|
-000002 point: comment=toggle_up
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
int q[$];
|
||||||
|
} str_queue_t;
|
||||||
|
str_queue_t str_queue;
|
||||||
|
|
||||||
alpha a1 (/*AUTOINST*/
|
alpha a1 (/*AUTOINST*/
|
||||||
// Outputs
|
// Outputs
|
||||||
.toggle_up (toggle_up),
|
.toggle_up (toggle_up),
|
||||||
|
|
@ -124,9 +129,11 @@
|
||||||
utoggle.val1 <= real'(cyc[7:0]);
|
utoggle.val1 <= real'(cyc[7:0]);
|
||||||
ptoggle[0][0] <= toggle;
|
ptoggle[0][0] <= toggle;
|
||||||
if (cyc == 3) begin
|
if (cyc == 3) begin
|
||||||
|
str_queue.q.push_back(1);
|
||||||
toggle <= '1;
|
toggle <= '1;
|
||||||
end
|
end
|
||||||
if (cyc == 4) begin
|
if (cyc == 4) begin
|
||||||
|
if (str_queue.q.size() != 1) $stop;
|
||||||
toggle <= '0;
|
toggle <= '0;
|
||||||
end
|
end
|
||||||
else if (cyc == 10) begin
|
else if (cyc == 10) begin
|
||||||
|
|
|
||||||
|
|
@ -52,7 +52,9 @@ module testMod
|
||||||
(input wire [2:0] data_i);
|
(input wire [2:0] data_i);
|
||||||
|
|
||||||
typedef logic [63:0] time_t;
|
typedef logic [63:0] time_t;
|
||||||
|
// verilator lint_off MULTIDRIVEN
|
||||||
time_t [2:0] last_transition;
|
time_t [2:0] last_transition;
|
||||||
|
// verilator lint_on MULTIDRIVEN
|
||||||
genvar b;
|
genvar b;
|
||||||
|
|
||||||
generate
|
generate
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue