ghdl compilation of VST files: HFNS net names the same as instance names
VHDL 2008 does not allow net names to be the same as instances. example:
/home/lkcl/src/libresoc/soc-cocotb-sim/ls180/post_pnr/vst_src/add_cts.vst:1785:3:error: identifier "sys_rst_from_pad_hfns_6" already used for a declaration
sys_rst_from_pad_hfns_6 : buf_x8
^
/home/lkcl/src/libresoc/soc-cocotb-sim/ls180/post_pnr/vst_src/add_cts.vst:356:10:error: previous declaration: port "sys_rst_from_pad_hfns_6"
diff --git a/etesian/src/HFNS.cpp b/etesian/src/HFNS.cpp
index 88ce5217..b12bbd30 100644
--- a/etesian/src/HFNS.cpp
+++ b/etesian/src/HFNS.cpp
@@ -223,8 +223,11 @@ namespace Etesian {
string driverName = getSubNetNames()->getSubNetName();
Net* blockNet = NULL;
Path outputPath = Path();
+ string instanceName;
- _buffer = Instance::create( cellPnR, driverName, bufferDatas->getCell() );
+ // instance must be different from signal name (ghdl --std=08)
+ instanceName = string("cmpt_") + driverName;
+ _buffer = Instance::create( cellPnR, instanceName, bufferDatas->getCell() );
getSubNetNames()->nextSubNet();
_driverNet = Net::create( topCell, driverName );