[source]

Interface push_pull_if

HostDataWidthDeviceDataWidthclklogicrst_nlogic

Block Diagram of push_pull_if

Parameters

Name

Default value

Description

HostDataWidth

32

DeviceDataWidth

HostDataWidth

Ports

Name

Type

Direction

Description

clk

wire logic

input

rst_n

wire logic

input

Signals

Name

Type

Description

ready

wire

Pins for the push handshake (ready/valid)

valid

wire

req

wire

Pins for the pull handshake (req/ack)

ack

wire

h_data

wire[HostDataWidth-1:0]

Parameterized width data payloads in both directions of the handshake. Data sent from host to device

d_data

wire[DeviceDataWidth-1:0]

Data sent from device to host

ready_int

logic

Internal versions of the interface output signals. These signals are assigned as outputs depending on how the agent is configured.

valid_int

logic

req_int

logic

ack_int

logic

h_data_int

logic[HostDataWidth-1:0]

d_data_int

logic[DeviceDataWidth-1:0]

if_mode

dv_utils_pkg::if_mode_e

Interface mode

Host or Device

is_push_agent

bit

This bit controls what protocol assertions will be enabled, e.g. if the agent is configured in Push mode, we do not want to enable assertions relating to the Pull protocol.

This bit is set to the appropriate value in push_pull_agent::build_phase().

in_bidirectional_mode

bit

This bit controls whether the agent is in bidirectional mode, transferring data on both sides of the handshake.

is_pull_handshake_4_phase

bit

Indicates whether pull interface follows 2-phase (0) or 4-phase (1) handshake.

Assertions

Name

Kind

Description

push_pull_if.ReadyIsKnown_AKnownEnable

concurent assert

The ready and valid signals should always have known values.

disable iff((!rst_n)!=='0)! $isunknown(is_push_agent)

push_pull_if.ReadyIsKnown_A

concurent assert

disable iff((!rst_n)!=='0)(is_push_agent |-> ! $isunknown(ready))

push_pull_if.ValidIsKnown_AKnownEnable

concurent assert

disable iff((!rst_n)!=='0)! $isunknown(is_push_agent)

push_pull_if.ValidIsKnown_A

concurent assert

disable iff((!rst_n)!=='0)(is_push_agent |-> ! $isunknown(valid))

push_pull_if.H_DataKnownWhenValid_AKnownEnable

concurent assert

Whenever valid is asserted, h_data must have a known value.

disable iff((!rst_n)!=='0)! $isunknown((valid && is_push_agent))

push_pull_if.H_DataKnownWhenValid_A

concurent assert

disable iff((!rst_n)!=='0)((valid && is_push_agent) |-> ! $isunknown(h_data))

push_pull_if.D_DataKnownWhenReady_AKnownEnable

concurent assert

Whenver ready is asserted and the agent is in bidirectional mode, d_data must have a known value.

disable iff((!rst_n)!=='0)! $isunknown(((ready && is_push_agent) && in_bidirectional_mode))

push_pull_if.D_DataKnownWhenReady_A

concurent assert

disable iff((!rst_n)!=='0)(((ready && is_push_agent) && in_bidirectional_mode) |-> ! $isunknown(d_data))

push_pull_if.H_DataStableWhenValidAndNotReady_A

concurent assert

When valid is asserted but ready is low the h_data must stay stable.

disable iff((!rst_n)!=='0)(is_push_agent |-> ((valid && ! ready) |=> $stable(h_data)))

push_pull_if.ValidHighUntilReady_A

concurent assert

When valid is asserted, it must stay high until seeing ready be asserted.

disable iff((!rst_n)!=='0)(is_push_agent |-> ($rose(valid) |-> (valid throughout (ready [-> 1]))))

push_pull_if.ReqIsKnown_AKnownEnable

concurent assert

The req and ack signals should always have known values.

disable iff((!rst_n)!=='0)! $isunknown(! is_push_agent)

push_pull_if.ReqIsKnown_A

concurent assert

disable iff((!rst_n)!=='0)(! is_push_agent |-> ! $isunknown(req))

push_pull_if.AckIsKnown_AKnownEnable

concurent assert

disable iff((!rst_n)!=='0)! $isunknown(! is_push_agent)

push_pull_if.AckIsKnown_A

concurent assert

disable iff((!rst_n)!=='0)(! is_push_agent |-> ! $isunknown(ack))

push_pull_if.D_DataKnownWhenAck_AKnownEnable

concurent assert

When ack is asserted, d_data must have a known value.

disable iff((!rst_n)!=='0)! $isunknown((ack && ! is_push_agent))

push_pull_if.D_DataKnownWhenAck_A

concurent assert

disable iff((!rst_n)!=='0)((ack && ! is_push_agent) |-> ! $isunknown(d_data))

push_pull_if.H_DataKnownWhenReq_AKnownEnable

concurent assert

When req is asserted and the agent is in bidirectional mode, h_data must have a known value.

disable iff((!rst_n)!=='0)! $isunknown(((req && ! is_push_agent) && in_bidirectional_mode))

push_pull_if.H_DataKnownWhenReq_A

concurent assert

disable iff((!rst_n)!=='0)(((req && ! is_push_agent) && in_bidirectional_mode) |-> ! $isunknown(h_data))

push_pull_if.H_DataStableWhenBidirectionalAndReq_A

concurent assert

When req is asserted but ack is low, and the agent is in bidirectional mode, h_data must remain stable.

disable iff((!rst_n)!=='0)((! is_push_agent && in_bidirectional_mode) |-> ((req && ! ack) |=> $stable(h_data)))

push_pull_if.AckAssertedOnlyWhenReqAsserted_A

concurent assert

I 2-phase req-ack handshake, ack cannot be 1 if req is not 1.

disable iff((!rst_n)!=='0)((! is_push_agent && ! is_pull_handshake_4_phase) |-> (ack |-> req))

push_pull_if.NoAckOnNewReq_A

concurent assert

Req is asserted only after previous ack is de-asserted.

disable iff((!rst_n)!=='0)(! is_push_agent |-> ($rose(req) |-> (! $past(ack, 1) && ! ack)))

push_pull_if.ReqHighUntilAck_A

concurent assert

When req is asserted, it must stay high until a corresponding ack is seen.

disable iff((!rst_n)!=='0)(! is_push_agent |-> ($rose(req) |-> (req throughout (ack [-> 1]))))

push_pull_if.AckHighUntilReq_A

concurent assert

When ack is asserted, it must stay high until a corresponding req is de-asserted, in case of four-phase handshake.

disable iff((!rst_n)!=='0)((! is_push_agent && is_pull_handshake_4_phase) |-> ($rose(ack) |-> (ack throughout (! req [-> 1]))))