From 06ce3f1bffab9080b78cafaad3503263f1f3ee4f Mon Sep 17 00:00:00 2001 From: Vladimir Burian Date: Wed, 15 Jun 2011 08:10:06 +0200 Subject: [PATCH] Wave_table initialization data format modified. 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 --- wave_table.vhd | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/wave_table.vhd b/wave_table.vhd index 5637e48..af6ef6c 100644 --- a/wave_table.vhd +++ b/wave_table.vhd @@ -50,6 +50,14 @@ architecture behavioral of wave_table is 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; -- 2.39.2