Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] concurrent system verilog assertions

Status
Not open for further replies.

pramodh

Newbie level 3
Joined
Mar 10, 2011
Messages
4
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,315
Hi,
I am new into sva and have been trying out some examples on concurrent sva's.The code I have been trying out is for simple and gate.This code is working fine for immediate assertions but for concurrent assertions, it is giving errors. I have pasted both the code and error. Help me out. Thanks

module an();
reg clk;

class anbn;
rand logic a;
rand logic b;
logic c;
endclass

anbn a1;
initial
begin
a1=new();
end

always
#5 clk=~clk;

always @(posedge clk)
begin

for(int i=0;i<10;i++)
begin
a1.randomize();
a1.c=a1.a && a1.b;
$display("a=%b,b=%b",a1.a,a1.b);
$display("c=%b\n \n",a1.c);
end

#1000 $finish;
end

aa:assert property(@(posedge clk) $rose(a1.a && a1.b) |-> $rose(a1.c));
endmodule

The output is
Error-[ETTNATE] Expressions of this type not allowed in temporal expressions
Expressions of real, string and event types, as well as dynamic
SystemVerilog types, are not allowed in temporal expressions
Expression: a1.a
"practise.sv", 36: aa: assert property(@(posedge clk) ($rose((a1.a &&
a1.b)) |-> $rose(a1.c)));

Error-[ETTNATE] Expressions of this type not allowed in temporal expressions
Expressions of real, string and event types, as well as dynamic
SystemVerilog types, are not allowed in temporal expressions
Expression: a1.b
"practise.sv", 36: aa: assert property(@(posedge clk) ($rose((a1.a &&
a1.b)) |-> $rose(a1.c)));

Error-[ETTNATE] Expressions of this type not allowed in temporal expressions
Expressions of real, string and event types, as well as dynamic
SystemVerilog types, are not allowed in temporal expressions
Expression: a1.c
"practise.sv", 36: aa: assert property(@(posedge clk) ($rose((a1.a &&
a1.b)) |-> $rose(a1.c)));

3 errors
 

It worked with random variables. It is not working when we call variables through object like a1.a, a1.b, a1.c..Not getting the reason..
 

got the solution from
**broken link removed**
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top