As there are no answers to your question yet, allow me to describe a hack that I would use myself. Hopefully it attracts attention to the question for other answers. I am a Linux user myself, but read on there are some Windows pointers once you read through the Linux part. Do browse through the Linux paragraph first though.
As a generic solution to this problem, here is how I would try to figure out what files are needed:
Linux
On Linux I'd run the program from command line as follows:
strace -fe trace=file programUnderTest > /tmp/logfile 2>&1
The strace
program is tracing all system calls executed by programUnderTest
. It filters for file
events and the -f
flag instructs to follow child processes too. The output is saved to /tmp/logfile
Very important, build the entire project while logging. Also after building the project save it under a unique file name; this will act as a marker in the logging, then quit the program. The contents of the logfile looks like this:
open("/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
open("/dev/tty", O_RDWR|O_NONBLOCK) = 3
open("/usr/lib/locale/locale-archive", O_RDONLY|O_CLOEXEC) = 3
open("/proc/meminfo", O_RDONLY|O_CLOEXEC) = 3
stat(".", {st_mode=S_IFDIR|0700, st_size=15104, ...}) = 0
open("/usr/lib/x86_64-linux-gnu/gconv/gconv-modules.cache", O_RDONLY) = 3
Process 3207 attached
[pid 3207] stat(".", {st_mode=S_IFDIR|0700, st_size=15104, ...}) = 0
[pid 3207] stat("/usr/lib/lightdm/lightdm/id", 0x7fff6fee1840) = -1 ENOENT (No such file or directory)
[pid 3207] stat("/usr/local/sbin/id", 0x7fff6fee1840) = -1 ENOENT (No such file or directory)
[pid 3207] stat("/usr/local/bin/id", 0x7fff6fee1840) = -1 ENOENT (No such file or directory)
[pid 3207] stat("/usr/sbin/id", 0x7fff6fee1840) = -1 ENOENT (No such file or directory)
...
I personally like to use vi if it is a one time job to search through the data.
Find the first occurrence of your project file and delete all lines before that.
/open(".*theProjectFile # Find first occurrence of the project file being opened
:1,. d # Delete all lines before that marker
Then find the first occurrence of the file you saved and remove all lines after that.
/\tmp\/bladibla # Find first occurrence of the project file being saved
:.,$ d # Delete all lines after that marker
These are example commands to clean up the remaining data:
:1,$ ! grep '"' # Filter lines that contain a string in quotes, a "filename"
:1,$ s/^[^"]*"// # Remove leading characters for each line
:1,$ s/".*$// # Remove trailing characters for each line
:1,$ ! sort -u # Sort the file names, listing every occurrence once
Next is being amazed of which files are actually tested/accessed ...: device files, fonts, global system config files, ... and the actual files that you are interested are in between them ... libraries, source files, temporary files but also executables. If you are aware of a directory name where your files reside, you can search for that directory and filter on that.
Windows
When working on Windows, the concept would be the same, but the system will by default lack the tools that are pretty standard on Linux. I am not a Windows user myself so I haven't tested any of the tools below, but it looks like:
Moo0 FileMonitor
seems to do the job you're looking for, but there are bound to be other options too if you search the Internet.
- On a side note, cygwin can supply you with the powerful Linux commandline tools (
sort
, uniq
, grep
, vi
, ...) like used above for filtering.
A sneaky hack would be to set up a Linux SAMBA server (Windows compatible file server) that hosts your project files and on which you trace SAMBA access. Then mount that share on the Windows box and off you go ...
Best Answer
This is an old question, but I couldn't find this information anywhere so I think it's helpful to add it here!
In Libero you can go to File -> Export Script File... and export a Tcl script with the commands that have been run in your current project - importing files, creating IP etc. If you create an IP core and then export the script file, you will see the basic building block for instantiating the IP, although none of your configuration options will be shown.
The following is what I got for instantiating a BIBUF, for example. Almost there, but not quite!
create_design -id {Actel:SgCore:IO:1.0.101} -design_name {sram_bidir} -config_file {} -params {} -inhibit_configurator 0
You can see the
-params{}
field in this command. This is what you use to configure the core, but annoyingly it's always empty in the exported script!At least for the cores I have used, I have not found any documentation on the parameter names. Instead, I navigate my file explorer to the component definition in the Libero project directory structure: e.g.
In this folder there is a ".cxf" file, which is basically an XML file with all the core's parameters defined. The parameters for the core are those contained in the
<configurableElement>
tag e.g. for the BIBUF:<configurableElement referenceId="IO_TYPE" value="BIBUF"/>
This information can then be used to configure the core in the Tcl command as follows:
create_design -id {Actel:SgCore:IO:1.0.101} -design_name {sram_bidir} -config_file {} -params {IO_TYPE:BIBUF} -params {WIDTH:32} -inhibit_configurator 0
It's a bit trial and error, but I have gotten several cores working this way.