Haval Elias
unread,Jun 23, 2022, 11:55:47 PM6/23/22You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
Hi all,
I am trying to read the first 200 rows in MNIST file which contains grayscale data 0-255 in each column using $readmemh and I don't think it is reading the file correctly is there a better way to this? your help is really appreciated.
here is my testbench code in Verilog. also if possible how can I find the dot products between two rows? For example, sum of products of the first row with the second one?
`timescale 1ns / 1ns
module readmem_tb;
parameter num=3136;
reg [num:0] mem [0:2*num];
initial
$readmemh("MNIST200.txt", mem);
integer k;
initial
begin
#10;
$display("Contents of Mem after reading data file:");
for (k=0; k< 6; k=k+1)
$display("%d:%h",k,mem[k]);
end
endmodule