A
axr0284
Guest
Hi,
I am getting an error from my simulator, Aldec Active HDL with the
following code:
<CODE>
library ieee;
use ieee.std_logic_1164.all;
use std.textio.ALL;
use ieee.std_logic_textio.all;
....
....
....
signal current : STD_LOGIC_VECTOR(15 downto 0);
signal voltage : STD_LOGIC_VECTOR(15 downto 0);
file voltage_file_stimulus: TEXT open read_mode is
"vhdl_voltage_data.dat";
file current_file_stimulus: TEXT open read_mode is
"vhdl_current_data.dat";
begin
....
....
....
process
variable lineFromFile : line;
variable v_current : STD_LOGIC_VECTOR(15 downto 0);
variable v_voltage : STD_LOGIC_VECTOR(15 downto 0);
begin
reset <= '1';
absolutethreshold <= x"01BF3A11";
wait for 100 ns;
reset <= '0';
wait for 100 ns;
while (NOT endfile(voltage_file_stimulus)) AND (NOT endfile
(voltage_file_stimulus)) loop
readline(voltage_file_stimulus, lineFromFile); -- Read 1 line
read(lineFromFile,v_voltage);
voltage <= v_voltage;
readline(current_file_stimulus, lineFromFile); -- Read 1
line
read(lineFromFile,v_current);
current <= v_current;
wait for CLK_PERIOD;
end loop;
wait;
end process;
</CODE>
The text files contains the following data set:
560
386F
3087
3326
3E85
AD5
FBA
9C4
3D07
325C
I am getting these errors:
# KERNEL: Time: 0 ps, Iteration: 2, Instance: /UUT/
ray_event_classification_block/area_summer, Process: line__2260.
# EXECUTION:: ERROR : READ(STD_ULOGIC_VECTOR) Error: Character '5'
read, expected STD_ULOGIC literal.
# EXECUTION:: Time: 200 ns, Iteration: 0, TOP instance, Process:
line__67.
# EXECUTION:: ERROR : READ(STD_ULOGIC_VECTOR) Error: Character '3'
read, expected STD_ULOGIC literal.
# EXECUTION:: Time: 200 ns, Iteration: 0, TOP instance, Process:
line__67.
# EXECUTION:: ERROR : READ(STD_ULOGIC_VECTOR) Error: Character '3'
read, expected STD_ULOGIC literal.
# EXECUTION:: Time: 210 ns, Iteration: 0, TOP instance, Process:
line__67.
# EXECUTION:: ERROR : READ(STD_ULOGIC_VECTOR) Error: Character '3'
read, expected STD_ULOGIC literal.
# EXECUTION:: Time: 210 ns, Iteration: 0, TOP instance, Process:
line__67.
# EXECUTION:: ERROR : READ(STD_ULOGIC_VECTOR) Error: Character '3'
read, expected STD_ULOGIC literal.
# EXECUTION:: Time: 220 ns, Iteration: 0, TOP instance, Process:
line__67.
# KERNEL: ERROR : TextIO internal error: Could not read type "STRING"
from line.
I would appreciate any help figuring this out. Thanks a lot,
Amish
I am getting an error from my simulator, Aldec Active HDL with the
following code:
<CODE>
library ieee;
use ieee.std_logic_1164.all;
use std.textio.ALL;
use ieee.std_logic_textio.all;
....
....
....
signal current : STD_LOGIC_VECTOR(15 downto 0);
signal voltage : STD_LOGIC_VECTOR(15 downto 0);
file voltage_file_stimulus: TEXT open read_mode is
"vhdl_voltage_data.dat";
file current_file_stimulus: TEXT open read_mode is
"vhdl_current_data.dat";
begin
....
....
....
process
variable lineFromFile : line;
variable v_current : STD_LOGIC_VECTOR(15 downto 0);
variable v_voltage : STD_LOGIC_VECTOR(15 downto 0);
begin
reset <= '1';
absolutethreshold <= x"01BF3A11";
wait for 100 ns;
reset <= '0';
wait for 100 ns;
while (NOT endfile(voltage_file_stimulus)) AND (NOT endfile
(voltage_file_stimulus)) loop
readline(voltage_file_stimulus, lineFromFile); -- Read 1 line
read(lineFromFile,v_voltage);
voltage <= v_voltage;
readline(current_file_stimulus, lineFromFile); -- Read 1
line
read(lineFromFile,v_current);
current <= v_current;
wait for CLK_PERIOD;
end loop;
wait;
end process;
</CODE>
The text files contains the following data set:
560
386F
3087
3326
3E85
AD5
FBA
9C4
3D07
325C
I am getting these errors:
# KERNEL: Time: 0 ps, Iteration: 2, Instance: /UUT/
ray_event_classification_block/area_summer, Process: line__2260.
# EXECUTION:: ERROR : READ(STD_ULOGIC_VECTOR) Error: Character '5'
read, expected STD_ULOGIC literal.
# EXECUTION:: Time: 200 ns, Iteration: 0, TOP instance, Process:
line__67.
# EXECUTION:: ERROR : READ(STD_ULOGIC_VECTOR) Error: Character '3'
read, expected STD_ULOGIC literal.
# EXECUTION:: Time: 200 ns, Iteration: 0, TOP instance, Process:
line__67.
# EXECUTION:: ERROR : READ(STD_ULOGIC_VECTOR) Error: Character '3'
read, expected STD_ULOGIC literal.
# EXECUTION:: Time: 210 ns, Iteration: 0, TOP instance, Process:
line__67.
# EXECUTION:: ERROR : READ(STD_ULOGIC_VECTOR) Error: Character '3'
read, expected STD_ULOGIC literal.
# EXECUTION:: Time: 210 ns, Iteration: 0, TOP instance, Process:
line__67.
# EXECUTION:: ERROR : READ(STD_ULOGIC_VECTOR) Error: Character '3'
read, expected STD_ULOGIC literal.
# EXECUTION:: Time: 220 ns, Iteration: 0, TOP instance, Process:
line__67.
# KERNEL: ERROR : TextIO internal error: Could not read type "STRING"
from line.
I would appreciate any help figuring this out. Thanks a lot,
Amish