From 6b373a49559a4bcba1ee9dafe7d1949098328da4 Mon Sep 17 00:00:00 2001
From: Erik Kooistra <kooistra@astron.nl>
Date: Thu, 5 Feb 2015 06:49:31 +0000
Subject: [PATCH] Added description of modelsim_compile_ip_files key. Added 4c)
 Replace SOPC avs2_eth_coe instance.

---
 tools/hdltool_readme.txt | 33 +++++++++++++++++++++++++++++++--
 1 file changed, 31 insertions(+), 2 deletions(-)

diff --git a/tools/hdltool_readme.txt b/tools/hdltool_readme.txt
index edeaabcb38..c62a7c683c 100644
--- a/tools/hdltool_readme.txt
+++ b/tools/hdltool_readme.txt
@@ -21,6 +21,9 @@ Contents:
   d) hdllib.cfg key descriptions 
   
 4) Porting from $UNB to $RADIOHDL
+  a) History
+  b) Use SVN-copy
+  c) Replace SOPC avs2_eth_coe instance
 
 5) Build directory location
 
@@ -253,7 +256,7 @@ GUI:
 For command line scripts use the unb_* scripts. See ASTRON_RP_1354_unb_minimal.pdf for more description.
 
 
-
+  
 3) HDL environment configuration files
 
 a) Tools and libraries
@@ -267,6 +270,8 @@ The HDL libraries can define a module library with VHDL that is reused in other
 with a top level entity that maps on the IO of the FPGA. For the hdllib.cfg there is no difference between
 a module library or a design library, they are all HDL libraries.
 
+The hdllib.cfg typically points to sources that are located in the same directory or in its subdirectories.
+However the sources can be located elsewhere, the hdllib.cfg can refer to sources at any location.
 
 b) Target configuration scripts
 
@@ -340,6 +345,12 @@ d) hdllib.cfg key descriptions
     Global root path (e.g. $HDL_BUILD_DIR) or local library path (e.g. '') to the build directory for simulation. The path gets extended with the
     tool_name_synth from hdltool.cfg.
 
+- modelsim_compile_ip_files =
+    This key lists one or more TCL scripts that are executed by the Modelsim mpf before it compiles the rest of the source code. Eg:
+    - compile_ip.tcl : a TCL script that contains external IP sources that are fixed and need to be compiled before the synth_files. For
+                       the Altera IP the compile_ip.tcl is derived from the msim_setup.tcl that is generated by the MegaWizard or Qsys.
+    - map_ip.tcl : a TCL script that maps a VHDL library name to another location.
+    
 - modelsim_search_libraries =
     List of IP technology search libraries that will be put in the -L {} option of a Modelsim simulation configuration in the mpf. This avoids that all
     IP technology needs to be compiled into the work library. The -L {} option is needed for simulations in libraries that use generated IP like
@@ -387,6 +398,8 @@ d) hdllib.cfg key descriptions
 
 4) Porting from $UNB to $RADIOHDL
 
+a) History
+
 First the base modules have been ported, e.g. common, dp. Only the files that need to change are SVN copied from their location
 in $UNB to $RADIOHDL. Files that remain unchanged are referred to from $UNB in the hdllib.cfg.
 Initially only Modelsim simulation is supported in $RADIOHDL by means of modelsim_config.py. The first design to be ported is
@@ -394,9 +407,25 @@ unb_minimal, but that requires tse and unb_common to be ported first.
 Major renamings have been done for tse --> eth and unb_common --> unb1_board to make the code more clean. The eth_layers_pkg
 has been split into common_network_layers_pkg.vhd (for Ethernet protocol parameters) and common_network_total_header_pkg.vhd (for
 representing the header in an array of word).
-No functional changes re done, only cosmetic to make the code more clean. The changes are guarded by the tb_tb_tb_*_regression.vhd
+No functional changes are done, only cosmetic to make the code more clean. The changes are guarded by the tb_tb_tb_*_regression.vhd
 test benches for eth and unb1_board that are self-checking and must run without errors.
 
+b) Use SVN-copy
+
+When a source file needs to be modified then it is appropriate to SVN-copy it to the $RADIOHDL tree.
+In this way the $UNB tree remains stable, while new developments can continue savely in the $RADIOHDL
+tree. Best use SVN-copy instead of plain cp, because SVN-copy preseves the revision log.
+
+c) Replace SOPC avs2_eth_coe instance
+   
+Replace in SOPC instance avs_eth_0 with avs_eth_coe by avs2_eth_coe. The eth now uses eth_pkg.vhd from
+$RADIOHDL. The avs_eth_coe still uses the eth_pkg.vhd from $UNB and this causes duplicate source file
+error in synthesis. Therefore open the SOPC GUI and replace the instance avs_eth_0 with avs_eth_coe by
+the avs2_eth_coe component.
+   
+Make sure that the user_component.ipx is set up oke (see point 2e), because that is needed for SOPC to
+find the new avs2_eth_coe in $RADIOHDL.
+
 
 
 5) Build directory location
-- 
GitLab