Search code examples
specmane

Difference between declaring an event that is sensitive to a simple_port value and event_port


I want to know if there is any difference between the two:

1) simple_port

data_valid : simple_port of bit is instance;
keep data_valid.hdl_path() == "data_valid_o";

event data_valid_f is fall(data_valid$) @sim;

on data_valid_f {
    -- do some stuff
};

2) event_port

data_valid : event_port is instance;
keep data_valid.hdl_path() == "data_valid_o";
keep data_valid.edge() == fall;

on data_valid$ {
    -- do some stuff
};

Thanks in advance!


Solution

  • Put simply, the event_port will detect glitches, i.e. zero time signal changes within a simulation cycle. The value of the simple_port will be determined by the signal value at the end of the simulation cycle, no matter how many times it toggled before that.