Research work · 2022

User-Defined Functions

Slobodan Mijalković

Apress eBooks

Abstract

Besides the predefined math functions, described in the previous chapter, Verilog-A provides also a way to define our own functions. User-defined functions could be used to encapsulate self-contained segments of the code and avoid the replication of the same or very similar code sections. Moreover, testing can be carried out on each function in isolation, rather than on the whole module. This chapter describes the two main stages in using the user-defined functions, first how to define a function and second how to invoke it in the module procedural code.

DOI: 10.1007/978-1-4842-6351-8_11