It's no longer necessary to have initialization file with as many lines as
is the wave_table size. If the initialization file is shorter then the file
is read again from its first line. So the initialization file can contain
commutation profile values of one period only.
Signed-off-by: Vladimir Burian <buriavl2@fel.cvut.cz>
begin
for i in wave_table_t'range loop
readline(table_file, file_line);
+
+ if endfile(table_file) then
+ file_close(table_file);
+ file_open(table_file, file_name, read_mode);
+
+ readline(table_file, file_line);
+ end if;
+
read(file_line, table(i));
end loop;