Abstract
This chapter gives an intuitive introduction to SystemVerilog Assertion local variables based on examples. Local variables are a powerful feature of SVA that enable an assertion to capture the value of an expression at a specified point in its evaluation and store that value for later reference or modification. While local variables do not increase the theoretical expressive power of SVA, they do make the encoding of many assertions much easier, and they help to avoid the need to create auxiliary state machines to support assertions.
Local color has a fatal tendency to remain local; but it is also true that the universal often borders on the void. — DuBose Heyward and Hervey Allen
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
The use of $sampled specifies that sampled values of start and dataIn are used in the always procedure, maintaining consistency with the implicit use of sampled values in a_seq_data_check. See the detailed discussion in Sect. 9.1.1.
- 2.
- 3.
A formal tool may also accept procedural concurrent assertions or final assertions.
- 4.
The initialization could be skipped because the valid members are of data of type bit, which is initialized by default to 1’b0. The explicit initialization clarifies the intention. The initial values of the activeTag members are not important. Note also that only the first MAX_ACTIVE entries of the array need be initialized.
Author information
Authors and Affiliations
Rights and permissions
Copyright information
© 2015 Springer International Publishing Switzerland
About this chapter
Cite this chapter
Cerny, E., Dudani, S., Havlicek, J., Korchemny, D. (2015). An Apology for Local Variables. In: SVA: The Power of Assertions in SystemVerilog. Springer, Cham. https://doi.org/10.1007/978-3-319-07139-8_15
Download citation
DOI: https://doi.org/10.1007/978-3-319-07139-8_15
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-07138-1
Online ISBN: 978-3-319-07139-8
eBook Packages: EngineeringEngineering (R0)