VHDL code - write to a binary .dat file

  • Thread starter Thread starter crono1009
  • Start date Start date
  • Tags Tags
    Binary Code File
Click For Summary
SUMMARY

The discussion focuses on writing VHDL simulation output directly to a binary .dat file. The user has utilized the textio and std_logic_textio libraries for writing to text files but seeks a method to write binary data. The conversation highlights the need for a suitable library or approach within VHDL to achieve this functionality, as the user prefers an in-language solution over external scripts for text-to-binary conversion. The ultimate goal is to visualize the .dat file as an image using standard image viewer software.

PREREQUISITES
  • Familiarity with VHDL programming language
  • Understanding of the textio and std_logic_textio libraries
  • Knowledge of binary file formats
  • Basic concepts of file I/O operations in VHDL
NEXT STEPS
  • Research VHDL libraries for binary file writing
  • Explore VHDL file I/O operations for binary data
  • Learn about converting text to binary in VHDL
  • Investigate methods for visualizing binary .dat files as images
USEFUL FOR

VHDL developers, simulation engineers, and anyone interested in file I/O operations within VHDL, particularly those looking to output binary data for visualization purposes.

crono1009
Messages
14
Reaction score
0
I'm attempting to write some simulation VHDL code that will be able to write the output of my simulation as a single string of binary values in a .dat file.

So far I've used both the textio and std_logic_textio libraries to write the signals to a .txt file as text. Is there a library I can use to write them as binary to a .dat file?

I figure if it comes down to it I could write a simple script outside of VHDL to make the text to binary conversion but I'm inclined to do it strictly in VHDL. In the end I want to be able to view the .dat file as an image using a typical image viewer program.
 
Engineering news on Phys.org

Similar threads

  • · Replies 57 ·
2
Replies
57
Views
6K
  • · Replies 16 ·
Replies
16
Views
4K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 29 ·
Replies
29
Views
4K
Replies
3
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 11 ·
Replies
11
Views
2K