this post was submitted on 24 May 2025
4 points (83.3% liked)
FPGA
245 readers
1 users here now
A community for programmable hardware, including topics such as: * FPGA * CPLD * Verilog * VHDL
Related communities:
- c/ece
- c/embedded
- c/askelectronics
- c/fpga
- c/chipdesign
- c/microcontrollers
- c/dsp
- c/rtlsdr
- c/cprogramming
- c/raspberry_pi
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Thanks for your reply, that certainly a method I will try using.
But in the case of my problem I think it won't work. Since adc_data is in the consequent of the implication, it will again be sampled in the prepone region and so take on the value before adc_data_en was asserted high, don't you think?
In my code I set adc_data to its new value and at the same time set adc_data_en high. Perhaps I'm not supposed to do things this way? Is the usual practice to set something like adc_data to it's new value some time before the enable is asserted?
Both antecedent and consequent are sampled at preponed region. So assertion will not trigger at the edge where adc_data_en rises. This is the intention, since the value of adc_data or adc_data_en do not matter at the edge where adc_data_en rises, but they do matter in the following edge where the D for the flops calculated based on adc_data and adc_data_en are registered. All these are assuming adc_data_en and adc_data are synchronous to the clock. Edit: Adding to this, if you want adc_data_en to be evaluated in observed region, you can do something like this: property(@(posedge clk) disable iff (!adc_data_en) adc_data==true_data); However I would not recommend this. One reason is that, at the cycle where adc_data_en falls this checker will not fire, but it probably should. Second reason is that, at the edge where adc_data_en rises, this assertion may work in RTL sim with no timing delays or hold/setup time, but it will fail in a realistic gatevlevel simulation. As a rule of thumb synchronous signals should be used inside property where they are evaluated in preponed region.