Essentially, how do I execute the vhdl, verilog or systemverilog generated in some open source simulator? I have ghdl for vhdl, iverilog for verilog, and nothing really for systemverilog (verilator translates to c++ but is ... not in a good enough condition to use, in my opinion, having examined the code quite closely).
OK, so it's not exactly "clash", but you must be testing the output SOMEHOW! What are you doing, if it is not these?
1) the vhdl generated contains a few __VOID__ constructs in just one module. The verilog and systemverilog do not.
process(vec_index_26,karg,__VOID__,x_18)
variable ivec_9 : testbench_types.array_of_maybe_98(0 to 3);
begin
ivec_9 := karg.iqueueentry_sel7_insn_reg_i;
ivec_9(vec_index_26) := std_logic_vector'("1" & (std_logic_vector(unsi
gned((std_logic_vector'((std_logic_vector(x_18))))))));
\c$app_arg_109\ <= ivec_9;
end process;
end block;
-- replace end
That was the kind of thing that appears. Is that translating something common, like a vector copy? (I've just glanced at it - I see no arithmetic operators, so what else can it be?)
What was the trick for getting references to the Clash code in? The systemverilog seems to have it - I don't know if I did anything special for that.
2) For verilog and iverilog, I have little idea what the words in the manual pages mean, because they seem to be using terms I have never heard of, or using common terms like "scope" in some special way that does not conform to the common meaning. I believe I am supposed to make a .vpp file which then can be executed by the runtime engine "vpp", and I have produced a 3GB file:
-rwxr-xr-x 1 ptb 3100909942 Apr 8 07:45 TestBench.vpp*
(file:) TestBench.vpp: a /usr/bin/vvp script, ASCII text executable, with very long lines
I ran "iverilog -oTestBench.vvp ....long list of .v files" (I think) to build that, and it dropped out about 17h later. But am I supposed to name some entry point, somehow? The manual talks about -mmodule as " Add this module to the list of VPI modules to be loaded by the
simulation." but what is the base set of modules and what do I have to add to that, if anything, and does "loaded" mean or imply "run", which is what I want, and what is a "module" in their terms, anyway! All clash has produced is files, with a v ending. There is no tie-up. What I want to do is run what is described in those files. HOW?
Can somebody give me an example, please. Surely you are doing something of the sort?
3) Does "testbench" mean something special to hardware folks? What? I want to run things as a test, not compare the output with the output from some previous run to get a boolean. I have defined via ANN something for synthesis that produces not a Bool signal, but the signal I am interested in seeing, which carries type Trace, for my data type Trace.
Is that going to work in a simulator? I have picked up the use of stopping the testbench clock at some point when the trace shows STOP from the example given in the Clash manual, but I have three clocks, at different speeds. Do all of them have to be stopped to stop the simulation? How?
My testbench function has no inputs, and just one output:
{-# ANN testbench32
(Synthesize { t_name = "TestBench"
, t_inputs = [ ]
, t_output = PortName "trace"
}) #-}
Is that going to work in a simulator? I noticed when looking at the verilator translator for systemverilog that their manual pages talked abut needing a clock signal to start the simulation. Should I be leaving the/a clock as an input rather than generating it internally?
When I run what is supposed to be the iverilog simulation engine over the vpp file, it produces some messages, but then just sits there at 100% cpu (in bursts). Does it
know what it is supposed to be doing, or how to display the output?
% vvp -Nsv TestBench.vpp
Compiling VVP ...
... VVP file version 12.0 (devel)
Compile cleanup...
... Linking
... Removing symbol tables
... Compiletf functions
... 14859537 functors (net_fun pool=649592832 bytes)
8788675 logic
0 bufif
0 resolv
100374 signals
... 14321292 filters (net_fil pool=1719140352 bytes)
... 5573941 opcodes (133914624 bytes)
... 6810502 nets
... 14859537 vvp_nets (832543936 bytes)
... 30677 arrays (1828926 words)
... 93 memories
93 logic (366248 words)
0 real (0 words)
... 3219839 scopes
... 402.589 seconds, 13306812.0/2151332.0/2804.0 KBytes size/rss/shared
Running ...
...execute EndOfCompile callbacks
...propagate initialization events
(and nothing).
Does any of that mean anything to anyone?
4) I am even more at sea with how to run ghdl on .vhdl files. It appears that I have to select an order of appearance on the command line, so things are defined before they are referenced.
The best I have managed is
ghdl -a --std=93c --workdir=. --work=testbench testbench_types.vhdl ... testbench.vhdl
but that finishes with various complaints due to the __VOID__ that appears in one of the files. Have I got the right standard? This one is (also) complaining about variables starting with "_" and containing two "_"s in a row. Other standards choices complain about other things. This one seems least conflictive.
Please can I have an example of execution of generated code on some (hopefully open source) simulation engine? Failing that, any hints at all are welcomed here, including translations of jargon words and concepts.
[I heard yesterday that a US patent has now been allowed for the underlying technology that this implements/exercses/demonstrates. Clash has allowed me to both test the underlying computational theory behaviorally and confirm it can be synthesized in conventional hardware, which was not a priori clear - now I would like to complete that direction of investigation by running the synthesised code. Perhaps I can get some timing bounds out!]