Commentary; fix example here documents.
This commit is contained in:
parent
3ebd6915f3
commit
bac5d32582
|
@ -1746,13 +1746,13 @@ We'll compile this example into C++.
|
||||||
mkdir test_our
|
mkdir test_our
|
||||||
cd test_our
|
cd test_our
|
||||||
|
|
||||||
cat <<EOF >our.v
|
cat >our.v <<'EOF'
|
||||||
module our;
|
module our;
|
||||||
initial begin $display("Hello World"); $finish; end
|
initial begin $display("Hello World"); $finish; end
|
||||||
endmodule
|
endmodule
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
cat <<EOF >sim_main.cpp
|
cat >sim_main.cpp <<'EOF'
|
||||||
#include "Vour.h"
|
#include "Vour.h"
|
||||||
#include "verilated.h"
|
#include "verilated.h"
|
||||||
int main(int argc, char** argv, char** env) {
|
int main(int argc, char** argv, char** env) {
|
||||||
|
@ -1815,7 +1815,7 @@ This is an example similar to the above, but using SystemC.
|
||||||
mkdir test_our_sc
|
mkdir test_our_sc
|
||||||
cd test_our_sc
|
cd test_our_sc
|
||||||
|
|
||||||
cat <<EOF >our.v
|
cat >our.v <<'EOF'
|
||||||
module our (clk);
|
module our (clk);
|
||||||
input clk; // Clock is required to get initial activation
|
input clk; // Clock is required to get initial activation
|
||||||
always @ (posedge clk)
|
always @ (posedge clk)
|
||||||
|
@ -1823,7 +1823,7 @@ This is an example similar to the above, but using SystemC.
|
||||||
endmodule
|
endmodule
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
cat <<EOF >sc_main.cpp
|
cat >sc_main.cpp <<'EOF'
|
||||||
#include "Vour.h"
|
#include "Vour.h"
|
||||||
int sc_main(int argc, char **argv) {
|
int sc_main(int argc, char **argv) {
|
||||||
Verilated::commandArgs(argc, argv);
|
Verilated::commandArgs(argc, argv);
|
||||||
|
@ -2359,7 +2359,7 @@ In the below example, we have readme marked read-only, and writeme which if
|
||||||
written from outside the model will have the same semantics as if it
|
written from outside the model will have the same semantics as if it
|
||||||
changed on the specified clock edge.
|
changed on the specified clock edge.
|
||||||
|
|
||||||
cat <<EOF >our.v
|
cat >our.v <<'EOF'
|
||||||
module our (input clk);
|
module our (input clk);
|
||||||
reg readme /*verilator public_flat_rd*/;
|
reg readme /*verilator public_flat_rd*/;
|
||||||
reg writeme /*verilator public_flat_rw @(posedge clk) */;
|
reg writeme /*verilator public_flat_rw @(posedge clk) */;
|
||||||
|
@ -2370,7 +2370,7 @@ changed on the specified clock edge.
|
||||||
There are many online tutorials and books on the VPI, but an example that
|
There are many online tutorials and books on the VPI, but an example that
|
||||||
accesses the above signal "readme" would be:
|
accesses the above signal "readme" would be:
|
||||||
|
|
||||||
cat <<EOF >sim_main.cpp
|
cat >sim_main.cpp <<'<<EOF'
|
||||||
#include "Vour.h"
|
#include "Vour.h"
|
||||||
#include "verilated.h"
|
#include "verilated.h"
|
||||||
#include "verilated_vpi.h" // Required to get definitions
|
#include "verilated_vpi.h" // Required to get definitions
|
||||||
|
|
Loading…
Reference in New Issue