vera non-blocking error

Status
Not open for further replies.

viv_1005

Junior Member level 3
Joined
Feb 3, 2005
Messages
29
Helped
2
Reputation
4
Reaction score
0
Trophy points
1,281
Activity points
232
Hello!
I have written following code.

task buffer_data(var reg [3:0] data_out) {
reg [7:0] data_buf;

fork {

while(1) {
@(posedge my_port.$clk_one);
data_buf <= my_port.$data_in;
}

while(1) {
@(posedge my_port.$clk_two);
data_out <= data_buf[7:4];
@(posedge my_port.$clk_two);
data_out <= data_buf[3:0];
}
join none
}

I am getting an error at all the lines where non-blocking assignment is used. If I use blocking assignment, then there is no problem. The error is

Illegal lvalue for drive operation.

What can be the reason. Where am I going wrong?

Thanks in advance

- Viv
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…