|
|
|
|
|
|
|
|
|
|
|
|
Hello World
|
|
|
If you refer to any book on programming language it starts with "hello World" program, once you have written the program, you can be sure that you can do something in that language |
|
|
|
|
|
Well I am also going to show how to write a "hello world" program in VERA. |
|
|
|
|
|
|
|
|
|
|
|
Code : Hello World
|
|
|
|
|
|
1 #include "vera_defines.vrh"
2
3 program hello {
4 printf("Hello World By Deepak Kumar Tala\n");
5 }
You could download file hello.vr here
|
|
|
|
|
|
In the above code, lines in green are comments, and blue are keywords in vera language, "program" is the top most module. Like in Verilog we have top module. printf is same as printf in C language or $display in verilog. |
|
|
|
|
|
Few things about Program as below. |
|
|
|
|
|
- Global variables are declared in program.
- Execution of any Vera testbench/code starts at begining of program and executes sequentially till end of program.
- program can call other methods/functions/tasks
|
|
|
|
|
|
Simulation Hello World
|
|
|
|
|
|
Hello World example can be simulating with following command |
|
|
|
|
|
vcs -ntb hello.vr -R |
|
|
|
|
|
Hello World By Deepak Kumar Tala
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Copyright © 1998-2014 |
Deepak Kumar Tala - All rights reserved |
Do you have any Comment? mail me at:deepak@asic-world.com
|
|