Nov 7, 2010 #1 G gadagkar.rohit Junior Member level 2 Joined Apr 7, 2010 Messages 23 Helped 1 Reputation 2 Reaction score 1 Trophy points 1,283 Location San Jose Activity points 1,439 Hi, I need to generate a signal from MATLAB and store the data into a file and then use that file as an input to verilog code. i just need to know how to read a file in verilog. and in what format should the file be to be able to be read in verilog. can someone please help me with that.
Hi, I need to generate a signal from MATLAB and store the data into a file and then use that file as an input to verilog code. i just need to know how to read a file in verilog. and in what format should the file be to be able to be read in verilog. can someone please help me with that.
Nov 8, 2010 #2 Y yoramgr Member level 2 Joined Nov 4, 2010 Messages 42 Helped 6 Reputation 12 Reaction score 6 Trophy points 1,288 Location Israel Activity points 1,561 $readmemh() is very usful for such tasks. Need to define an array, the file should hold hex values (in text, not a binary file), readmemh loads the values into the array. google readmemh and you'll find a few examples.
$readmemh() is very usful for such tasks. Need to define an array, the file should hold hex values (in text, not a binary file), readmemh loads the values into the array. google readmemh and you'll find a few examples.