R
Robert Au
Guest
I am using Cadence LDV 5.1 and found out the following inconsistency
between $display and $swrite.
reg [159:0] mem_file;
reg [1023:0] full_name;
$value$plusargs("MEM_FILE=%s", mem_file);
$display("This is display: %0s.%0h\n", mem_file, 1);
$swrite(full_name, "%0s.%0h", mem_file, 1);
$display("This is swrite: %0s\n", full_name);
Output will show
This is display: mem_file.1
This is swrite: mem_file.00000001
How to fix it?
between $display and $swrite.
reg [159:0] mem_file;
reg [1023:0] full_name;
$value$plusargs("MEM_FILE=%s", mem_file);
$display("This is display: %0s.%0h\n", mem_file, 1);
$swrite(full_name, "%0s.%0h", mem_file, 1);
$display("This is swrite: %0s\n", full_name);
Output will show
This is display: mem_file.1
This is swrite: mem_file.00000001
How to fix it?