UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

AR# 5237

Simulator: How to simulate a ramp or counter on a bus

Description

Keywords: bus, ramp, simulator, stimulator, binary counter

Urgency: General

General Description: How do you simulate a bus to count up or down? If
you have an eight bit bus, how to make it go 00 01 02 etc.

解决方案

The easiest way to do this is with a simulation script. Create a script from
the simulator, and choose to use the Wizard. Add your buses as vectors,
naming them anything you wish. Then, under the Stimulated and Watched
Signals Screen, click Browse, and click beside each of the individual signals
in the bus you want to stimulate. Then, one by one, click on the the bit,
then under Stimulator Type choose Binary Counter, and in the Value field
type the index number of the signal in the bus. The relevant portion should
look something like this:

| Vector Definitions
|
| Add your vector definition commands here
vector Vector_Name_1 BUS_IN7 BUS_IN6 BUS_IN5 BUS_IN4 BUS_IN3
BUS_IN2 BUS_IN1 BUS_IN0
radix hex Vector_Name_1
vector Vector_Name_2 BUS_OUT7 BUS_OUT6 BUS_OUT5 BUS_OUT4
BUS_OUT3 BUS_OUT2 BUS_OUT1 BUS_OUT0
radix hex Vector_Name_2

| Watched Signals and Vectors
|
| Define your signal and vector watch list here
watch BUS_IN7 BUS_IN6 BUS_IN5 BUS_IN4 BUS_IN3
watch BUS_IN2 BUS_IN1 BUS_IN0

| Stimulators Assignment
|
| Select and/or define your own stimulators
| and assign them to the selected signals
set_stim B7 BUS_IN7
set_stim B6 BUS_IN6
set_stim B5 BUS_IN5
set_stim B4 BUS_IN4
set_stim B3 BUS_IN3
set_stim B2 BUS_IN2
set_stim B1 BUS_IN1
set_stim B0 BUS_IN0

Then when you run the your script, you'll see your buses referenced by their
vector names, and they'll perform as n-bit binary counters (8 bits in this case).
AR# 5237
创建日期 12/16/1998
Last Updated 06/14/1999
状态 Archive
Type 综合文章