Skip to the selected question
ASIC.FYI

ASIC Question Bank

1,000+ hardware interview questions
DescriptionQ017
Page ↗
Q017DVASIC interview problem

Direct Programming Interface (DPI) 4-state data mapping

TechniquesSystemVerilogDPI/C interoperability
DifficultyMedium
TopicVerification Utilities
LanguageSystemVerilog
Format4 choices
01

Problem

A C model must distinguish 0, 1, X, and Z for every bit of a 32-bit bus. Which SystemVerilog Direct Programming Interface (DPI) boundary choice preserves that information?

Starting declarationSystemVerilog
// SystemVerilog declaration
import "DPI-C" function void inspect_bus(
  input logic [31:0] bus
);

// Matching C declaration from svdpi.h
// void inspect_bus(const svLogicVecVal* bus);
02

Answer choices (4)