Chapter 6

Subroutines and interfaces

Abstract

Verilog has two types of subroutines, tasks and functions. Each has its limitations and advantages, which will be discussed in this chapter. The most fundamental difference between tasks and functions is that functions cannot contain any type of delay, whereas tasks do not share this restriction.

Keywords

task

function

reference

interface

modport

include

import

Verilog has two types of subroutines, tasks and functions. Each has its limitations and advantages, which will be discussed in this chapter. The most fundamental difference ...

Get Digital Integrated Circuit Design Using Verilog and Systemverilog now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.