Guest
I am trying to concatenate two strings with `define macro definition, it does not work. Any help would be greatly appreciated.
module tb;
`define ROOT_DIR "C:/tmp
`define MYFILE `ROOT_DIR/mysigfile.txt"
reg clk;
integer fh_testsig;
initial begin
clk = 0;
fh_mysigfile = $fopen(`MYFILE, "w");
end
always #5 clk = ~clk;
always @ ( posedge clk) begin
$fwrite(fh_mysigfile, "%1b\n", clk);
end
endmodule
-Carl
module tb;
`define ROOT_DIR "C:/tmp
`define MYFILE `ROOT_DIR/mysigfile.txt"
reg clk;
integer fh_testsig;
initial begin
clk = 0;
fh_mysigfile = $fopen(`MYFILE, "w");
end
always #5 clk = ~clk;
always @ ( posedge clk) begin
$fwrite(fh_mysigfile, "%1b\n", clk);
end
endmodule
-Carl