Text output file not instantiated -
I have two newbie questions. I am trying to bring data from an array into the text file on vhdl . Even though referring to many online guides to do this, I've always come up with the "file does not exist" any suggestions on what's going wrong?
Secondly, when I try to use the array sign below as an argument for the task of writing, then it gives an error that I have no continuous data form of an operand How can i use Your code does not show this, but I think that you would like the In VHDL 2002, this package does not know how to try The non-standard Synopsys package is available in most of the devices VHDL 2008 standard Also note that The unit is Top_Module Port (CLC: STD_LOGIC); Finally Top_Module; The behavior type of the architecture Top_Module array_1 is the array (0 to 127) integer range of -112 to 127; Signal sample_1: array_1: = (104, 40, -40, -104, -128, -104, -40,40,104,127,104,40,40, -4); Constants: std_logic_vector (3 below): = "0111"; Initial Process (CLK) - The process to write output to "* .txt" file file result_file: text "fft_output.txt" is out; Outline of the variable: line; Constant tmp_fft: integer: = 0; Then start (clk'event and clk = '1')) then --tmp_fft: = to_integer (signed (sample_1)); Write (outline, one); WriteLine (result_file, outline); end if; end process; The file declaration VHDL 1987 syntax is, so try it instead:
file result_file: The text is open write_mode "fft_output.txt";
std.textio package:
library std; Use Std.textio.all;
line to
std_logic_vector in
(Framework, A) . So if you are using VHDL 2002, then the problem may be due to lens support in the
write process for the problem
std_logic_vector .
std_logic_textio , and includes a writing function for
std_logic_vector . This package can be used with:
Library IEEE; Use ieee.std_logic_textio.all;
std_logic_vector has been added to write in the package, so that you can check whether you are a simulator Support for this feature has been used in VHDL 2008. Note that binary and hex output should be
bwrite and
hwrite .
write and
textio in general is not possible because it is on the
line type Based, which is again a
access type, similar to the pointer type in other languages, and it can not be synthesized. For the synthesis use the
slv_image function in the north of David Conts.
Comments
Post a Comment