architecture beh of pwm is
begin
type lutable is array (1 to 64) of integer range 0 to 4000;
-----------------------------------------------tables for FULL STEPPING.
constant full_pwm1_1: lutable := ( 3900,0,0,3900, 3900,0,0,3900, 3900,0,0,3900, 3900,0,0,3900,
3900,0,0,3900, 3900,0,0,3900, 3900,0,0,3900, 3900,0,0,3900,
3900,0,0,3900, 3900,0,0,3900, 3900,0,0,3900, 3900,0,0,3900,
3900,0,0,3900, 3900,0,0,3900, 3900,0,0,3900, 3900,0,0,3900);
variable ds1_1: integer range 0 to 4000; --Duty Cycle Variables for PWM1_1
variable c_full,c_half,c_quat,c_eigh,c_sixt: integer range 1 to 64;
process(gclk)
begin
case selectline is
when "001" => --------------------FULL STEPPING
if dir='1' then--------------------direction selection
ds1_1 := full_pwm1_1(c_full);
我没有提到的所有其他变量都被定义为整数,具有适当的范围,并且都在语法上定义。
但我得到了一个“未定义的符号”错误,而且还有 full_pwm1_1 常量。如果有人可以帮助我并验证数组声明和实例化是否正确?