quick.gif

space2.gif

space2.gif

space2.gif

space2.gif

space2.gif

space2.gif

space2.gif

   

space.gif

   

space.gif

  ../images/main/bullet_green_ball.gif Simulation-related constructs

This section covers the simulation related constructs that can be used withing e language, some of them are as given below.

   

space.gif

  • 'HDL pathname'
  • force
  • release
  • simulator_command()
  • stop_run()
   

space.gif

  ../images/main/bulllet_4dots_orange.gif 'HDL pathname'

This is used for accessing a HDL node inside the design. We can use this for either driving a value or for releasing a value.

   

space.gif

Parameter

Description

HDL-pathname

The full path name of an HDL object, optionally including expressions and composite data.

bit-range

A bit range has the format [high-bit-num

index-exp

Accesses a single bit of a Verilog vector, a single element of a Verilog memory, or a single vector of a VHDL array of vectors.

@x | z

Sets or gets the x or z component of the value. When this notation is not used in accessing an HDL object, x is translated to zero and z to one. When reading HDL objects using @x (or @z), we get value (x or z) to one, and all other values to zero. When writing HDL objects, if @x (or @z) is specified, every bit that has a value of one to x (or z). In this way, @x or @z acts much like a data mask, manipulating only those bits that match the value of x or z.

@n

When this specifier is used for driving HDL objects, the new value is visible immediately (now). The default mode is to buffer projected values and update only at the end of the tick. If reading a value using @n then the projected simulator value can be seen.

   

space.gif

  ../images/main/bulllet_4dots_orange.gif force

This forces an HDL object to a specified value, overriding the current value and preventing the DUT from driving any value. The HDL object remains at the specified value until a subsequent force action from e or until freed by a release action.

   

space.gif

  ../images/main/bulllet_4dots_orange.gif release

This releases the HDL object which previously has been forced.

   

space.gif

  ../images/main/bulllet_4dots_orange.gif simulator_command()

This passes a command to the HDL simulator from e. The command shall not return a value. The output of the command is sent to the standard output and log file.

   

space.gif

This routine can be used only with the ModelSim, SpeedSim, and NC (VHDL) simulators.

   

space.gif

  ../images/main/bulllet_4dots_orange.gif stop_run()

This stops the simulator and initiates post-simulation phases. This method needs to be called by a user defined method or TCM to stop the simulation run cleanly. The following things occur when stop_run() is invoked.

   

space.gif

  • The quit() method of each struct under sys is called. Each quit() method emits a quit event for that struct instance at the end of the current tick.
  • All executing threads shall continue until the end of the current tick.
  • At the end of the current tick, the extract, check, and finalize test phases are performed.
  • If a simulator is linked here, e terminates the simulation cleanly after the test is finalized.
   

space.gif

   

space.gif

  ../images/main/bulllet_4dots_orange.gif Verilog Statements

Some basic functionality of the Verilog simulator interface, such as setting or sampling the values of some Verilog objects, is enabled without any action on your part. However, some features, such as the continuous driving of Verilog signals or calling of Verilog tasks and functions, requires some user-specified declarations-- verilog statements or unit members. The following sections describe these constructs

   

space.gif

  • verilog code
  • verilog function
  • verilog import
  • verilog task
  • verilog time
  • verilog variable reg | wire
  • verilog variable memory
   

space.gif

  ../images/main/bullet_star_pink.gif Verilog Code

Specifies a list of Verilog strings to be included in the Verilog stubs file each time it is generated. The stubs file contains code that enables some Verilog-related features.

   

space.gif

  ../images/main/bullet_star_pink.gif Verilog Function

Declares a Verilog function in e so that it can be called from a time-consuming method (TCM).

   

space.gif

  ../images/main/bullet_star_pink.gif Verilog Task

Declares a Verilog user-defined task or system task in e so that it can be called from a TCM.

   

space.gif

  ../images/main/bullet_star_pink.gif Verilog Import

Reads in a file that includes Verilog `define text macros. After reading in the file, you can use these text macros in e code.

   

space.gif

  ../images/main/bullet_star_pink.gif Verilog Time

Sets the time resolution in the Verilog stubs file to the specified verilog-time-scale.

   

space.gif

  ../images/main/bullet_star_pink.gif Verilog variable reg | wire

Allows access in e code to the Verilog object named in 'HDL-pathname', a register or a net. In general, you can access Verilog objects using the 'HDL-pathname' expression. The verilog variable statement is necessary only when you want to

   

space.gif

  • drive or force a wire
  • drive or sample a wire or reg with an offset from the e callback
   

space.gif

  ../images/main/bullet_star_pink.gif Verilog variable memory

Allows access in e to a Verilog memory. verilog variable declarations for the same memory can be repeated (to allow incremental building of e code), but each repeated declaration must be identical.

   

space.gif

   

space.gif

   

space.gif

   

space.gif

space2.gif

space2.gif

space2.gif

space2.gif

space2.gif

  

Copyright © 1998-2014

Deepak Kumar Tala - All rights reserved

Do you have any Comment? mail me at:deepak@asic-world.com