VLSI Design Project

Simulation Environment


Overview

The simulation environment for the VLSI Design Project consists of a number of SystemVerilog files which model a basic system built around the sports altimeter under test:

System Diagram

The system includes inputs from an altimeter sensor module (Altimeter SPI Slave) and inputs from buttons (Mode, Trip) plus either one or two display outputs (LED, LCD).

The LED display is a seven-segment, common-cathode, multiplexed type. Thus a segment is lit if and only if the relevant segment line is taken high and the relevant digit line is taken low. The following figure shows the waveforms required to display "P1013" (indicating a pressure of 1013mb) on the seven segment display.

Seven-segment Waveforms

The sensor module uses a serial peripheral interface (SPI) bus for communication, with the chip acting as master and the sensor acting as slave. The following figure shows an 8-bit command (C[7:0]) being sent to the slave which returns a 24-bit data value (D[23:0]).

SPI Sensor Waveforms

This 8-bit + 24-bit format is used by the sensor module for ADC commands. In the case of a simplified slave (see below), this is the only format that is used.

Model Hierarchy

The diagram below shows the hierarchy of the SystemVerilog models that make up the system:

SystemVerilog Hierarchy

Note that there are no altimeter DFT signals (Test, SDI, SDO) in the diagram. These signals may optionally be supported by the environment but they will not be used in the initial simulations and so are not shown here.

The hierarchy of the design is defined within the top-level module and testbench file which instances the sports altimeter and display modules:

    system/system.sv

Display Models

Sensor Models

Pad Ring Behavioural Model

A behavioural model (not synthesizable) of the sports altimeter pad ring can be found in the SystemVerilog file:

    system/altimeter.sv

This model is merely a shell which simulates the pad ring and which instances the core sports altimeter model (alt_core). This pad ring file is only used in initial behavioural simulations when no structural model of the pad ring exist.

Simulation

Simulation Options

A number of options may be set to control the simulation:

In addition, an options.sv file can be used to set specify default options for the the model. The example options.sv file specifies that no scan path is supported in the example model. In this case appending +define+no_scan_signals to the simulate command will have no effect.

(note that an uncustomised template for this file can be found in the system directory: system/options.sv)

HDL Design

For your own HDL design, copy the example files to a new directory:

	cp -r example behavioural
Then edit the files in the new directory to reflect your design. You can simulate your design using a command such as:
	./simulate behavioural  20s  +define+stimulus=system2/mountain1.sv  +define+special_monitor
You can also customise the display and sensor modules by placing copies in the system2 directory:
	cp system/led_display.sv system/simple_altimeter_sensor.sv system2/
	nedit system2/led_display.sv system2/simple_altimeter_sensor.sv &

Note that you should not need to edit any files within the system directory. Making any changes in these files is likely to result in simulation failures during automated post-submission testing.


Iain McNally

21-2-2024