[問題] Verilog Icarus complier include 問題
小弟有兩個 .v file 如下
===============abc.v======================
module abc(iclk, irst, ocnt);
input iclk, irst;
output [3:0] ocnt;
reg [3:0] ocnt;
always@(posedge iclk, posedge irst)
begin
if (irst)
ocnt <= 0;
else
ocnt <= ocnt + 1;
end
endmodule
=============abcTB.v======================
'include "abc.v";
module abcTB();
reg clk, rst;
wire [3:0] cnt;
initial begin
clk = 0;
rst = 0;
#10 rst = 1;
#10 rst = 0;
end
always #10 clk = ~clk;
abc g(clk, rst, cnt);
initial
begin
$dumpfile("abc.vcd");
$dumpvars;
end
endmodule
====================================================
在windows底下進行compile
iverilog -o main_design abcTB.v abc.v
卻得到
abcTB.v:1: syntax error
I give up.
請問iverilog 若要include module file要如何使用?
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 1.34.174.37
※ 文章網址: https://www.ptt.cc/bbs/Electronics/M.1495150438.A.F84.html
推
05/19 12:57, , 1F
05/19 12:57, 1F
→
05/29 20:42, , 2F
05/29 20:42, 2F