[source]

Interface pins_if

WidthPullStrengthpinslogic[Width-1:0]

Block Diagram of pins_if

Parameters

Name

Default value

Description

Width

1

PullStrength

"Pull"

Ports

Name

Type

Direction

Description

pins

wire logic [Width - 1 : 0]

inout

Signals

Name

Type

Description

pins_o

logic[Width-1:0]

value to be driven out

pins_oe

bit[Width-1:0]

output enable

pins_pd

bit[Width-1:0]

pull down enable

pins_pu

bit[Width-1:0]

pull up enable

Assertions

Name

Kind

Description

pins_if.PullStrengthParamValid

immediate assert

(PullStrength inside {"Weak", "Pull"})

Functions

drive_en_pin(int idx = 0, bit val)

function to set pin output enable for specific pin (useful for single pin interface)

Parameters:
  • idx (int)

  • val (bit)

drive_en(bit[Width-1:0] val)

function to set pin output enable for all pins

Parameters:

val (bit[Width-1:0])

drive_pin(int idx = 0, logic val)

function to drive a specific pin with a value (useful for single pin interface)

Parameters:
  • idx (int)

  • val (logic)

drive(logic[Width-1:0] val)

function to drive all pins

Parameters:

val (logic[Width-1:0])

set_pulldown_en(bit[Width-1:0] val)

function to drive all pull down values

Parameters:

val (bit[Width-1:0])

set_pullup_en(bit[Width-1:0] val)

function to drive all pull up values

Parameters:

val (bit[Width-1:0])

set_pulldown_en_pin(int idx = 0, bit val)

function to drive the pull down value on a specific pin

Parameters:
  • idx (int)

  • val (bit)

set_pullup_en_pin(int idx = 0, bit val)

function to drive the pull up value on a specific pin

Parameters:
  • idx (int)

  • val (bit)

sample_pin(int idx = 0)

function to sample a specific pin (useful for single pin interface)

Parameters:

idx (int)

sample()

function to sample all pins

disconnect()

Fully disconnect this interface, including the pulls.