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# 632

PROsim, ViewSim: Using the LOADM command with Xilinx FPGA simulations

Description

There is often confusion about use of the LOADM command for Viewlogic
simulation. Here is a clarification of the command found in the Viewlogic
documentation. The LOADM command specifies the value of the output of a
RAM/ROM componant at the specified address(es).

解决方案

Here is example 1 from the viewlogic documentation:

loadm videobuf (0:255) AA\h

This command loads the 8 bit wide RAM or ROM with the hex output AA for
every location between 0 and 255. For the XC4000 simulations all memories
are 1 bit wide. For XC4000 designs even multiple bit width outputs are
generated as macros of single output memories. These means that all memories
will be made from either 16x1 or 32x1 memory componants, so the output that
is defined should always be one bit wide. All 16 bit memories will take as
many as 16 loadm commands to initialize, and all 32 bit memories will take
as many as 32 loadm commands to initialize. (this can only be reduced if and
only if there are adjacent locations with the same output)

For example take a 16x1 ROM that has an INIT=AAAA attribute. (this sets up
every adjacent bit in the ROM as opposites.) The way to initialize this ROM
in viewlogic simulation would be:

loadm videobuf/rom (0:0) 0
loadm videobuf/rom (1:1) 1
loadm videobuf/rom (2:2) 0
loadm videobuf/rom (3:3) 1
loadm videobuf/rom (4:4) 0
loadm videobuf/rom (5:5) 1
loadm videobuf/rom (6:6) 0
loadm videobuf/rom (7:7) 1
loadm videobuf/rom (8:8) 0
loadm videobuf/rom (9:9) 1
loadm videobuf/rom (10:10) 0
loadm videobuf/rom (11:11) 1
loadm videobuf/rom (12:12) 0
loadm videobuf/rom (13:13) 1
loadm videobuf/rom (14:14) 0
loadm videobuf/rom (15:15) 1

An example where only one loadm command is needed is a ROM where all of the
outputs are the same. (INIT=FFFF or INIT=0) The viewlogic command for the
case where all values of a 16x1 rom are set to 1 would be:


loadm videobuf/rom (0:15) 1


When people generate their ROMs using memgen or XBLOX a .XMM file is created
which will initialize the memories. However, when a discrete memory is added
to a schematic it is expected that the user be able to use the loadm command
to initialize their simulation.
AR# 632
创建日期 08/31/2007
Last Updated 10/01/2008
状态 Archive
Type 综合文章