P
Peng Yu
Guest
Hi,
When I want to commend some code in C++, I could either use /**/ or
#if 0 #endif pair. However, I don't find a compiler directive in
verilog, which is similar to #if in C++.
However, in some situation, #if 0 #endif pair is convenient. The
following is an example for C++.
#if 0
printf("Hello\n");
/*printf("Hello\n");*/
printf("Hello\n");
/*printf("Hello\n");*/
printf("Hello\n");
#endif
In this case some code commented with /**/ is with the scope of the
code that you're going to comment later. Instead of deleting all the
/**/ in the body and putting a pair of /**/ at both the begining and
the end, #if 0 #endif pair is the best solution.
I wonder whether verilog support this syntax. Thanks!
Peng
When I want to commend some code in C++, I could either use /**/ or
#if 0 #endif pair. However, I don't find a compiler directive in
verilog, which is similar to #if in C++.
However, in some situation, #if 0 #endif pair is convenient. The
following is an example for C++.
#if 0
printf("Hello\n");
/*printf("Hello\n");*/
printf("Hello\n");
/*printf("Hello\n");*/
printf("Hello\n");
#endif
In this case some code commented with /**/ is with the scope of the
code that you're going to comment later. Instead of deleting all the
/**/ in the body and putting a pair of /**/ at both the begining and
the end, #if 0 #endif pair is the best solution.
I wonder whether verilog support this syntax. Thanks!
Peng