Comments on: Write to File in VHDL using TextIO Library https://surf-vhdl.com/write-to-file-in-vhdl-using-textio-library/ The Easiest Way To Learn VHDL Fri, 16 Dec 2022 13:35:31 +0000 hourly 1 https://wordpress.org/?v=6.5.2 By: Safwan El Assad https://surf-vhdl.com/write-to-file-in-vhdl-using-textio-library/#comment-31975 Fri, 16 Dec 2022 13:35:31 +0000 http://surf-vhdl.com/?p=833#comment-31975 Well explained.
I tried to download the book “How to measure the maximum frequency” without success. So can you email it to me?
Safwan El Assad
safwan.elassad@univ-nantes.fr

]]>
By: Safwan El Assad https://surf-vhdl.com/write-to-file-in-vhdl-using-textio-library/#comment-31945 Fri, 16 Dec 2022 11:22:15 +0000 http://surf-vhdl.com/?p=833#comment-31945 It is well explained, Thak-you

]]>
By: Surf-VHDL https://surf-vhdl.com/write-to-file-in-vhdl-using-textio-library/#comment-16592 Sat, 01 May 2021 10:10:34 +0000 http://surf-vhdl.com/?p=833#comment-16592 In reply to Francesco.

this code can be used only in a test-bench.
If you are acquiring data on a real board, you need to connect your board with an external PC (or arduino board) and store this data in a file.
Check my online courses. There are some example
Ciao

]]>
By: Francesco https://surf-vhdl.com/write-to-file-in-vhdl-using-textio-library/#comment-16265 Sat, 10 Apr 2021 13:06:51 +0000 http://surf-vhdl.com/?p=833#comment-16265 Hello, thank you for this fantastic guide. I have a problem with it, could you help me? I’m acquiring data from the XADC of an evaluation board (ARTY), I can see converted data on an external led matrix but I can’t store these converted data on a .txt file with this VHDL code. Have you any suggestions?

]]>
By: Surf-VHDL https://surf-vhdl.com/write-to-file-in-vhdl-using-textio-library/#comment-13958 Fri, 27 Nov 2020 21:50:33 +0000 http://surf-vhdl.com/?p=833#comment-13958 In reply to ub.

Thank you!

]]>
By: ub https://surf-vhdl.com/write-to-file-in-vhdl-using-textio-library/#comment-13519 Thu, 29 Oct 2020 15:08:19 +0000 http://surf-vhdl.com/?p=833#comment-13519 Good explanation with examples.
Thank you.

]]>
By: Surf-VHDL https://surf-vhdl.com/write-to-file-in-vhdl-using-textio-library/#comment-10698 Fri, 27 Sep 2019 21:32:12 +0000 http://surf-vhdl.com/?p=833#comment-10698 In reply to Riste.

there are a lot of syntactic mistakes…
start from
https://surf-vhdl.teachable.com/

https://surf-vhdl.com/vhdl-syntax-web-course-surf-vhdl/

]]>
By: Riste https://surf-vhdl.com/write-to-file-in-vhdl-using-textio-library/#comment-10689 Sat, 21 Sep 2019 12:09:28 +0000 http://surf-vhdl.com/?p=833#comment-10689 i tried this with writing bits to .bin file but it doesn’t work????? I made a simple inverter and i want to store the outputs in a file. here is the code:

———————————————————————————-
— Company:
— Engineer:

— Create Date: 09/19/2019 03:56:37 PM
— Design Name:
— Module Name: inverter_w_tb – Behavioral
— Project Name:
— Target Devices:
— Tool Versions:
— Description:

— Dependencies:

— Revision:
— Revision 0.01 – File Created
— Additional Comments:

———————————————————————————-

library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use std.textio.all;

— Uncomment the following library declaration if using
— arithmetic functions with Signed or Unsigned values
–use IEEE.NUMERIC_STD.ALL;

— Uncomment the following library declaration if instantiating
— any Xilinx leaf cells in this code.
–library UNISIM;
–use UNISIM.VComponents.all;

entity inverter_w_tb is
— Port ( );
end inverter_w_tb;

architecture Behavioral of inverter_w_tb is

type bitf is file of std_ulogic;
constant clk_period : time := 10 ns;
signal done : std_logic := ‘0’;
signal x_in : std_ulogic := ‘0’;
signal clk : std_ulogic := ‘0’;
signal x_out: std_ulogic;

component inverter is
port (
data_in : in std_ulogic;
clk : in std_ulogic;
data_out: out std_ulogic);
end component inverter;

begin
done x_in,
clk => clk,
data_out=> x_out);

clk_process: process
begin
for i in 0 to 8 loop
clk <= '0';
wait for clk_period/2;
clk <= '1';
wait for clk_period/2;
end loop;
wait;
end process;

stim_process: process
begin
x_in<='1';
wait for clk_period;
x_in<='1';
wait for clk_period;
x_in<='0';
wait for clk_period;
x_in<='0';
wait for clk_period;
x_in<='0';
wait for clk_period;
x_in<='0';
wait for clk_period;
x_in<='1';
wait for clk_period;
x_in<='0';
wait;
end process;

write_process: process(clk)
file file_handler : bitf open write_mode is "output.bin";
variable row: line;
begin
if rising_edge(clk) then
write(row, x_out);
writeline(file_handler, row);
end process;

end Behavioral;

]]>
By: Surf-VHDL https://surf-vhdl.com/write-to-file-in-vhdl-using-textio-library/#comment-10603 Sun, 28 Apr 2019 21:02:41 +0000 http://surf-vhdl.com/?p=833#comment-10603 In reply to Rekhanshi Varma.

Thank you!!

]]>
By: Rekhanshi Varma https://surf-vhdl.com/write-to-file-in-vhdl-using-textio-library/#comment-10602 Fri, 26 Apr 2019 08:34:08 +0000 http://surf-vhdl.com/?p=833#comment-10602 Best explanation! Good job guys!!

]]>