OpenCores
URL https://opencores.org/ocsvn/sv_dir_tb/sv_dir_tb/trunk

Subversion Repositories sv_dir_tb

[/] [sv_dir_tb/] [trunk/] [examples/] [standard/] [stm/] [stimulus_file.stm] - Rev 2

Compare with Previous | Blame | View Log


--  define variables  use all notations.
DEFINE_VAR  TEMP_VAR1  xE
DEFINE_VAR  TEMP_VAR2  h10
DEFINE_VAR  TEMP_VAR3  b001110100
DEFINE_VAR  TEMP_VAR4  16
DEFINE_VAR  TEMP_VAR5  b100000
DEFINE_VAR  TEMP_VAR6  xff
DEFINE_VAR  TEMP_VAR7  4

--  DUT access instructions
RESET

WRITE 0 x55555555
WRITE 1 xaaaaaaaa

READ 0
VERIFY x55555555
READ 1
VERIFY xaaaaaaaa


--  Rest of this test case demonstrates default instructions.
IF $TEMP_VAR1 == 15
  VERIFY xaaaaaaaa   "Fell into the IF statement.
ELSEIF $TEMP_VAR1 < 14
  VERIFY xaaaaaaaa   "Fell into the ELSEIF statement.
ELSE
  VERIFY xaaaaaaaa   "Fell into the ELSE statement.
END_IF

WHILE $TEMP_VAR2 <= 20
  ADD_VAR TEMP_VAR2 1  "$TEMP_VAR2
END_WHILE

ADD_VAR   TEMP_VAR1  1  "Test $TEMP_VAR1 string  1
ADD_VAR   TEMP_VAR2  2  "Test $TEMP_VAR1 string  $TEMP_VAR1 2
ADD_VAR   TEMP_VAR3  3  "Test string  3
ADD_VAR   TEMP_VAR4  4  "Test string  4
ADD_VAR   TEMP_VAR5  5  "Test string  5
ADD_VAR   TEMP_VAR6  6  "Test string  6
ADD_VAR   TEMP_VAR7  7  "Test string  7

LOOP 10
  ADD_VAR   TEMP_VAR2  2
  ADD_VAR   TEMP_VAR3  2
  ADD_VAR   TEMP_VAR4  2
  ADD_VAR   TEMP_VAR5  2
END_LOOP

CALL $TEST_CALL

JUMP $JUMP1_LOC


TEST_END:
FINISH

--  more instructions in the include file.
INCLUDE  "../stm/test_include.stm     

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.