OVP Forums - A community of assistance, help, questions, and answers.
|
View previous topic :: View next topic |
Author |
Message |
NicoPan
Joined: 10 Apr 2014 Posts: 5
|
Posted: Mon Jan 09, 2017 3:49 am Post subject: Enviroment variable for peripheral sources. |
|
|
Hi, i'm working using igen for building an ovp plaform with tlm components. In this platform there is a peripheral written by me and i want to connect it to my platform but i dont want use the starndard paths ( putting the source in $IMPERAS_HOME/ImperasLib/source and the binary in $IMPERAS_HOME/lib/Linux32/ImperasLib ) but use paths chosen by me.
For the binary of the platform i have found that is enought to add my path to IMPERAS_VLNV enviroment variable but for the source i dont find anything. Can someone help me? |
|
Back to top |
|
 |
DuncGrah OVP Technologist

Joined: 27 Feb 2008 Posts: 1646 Location: United Kingdom
|
Posted: Tue Jan 10, 2017 2:49 pm Post subject: |
|
|
the best way to do this is to create your own VLNV source and binary libraries
First create the source VLNV library, for example (change myVendor and myPeripheral to something meaningful and use full <PATH> to directory)
Code: | # create directory
mkdir -p <PATH>/myLib/source/myVendor/peripheral/myPeripheral/1.0/pse
# copy a default Makefile
cp /c/Imperas/Examples/Models/Peripherals/packetnet/peripheral/Makefile <PATH>/myLib/source/myVendor/peripheral/myPeripheral/1.0/pse |
Add your own iGen and C files into this peripheral source directory
Now create your binary output root
Code: | mkdir -p myLib/lib/${IMPERAS_ARCH}
cp /c/Imperas/ImperasLib/source/Makefile <PATH>/myLib/source |
and build
Code: | make -C <PATH>/myLib/source VLNVSRC=<PATH>/myLib/source VLNVROOT=<PATH>/myLib/lib/${IMPERAS_ARCH} |
Now you can use this peripheral by specifying the new VLNV binary library, I would recommend including the standard command line parser and using the --vlnvroot <PATH>/myLib/lib/${IMPERAS_ARCH} command line argument rather than using the environment variable (but either can be used)
This information should also be in the Installation and Getting Started Guide (but I will need to check) |
|
Back to top |
|
 |
NicoPan
Joined: 10 Apr 2014 Posts: 5
|
Posted: Wed Jan 11, 2017 1:29 am Post subject: |
|
|
Thank you for the reply. I have yet follow this step and i have no problem with the binary path of my peripheral but when i try to copile the platform it try to find the tlm directory of the peripheral in $IMPERAS_HOME/ImperasLib/source and not where i have compiled my sources. |
|
Back to top |
|
 |
DuncGrah OVP Technologist

Joined: 27 Feb 2008 Posts: 1646 Location: United Kingdom
|
Posted: Wed Jan 11, 2017 1:38 am Post subject: |
|
|
Ah, yes, I see that the example TLM Makefile (Makefile.TLM.platform) is setup to build using the standard VLNV library. I suggest you take a copy and modify this Makefile to include your new library.
for example, add to SUPPORT_INCS the inclusion of the root of your source directory <PATH>/myLib/source, so it becomes
Code: | SUPPORT_INCS = \
-I$(ICM_INC) \
-I$(SYSTEMC_INC) \
-I$(IMPERAS_HOME)/ImperasLib/source \
$(MODEL_INCLUDES) \
-I<PATH>/myLib/source |
|
|
Back to top |
|
 |
NicoPan
Joined: 10 Apr 2014 Posts: 5
|
Posted: Wed Jan 11, 2017 11:23 am Post subject: |
|
|
thank you! :D |
|
Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Information regarding OVP © 2008-2022 Imperas Software
|