I
I_likes_Verilog
Guest
I've just started learning VHDL, and there is some convenience
feature I need ...
In verilog, I'd often use the (`ifdef) preprocessor to enclose
debugging statements.
`ifdef DBG_MY_MODULE
intial begin
$display("recognized DBG_MY_MODULE!" );
// go spam the console with extra debug messages!
//
//
`endif
In VHDL, I haven't found a way to do this...
The best I can come up with is
boolean flag_dbg_my_module := true;
begin
if ( flag_dbg_my_module ) then
report "recognized flag_dbg_my_module!";
-- go spam the console with extra debug messages!
--
--
end if; -- flag_dbg_my_module
end process;
Obviously, I can put flag_dbg_my_module in a 'package'.
But is there a more convenient/clever way to do this?
I just want some quick and dirty way to 'activate' a
block of statements (for extra debug messages.) In
Verilog, the preprocessor was great, since I could directly
activate the macro-define (`define) from the command-line
( example, 'ncverilog my_module.v +define+DBG_MY_MODULE=1;')
feature I need ...
In verilog, I'd often use the (`ifdef) preprocessor to enclose
debugging statements.
`ifdef DBG_MY_MODULE
intial begin
$display("recognized DBG_MY_MODULE!" );
// go spam the console with extra debug messages!
//
//
`endif
In VHDL, I haven't found a way to do this...
The best I can come up with is
boolean flag_dbg_my_module := true;
begin
if ( flag_dbg_my_module ) then
report "recognized flag_dbg_my_module!";
-- go spam the console with extra debug messages!
--
--
end if; -- flag_dbg_my_module
end process;
Obviously, I can put flag_dbg_my_module in a 'package'.
But is there a more convenient/clever way to do this?
I just want some quick and dirty way to 'activate' a
block of statements (for extra debug messages.) In
Verilog, the preprocessor was great, since I could directly
activate the macro-define (`define) from the command-line
( example, 'ncverilog my_module.v +define+DBG_MY_MODULE=1;')