Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

DDR3 micron simulation help

Status
Not open for further replies.

yuvalkesi

Member level 5
Joined
May 13, 2009
Messages
92
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
2,036
Hi,
I'm trying to simulate the DDR3 along with Micron model in Modelsim but no luck.
I keep getting this error:
# tb.sdramddr3_0.file_io_open: at time 0.0 ns WARNING: no +model_data option specified, using /tmp.
# ** Warning: (vsim-3533) [FOFIW] - Failed to open file "/tmp/tb.sdramddr3_0.open_bank_file.0" for writing.
# No such file or directory. (errno = ENOENT) : E:/user/ddr_sim/ddr3.v(622)

ANy help from someone who did it?
Thx,
Ron
 

From the warning it looks like it can't open the tb.sdramddr3_0.open_bank_file.0 in the /tmp directory. Is that directory write protected or non-existent?
 

From the warning it looks like it can't open the tb.sdramddr3_0.open_bank_file.0 in the /tmp directory. Is that directory write protected or non-existent?

Thanks for your reply.
First, this directory does not exist, so I created it (didn't help, though), but still - tb.sdramddr3_0.open_bank_file.0, there's no such file. The open_bank_file is a function generated inside ddr3.v file, and it is surely not a filename, so I don't understand how it bacame a filename. I can add the code for you to see if you want...
 

Sure post the code, I or someone else might have some insight as to what is going on.

regards
 

Hi,
Attached.
look for 'open_bank_file' function.
Thank you!
 

Attachments

  • ddr3.v.txt
    159.7 KB · Views: 64

/tmp would be a typical unix path. If you're a windoze user then you should change that /tmp directory to something that does exist on your system. E:\user\ddr_sim for example, if that's appropriate in your case.
 

Ok, did it...
now Modelsim shows this:
** Warning: (vsim-3533) [FOFIW] - Failed to open file "e:/user/abc/ddr_sim//tb.sdramddr3_0.open_bank_file.0" for writing.
# No such file or directory

where is it getting its filename from???

Thanks
 

And does directory "e:/user/abc/ddr_sim actually exist on your system?

It gets the filename from that testbench no doubt. I see a couple of "open_bank_file" references in there.
 

Of course...
What I don't understand is where does it get its filename "tb.sdramddr3_0.open_bank_file.0" from.
It put brackets on it as if it was a filename.
The sdramddr3_0 is the intantiation module name. It is not a filename. The open_bank_file is a function. It is not a filename.
 

Of course...
Heh, to you this may be "of course". To me, I never assume such trivial stuff has actually been checked on the other side of the screen. ;) In fact, I currently still am not 100% convinced, given the error message. ;)

The sdramddr3_0 is the intantiation module name. It is not a filename. The open_bank_file is a function. It is not a filename.
I noticed it was not a filename. But as said, the testbench does have that direct reference in it, which is round about zero coincidence. Up to you (or someone else who feels like it) to trace it down a bit further in that testbench. Or by running the testbench and checking the variables...

Also note the double slash in that filename. Shouldn't be an issue per se, but it might be indicative of an empty string used while building up the path name. Just something to be aware of.
 

The file name being created is "0" with a %m tacked on in front of it (lists the hierarchical path).


Code Verilog - [expand]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// this sets the filename for writing:
    initial
    begin : file_io_open
//...
        for (integer i = 0; i < `BANKS; i = i + 1)
            memfd[i] = open_bank_file(i);
 
 
// this function opens the file:
    function integer open_bank_file( input integer bank );
        integer fd;
        reg [2048:1] filename;
        begin 
            $sformat( filename, "%0s/%m.%0d", tmp_model_dir, bank ); // filename is constructed from these items.
            fd = $fopen(filename, "wb+");



I've left out a bunch of extraneous stuff that doesn't really make a difference.

My suggestion is change the $sformat line to something that makes more sense on a windows machine (like a format string of "bank_file_%0d" which will leave it in the simulation directory. You can later play around with moving it to some other output directory after you get it working.

BTW, It might be useful if you do some reading on Verilog file I/O system tasks. Most of this would have been easy for you to figure out if you had the background in using those system tasks. It's worth the effort of learning as it comes in handy when you need to capture data in your testbench.


regards
 
Last edited:

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top