[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: gEDA-user: Icarus Verilog: specify path for $readmemh?



Günter Dannoritzer wrote:
> Hi,
> 
> I am using the system task $readmemh to init some ROM. Now my question
> is, can I specify for the simulation with Icarus somewhere the path to
> the file I am using with $readmemh?

I can think of 2 ways:

You can use $value$plusargs at run time to get the path you want
to use at run time as an extended argument to the vvp command.
This won't work for synthesis, though.

You can replace your text with a macro, and define that macro in
your Makefile (-D) or your iverilog commands file (+define+). This
will work with synthesis because you can also pass the correct
definition of the path to your synthesizer command line.


> In rtl/ and tb/ I have my RTL implementation and in tb/ the test
> benches. In the sim/ folder I have a Makefile that does the compilation
> and simulation with Icarus Verilog. Now the $readmemh call is in some
> code in the rtl/ folder. The way I solved the path issue is that I moved
> the file that is read with the $readmemh call in the sim/ folder.
> 
> Now the conflict happens with synthesis. In the syn/ folder I have a
> Makefile that calls synthesis with Xilinx webpack/ISE. It expects the
> file that is read in with the $readmemh call is in the rtl/ folder.
> 
> I guess I could copy the ROM file in both locations or specify some
> macros and have two different $readmemh calls.
> 
> Anyhow, is there a way to tell Icarus that the ROM file to be read with
> $readmemh is in another location than the folder the simulator
> (compiler) is called from? I did not find a command line switch that
> would apply to that issue.
> 
> Thanks for the help.
> 
> Guenter
> 
> 
> 
> _______________________________________________
> geda-user mailing list
> geda-user-3OLirty5fqqAvZLjymCQLg@xxxxxxxxxxxxxxxx
> http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
> 


-- 
Steve Williams                "The woods are lovely, dark and deep.
steve at icarus.com           But I have promises to keep,
http://www.icarus.com         and lines to code before I sleep,
http://www.picturel.com       And lines to code before I sleep."


_______________________________________________
geda-user mailing list
geda-user@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user