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
The discussion focuses on writing VHDL simulation outputs as binary values in a .dat file. The user has successfully used textio and std_logic_textio libraries for text output but seeks a method for binary file writing. There is a consideration of using an external script for text-to-binary conversion, although the preference is to achieve this entirely within VHDL. The ultimate goal is to view the resulting .dat file as an image using standard image viewer software. The thread highlights the need for a suitable VHDL library for binary file operations.
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
I am trying to understand how transferring electric from the powerplant to my house is more effective using high voltage. The suggested explanation that the current is equal to the power supply divided by the voltage, and hence higher voltage leads to lower current and as a result to a lower power loss on the conductives is very confusing me. I know that the current is determined by the voltage and the resistance, and not by a power capability - which defines a limit to the allowable...

Similar threads

  • · Replies 16 ·
Replies
16
Views
4K
  • · Replies 57 ·
2
Replies
57
Views
5K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 29 ·
Replies
29
Views
3K
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
1K