Abstraction level suggestions?


consider a DUT where it takes in an image, process, and send out an image. the interface for that DUT has frame/frame_rdy/pixel_xmt_rdy/pixel_rcv_rdy/pixel_data. The function model for DUT is written in C so some DPI is involved to generate expected output. The C model only takes full picture as input/generates full picture as output.

I’m thinking about making object representing a pixel as the base sequence_item, and use a sequence to represent a picture. Therefore, the interface agent won’t need to know much other than driving one pixel. In this scenario, what’s considered best practice for me to pass a picture to DPI for processing? My understanding is that if I use a subscriber and collect the transaction on the input interface, I’ll get pixels instead of pictures, and I would like to get a picture and get expected results before actual RTL transaction happen.

Another way is to write 2 different drivers(one takes pixel, the other takes picture) and use factory to overload. The monitor would still only capture pixel. In this case, I can send the picture object to another component which deals with DPI, and generate a sequence of pixel object for output checking. In this scenario, is it considered good practice for driver/monitor in the same agent take/generate different types of sequence_item?

Any suggestion is appreciated

In reply to soloist_huaxin:

Your driver and monitor should utilize the same sequence_item as their base transaction. You should develop a scoreboard that takes the individual sequence_items from the monitor (pixels in this case), builds the picture required for the functional model, then passes the picture to the functional model via the DPI and compares the results.