constant <clock>_period : time := 10 ns;
What is the error with this code ? it says syntax error near "<".
Electrical Engineering Stack Exchange is a question and answer site for electronics and electrical engineering professionals, students, and enthusiasts. It only takes a minute to sign up.
Sign up to join this community constant <clock>_period : time := 10 ns;
What is the error with this code ? it says syntax error near "<".
I think you generated a testbench-template in Vivado or ISE, as these programs generate code like this.
The idea is that you replace the <clock>
with the name of your clock-signal: If your clock-signal is called clk
, the line would become
constant clk_period : time := 10 ns;
which is perfectly fine.
VHDL names can contain the following:
They are also case insensitive, have to start with a letter and cannot contain two adjacent underscores (From the Doulos Golden Reference Guide).
< and > are not a letter, number or an underscore.
extended_identifier ::= \ graphic_character { graphic_character } \
where a backslash can be represented in the sequence of graphic characters by escaping it with a preceding backslash. constant \<clock>_period\ : time := 10 ns;
would be a legal declaration with the object name \<clock>_period\
.
\$\endgroup\$