1. XMODEL Package Organization

XMODEL Package Organization

XMODEL Installation Overview

The XMODEL installation directory located at $XMODEL_HOME has the following sub-directories:

  • /bin: contains utility programs such as xmodel, xwave, and jez2vcd.
  • /doc: contains documentation files in PDF format.
  • /function, /stim, /gate, /vdt, /connect, /meas: contains the primitive modules.
  • /circuit: contains primitive modules for circuit-level modeling.
  • /block: contains block-level modeling examples such as phase-frequency detector, voltage-controlled oscillators, linear equalizer, etc.
  • /example: contains various system-level modeling examples such as charge-pump PLL, bang-bang CDR, high-speed links, adaptive DFE equalizer, etc.
  • /training: contains materials used for training exercises.

XMODEL Utility Programs

The XMODEL package includes the following utility programs. Each of these will be explained in further detail in the following chapters.

  • xmodel: a simulation launcher utility that provides a consistent user interface regardless whether you are using Synopsys VCS, Cadence NC-Verilog, or MentorGraphics ModelSim as the underlying SystemVerilog simulator.
  • xwave: a waveform viewer utility dedicated to viewing XMODEL simulation results. Leveraging the unique, event-based waveform format (called JEZ), the XWAVE waveform viewer utility offers fast file loading, dynamic rendering of waveforms, and easy-to-use interface.
  • glister: a command-line utility to generate XMODEL netlists from Cadence Virtuoso design database.
  • jez2vcd: A utility to convert a JEZ-format waveform file into a VCD-format file, which can be read by other waveform viewer applications.
  • diff_jez: A utility to compare the difference between two JEZ-format waveform files.
  • xmodelpy: A Python interpreter dedicated for XMODEL.
  • xpydoc: A Python utility to browse documentations on Python libraries, modules, and functions.
  • lmxendutil: a command-line utility to check the status of the LMX license server.
  • licstat: a utility that plots the license usage statistics graphically.

XMODEL Primitives

The XMODEL package provides a comprehensive library of basic modules called primitives, with which one can build behavioral models for their own analog/mixed-signal circuits.

The XMODEL primitives have six categories: functions, stimulus generators, logic gates, variable domain translators (VDTs), connectors, and measurement probes.

Figure 1. Six categories of XMODEL primitives.

Here is the brief description on each category of primitives. The more detailed information regarding XMODEL primitives can be found in the XMODEL Reference Manual.

  • Function primitives support processing of analog signals and their conversion into/from digital domain.
  • Stimulus generator primitives provide means to generate various stimulus waveforms both in analog and digital format.
  • Logic gate primitives describe boolean operations on timing-sensitive binary signals (e.g. clocks and pulses) with xbit types.
  • Variable-domain translator primitives provide ways to convert signals from one variable domain to another, such as from clock to frequency and vice versa.
  • Connector primitives support connection between XMODEL-typed signals (xreal and xbit) and SystemVerilog-typed signals (real and bit) for compatibility purposes.
  • Measurement probe primitives record the time-domain waveforms of signals and their properties (e.g. frequency, phase, duty-cycle, etc.) to a file.

Note that the list of primitives available in each of six categories and their respective documentations are also accessible on-line using the XMODEL Simulation Launcher utility. For instance, typing the following command in the command-line prompt gives you the list of available primitive categories:

unix> xmodel -h
… (omitted for brevity)
list of help topics:
    function           Functions
    gate               Logic gates
    stim               Stimulus generators
    meas               Probes
    vdt                Domain translators
    connect            Connectors

And you can get on-line documentation on each of the category or primitive by giving a parameter to the -h option. For instance:

unix> xmodel -h function
==============================
TOPIC function
==============================
The XMODEL function primitives support processing of analog signals and their conversion into/from digital domain.

