Your Ad Here

Friday, August 5, 2011

Protocol Checkers for DUT state machine

In order to write a Protocol Checker for the DUT state machine we need to do the following
1. Declare an enumerated type having the same propreties as of the DUT enumerated type.
2. Declare an e-port may be of simple port of inout type
3. Declare an e-event for the corresponding DUT state machine value.
4. on the emission of the event check the required condition . If it satisfied continue else come out with DUT ERROR.

Ex :
type state_t : [ IDLE, SHIFT, SAMPLE];

unit monitor_u {
state_sig_port : inout simple_port of uint is instance;
keep bind ( state_sig_port, external );
keep state_sig_port.hdl_path() == "/top/state_s";

event state_sig_port_shift_e is true ( state_sig_port.as_a(state_t) == SHIFT) @clk_rise;
event en_sig_e is rise (en_sig$) @clk_rise;
expect @state_sig_port_shift_e =>{ @en_sig_e } @clk_rise else dut_error ("......");

No comments:

Post a Comment