The ROM components are programmable in a various modes, included the possibility of initialize the memory with a sampled waveform. In the example of the next figure, the user has activated the contest menu of the component, to launch the ROM Editor/Programmer:
The ROM Editor/Programmer dialog (see the figure below) can be used to edit directly the memory contents in Binary, Hexadecimal or ASCII text format (Undo/Redo buttons are available). To edit a memory cell, simply click on it. To go to the next cell, press the <right arrow key>.
The dialog has also three buttons (Load, Save, Waveform), and the Label field. In the Label edit field (up-right side), the user can edit a symbolic name for the memory component (see also the example in the previous figure, just over the symbol: "Sine Wave").
By clicking on the Waveform button, we open the"Waveform in ROM" dialog, initially in Viewer Mode. As visible in the next figure, the dialog shows the Rom data as a digital signal, in a bidimensional chart (on the horizontal axis: the internal addresses of the memory; on the vertical axis: the corresponding data values). In this example, the memory contains the 8-bits samples of a complete cycle of a sine wave (the samples are coded as signed binary numbers).
To define a new waveform, you must change the mode (see the figure below):
Now it is possible to choose a new waveform, selecting it from the Wave list box:
The user can select a standard function: sine, cosine, saw-tooth, triangle and square wave (in the figure above, the cosine waveform). The waveform samples are calculated to memorize an entire cycle of the wave and to reach the maximum possible amplitude, centered on the zero (from +127 to -127, if signed, as in this example), or all-positive ( unsigned, from 0 to 254).
The button "Copy Image" will copy the waveform image on the clipboard, ready to be pasted in the user documents.
At the end of the list, a Fourier Series utility is available (the Fourier Series is a mathematical method to represent a cyclic function as the sum of sine waves). We can choose between two classic series (square wave and saw-tooth wave), and stop the series at a given order. In the example below, a square wave series is set (as only the "Odd" harmonics has been selected), limited at the seventh harmonic.
Moving the mouse on the desired sample, with a click, the user will open a magnifying window (visible in the next figure):
In this example, we see a particular of the waveform seen in the previous figure, magnified around the sample of address 106, whose value is +116 (in blue, the digitized waveform; in red, the analog original waveform that has been sampled).
Buttons are available to manage time scale and horizontal Panning; the vertical scale, instead, is adaptive. Also here, a "Copy Image" button allows to the user to copy the waveform image on the clipboard.
Returning to the Waveform Editor, note that we can add to the waveform also a certain amount of white noise, as visible in the following figure:
Let's return to the ROM Editor/Programmer dialog, and consider the buttons "Load" and "Save":
The ROM memory contents can be saved on, and loaded from, a coded text file. The default extension of the file is ".drs" (Deeds Rom Source file), but it can be opened and modified with a text file editor. By clicking on the "Save" button, we export a text file like this:
In this example, the # in first position indicate that the entire line is a Comment. A # followed by a letter is a Directive (see below). All the HEX numbers that will follow, in the lines without # in first position, represent the data contents of the ROM, location by location.
By clicking on the "Load" button, we can import a .drs file. The file is compiled and the ROM component is programmed with the file data. A Directive must be written in first position, and can be one of the following:
In the following example, the file has been coded to load in the memory the first verses of the "Divina Commedia" (Dante Alighieri). Note that the directives could be cut away, leaving only the text in the file:
Then, the resulting contents will be visible in the ROM Editor/Programmer (see the next figure):