list of function primitives:
    adc              An ideal analog-to-digital converter.
    add              A multiple-input adder for xreal-typed signals.
    compare          An analog clocked comparator.
    dac              An ideal digital-to-analog converter.
    delay            An ideal delay element for xreal-typed signals.
    deriv            A derivative operator for xreal-typed signals.
    filter           An analog linear filter for xreal-typed signals.
    filter_fir       A finite impulse response filter.
    filter_var       An variable filter for xreal-typed signals.
    integ            An integration operator for xreal-typed signals.
    integ_mod        An integration with modulo operator for xreal-typed
                     signals.
    limit            A limiting operator for xreal-typed signals.
    multiply         A multiple-input multipler for xreal-typed signals.
    poly_func        A polynomial function for xreal-typed signals.
    power            A power operator for xreal-typed signals.
    pwl_func         A piecewise-linear (PWL) function for xreal-typed
                     signals.
    sample           A sample-and-hold function for xreal-typed signals.
    scale            A scaler for an xreal-typed signal.
    select           A signal selector (i.e. multiplexer) for xreal-typed
                     signals.
    slice            An analog continuous-time comparator (slicer).
    transition       A transition filter that converts an xbit-typed
                     signal to an xreal-typed signal with finite
                     rise/fall times.
unix> xmodel -h adc
==============================
PRIMITIVE adc
==============================
An ideal analog-to-digital converter.

The 'adc' primitive continuously digitizes an xreal-typed, continuous-time analog signal into an xbit-typed, digital signal. Therefore, the primitive is basically a multi-level slicer.

The bit resolution of the 'adc' primitive is specified by the parameter 'num_bit'. The value range of the input signal is set either by defining 'value_min' and 'value_max' or by defining 'value_min' and 'value_lsb'.  For the former case, one LSB step (i.e., 'value_lsb') is defined as '(value_max-value_min)/(2^num_bit-1)'.

The input-to-output transfer characteristic of this 'adc' primitive is defined as the following:

    out = 0     for in < value_min + 0.5*value_lsb
    out = 1     for value_min + 0.5*value_lsb <= in < value_min + 
                1.5*value_lsb
    out = 2     for value_min + 1.5*value_lsb <= in < value_min + 
                2.5*value_lsb
        ...
    out = k     for value_min + (k-0.5)*value_lsb <= in < value_min + 
                (k+0.5)*value_lsb
        ...
    out = 2^num_bit-1 for value_max - 0.5*value_lsb <= in

List of parameters:
-----------------------------------------------------------------------
Name          Type       Description                Unit      Default     
-----------------------------------------------------------------------
num_bit       integer    ADC resolution             bits       1           
value_min     real       minimum nominal input for  None       0.0         
                         out=0                                                 
value_max     real       maximum nominal input for  None      -1.0        
                         out=2^num_bit-1                                       
value_lsb     real       one LSB step               None      -1.0        

List of I/O ports:
-----------------------------------------------------------------------
Name                     Description                 I/O        Type  
-----------------------------------------------------------------------
out     [num_bit-1:0]    digital output             output      xbit  
in                       analog input               input       xreal

Example Blocks and System Models

The /block and /example directories located under $XMODEL_HOME contain the example models at the block-level and system-level respectively. For instance, the /block directory contains the models on:

  • Limiting amplifier
  • Linear phase-frequency detector
  • Alexander-type bang-bang phase detector
  • Charge-pump filter
  • FIR filter
  • Lossy transmission-line channel
  • Decision-feedback equalizer (DFE)
  • Digitally-controlled oscillator (DCO)
  • Voltage-controlled oscillator (VCO)
  • Frequency divider
  • And more …

Also, the /example directory contains the system model examples and associated testbenches of:

  • Charge-pump PLL
  • Digital PLL
  • Bang-bang CDR
  • High-speed interface
  • Adaptive decision-feedback equalizer

The details of these models and testbenches can be found in the separate documentations, e.g. in Simulating Charge-Pump PLL in XMODEL.

2. xmodel: Simulation Launcher »

XMODEL