UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Observer malharjere
Observer
492 Views
Registered: ‎12-11-2017

$display function question

I have a Kintex KC705 with Vivado 2017.4. I have a binary file called "malharjere" that is 10 bytes long and contains the string "malharjere". I have the following code to load it into memory:

 

module PRBG(a,b);

input a;
output reg b;
reg[9:0] data[7:0];

initial $readmemh("malharjere", data);

integer i;

initial begin
$display("rdata");
for (i = 0; i < 8; i=i+1)
$display("%d: %h", i, data[i]);
end

always @ (posedge a) begin
b <= $random(a);
end

endmodule

module PRBG(a,b);

input a;
output reg b;
reg[9:0] data[7:0];

initial $readmemh("malharjere", data);

integer i;

initial begin
$display("rdata");
for (i = 0; i < 8; i=i+1)
$display("%d: %h", i, data[i]);
end

always @ (posedge a) begin
b <= $random(a);
end

endmodule

 

When I synthesize, implement and open the RTL schematic, I don't see the hex values for "malharjere" anywhere in my schematic. Additionally, when I print them to console using the $display function I don't see the values appear anywhere on the Tcl console. Am I missing something here? How do I see the hex values of the file I uploaded in RTL schematic or in the Tcl console?

0 Kudos
1 Reply
Mentor watari
Mentor
469 Views
Registered: ‎06-16-2013

Re: $display function question

Hi @malharjere

 

First of all, $display function doesn't support synthesis, implement. It only support simulation.

 

I suggest to implement BRAM with initial data and/or randomize logic, if you want to do.

 

Best regards,

 

0 Kudos