Connections in TOP module based upon randomized value

Status
Not open for further replies.

SSINGHAL

Newbie level 3
Joined
Dec 16, 2011
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,304
Hi,

I need to make some connections based upon randomixed value of a variable.

I am using OVM environment.

1) Can i do this in TOP module ???

2) How can i do this as the variable will take its randomized value in class and i can not use class data in declarative context.??

Can anyone help me out in this ???

Regards,
SSINGHAL
 

Can you explain what the choices you want to randomize are? i.e. give an example of one connection that is not random, then show what you want the alternative to be.
 

In my top module , i have say

Curent implementation:-

module_tx inst_1 (.a (b));

module_rx inst_1 (.c (b));

assign rx_signal_1 = tx_signal_1;
assign rx_signal_1 = b ;

What i want is... say i have a variable "temp" which can produces 4 values on randomization :- 1,2,3,4

So, when temp =1 , i want only this connection :- assign rx_signal_1 = tx_signal_1;

when temp =2 , i want only this connection :- module_rx inst_1 (.c (b)); & module_tx inst_1 (.a (b));

when temp=3 , i want only this connection :- assign rx_signal_1 = b; & module_tx inst_1 (.a (b));

Regards,
Saurabh
 

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