How to Display a value :-
Syntax : show value <signal or variable name>
Example 1.
show value clk
It will display clk signal value at current simulation time.
Example 2.
show value addrs
It will display the 32bit address
Example 3.
show value addrs -radix hex
It will display the 32bit address in hexadecimal.
other radixes - dec/hex/bin/oct/default
Example 4.
signal vect: std_logic_vector(0 to 5)
show value vect(0)
Displays 0th position in vect (vector of std_logic).
show value vect(1:2)
Displays slice of vect from 1 to 2
show value vect
Displays entire vector vect.
How to Test a Signal :-
Test command is used for comparing a signal with a value.If condition is true
returned value is 1 else 0 is returned.
Syntax : test <signal> <value>
Return value : true '1'
false '0'
Example 1.
signal reg : std_logic_vector(15 downto 0)
test module_1/reg(5) 1
It compares bit in position 5 of reg signal in module module_1 that
is instantiated under your current scope.
Example 2.
test A FF -radix hex
To compare the value of signal A to FF.
Example 3.
test clk '0'
To compare value '0' with clk value.
Example 4.
signal vect: std_logic_vector(7 downto 0)
test vect 101010
To compare vect value with "101010".
Isim Put command :-
Put command will allow to change the value of the signal on run time.
Syntax : put <signal> <value>
Example 1.
put clk 1
or
put clk 1 -radix bin
or
put clk "1" -radix bin
This will set clk to 1 on runtime.
Example 2.
signal slv: std_logic_vector(4 downto 0)
put slv 01010
To assign a value "01010" to signal slv.
Example 3.
put A FF -radix hex
To assign a value FF to signal A.
How To Set a Signal :-
ISIM FORCE Cmd
Syntax : isim force (add|remove) < object_name > < value > [options]
1. isim force add enb_n 0 force enb_n signal to zero.
2. isim force add reset 1 -time 10 ns -cancel 50 ns force reset to 1 at 10 ns and cancel after 50ns.
3. isim force add clock 0 -value 1 -time 10 ns -repeat 20 ns
At t=0 ns clock='0'
At t=10 ns clock='1'
and repeat this every 20 ns.
Syntax :
isim force add <signal-name> <LOW/HIGH> -value <HIGH/LOW>
-time <LOW-Period/HIGH-Period> -repeat <Total-Period>
4. isim force add din 0 -value 1 -time 10 ns -value 0 -time 30ns
-repeat 100 ns
isim force remove reset
To remove the values on signal enb_n and reset.
Other Commands :-
1. isim get userunit
returns current unit of time (default is ps).
2. isim ltrace on/off
ltrace command lets you turn line tracing on or off.
3. isim ptrace on/off
ptrace command lets you turn process tracing on or off. When turned on,
the command also displays the name of the currently executing VHDL
process in the Simulation Console tab.
4. run command :-
run 2000ns : runs the simulation for 2000ns.
run 1.2ns : runs the simuation for 1.2ns.
run all : runs simulation until all events are executed.
run : runs till the step size given in isim window.
5. isim set radix <radix-type>
radix types : default, dec,bin, oct, hex, unsigned and ascii.
6. step
To step through one line of HDL code.
No comments:
Post a Comment