Also, consistently use 'ch' for channel variables. This matches how we
consistently use sdi, devc, and so on all over the code-base.
This fixes parts of bug #259.
Instead of >= 44 Makefile.am's we now only have one top-level
Makefile.am, and use the 'subdir-objects' automake option to
handle the build via non-recursive (auto)make.
This has the advantage of fewer (boilerplate or other) files and less
clutter in general, as well as performance advantages since the new
setup can build many files in parallel (with 'make -j'), not only 2 or 3
files within the same (e.g. hardware/xxxx/* subdirectory) and also since
we no longer need to build intermediate libtool helper libs per subdirectory.
A quick, non-scientific test build on a quad-core laptop with 'make -j 4'
yields a build time reduction from 35s to 19s.
All autotools features that worked before are still intact without any
regressions, including the Make targets 'install', 'uninstall', 'check',
'dist', 'clean', 'distclean' and so on, as well as all the usual portability
handling (build works on any OS, with any Make implementation such as
GNU Make or BSD Make, with any shell such as sh/ksh/zsh/bash/dash, etc. etc.)
and features such as out-of-tree build support, cross-compile support,
testsuite support (also with colored output), "silent make rules", etc. etc.
These commands are superfluous and do not seem to make sense in
the context they were used. Also, $dumpvars was missing an $end,
and $dumpoff was used without any content.
Avoid writing a new timestamp for every changed signal if multiple
signals change state simultaneously. Also, keep signal transitions
on the same line with their timestamp to make the output easier to
inspect in a text editor. (VCD does not care whether newlines or
spaces are used to separate tokens.)
(receive): Use probe index for sample byte selection too, not just
for bit selection. Also simplify the indexing expressions a bit.
This fixes the problem of incorrect output for probes indices 8 to
31.
Also, use double rather than float in the timestamp calculation,
and format the result directly as floating point number rather than
converting it back to uint64_t.
Additionally, make sure that the state of all signals is written
for the very first sample in the stream. This fixes the problem
that signals would be displayed as indeterminate until the first
change.
(context.samplecount): Make the sample counter part of the context
struct, rather than keeping it as a global static.
The text output module keeps buffers for internal state, upon receiving a DF_END
packet it frees the internal context but the buffers are never freed.
This adds a text_cleanup() helper function and registers it as the cleanup
function within all the text output modules.
The comment for the CSV output module says probes are ordered e.g.
0,1,2,3, but the actual values were in the 3,2,1,0 order.
We're fixing this by making the order of the probe values 0,1,2,3 too
for now, but this will become a configurable option later on.
Thanks Patrick Servello <patrick.servello@gmail.com> for the patch.
This obviates the need for a valid driver, and thus makes converting
from any (non-sr) input format to any output format possible; the only
thing missing is the samplerate.
Fixes bug 105.
This changes the new output API's recv() to receive(), and has it
return an integer status code. The output of the function, if any,
is stored in a new parameter as a pointer to a newly allocated GString.
All output modules using this API have been adjusted.
On Windows/MinGW 'recv' seems to be already defined in windows.h/winsock2.h.
Use 'receive' instead, for now, otherwise we get an error:
vcd.c:147:17: error: conflicting types for 'recv'