Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
20 years ago

Custom Components

I have created a custom component and incorporated VHDL code to define the components functionality. If I change the architecture of the VHDL code ONLY (i.e. the interface signals remain unchanged) can I just recompile or do I have to go and use the component editor to remove the VHDL file and then re-add it again to the component

12 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    I am still not 100% clear how this works. I now realise that within my design directory the SOPC Builder created a HDL directory. Within it, it made a copy of the VHDL code that I added to my custom component. However I am still unclear which code I should be changing. At the present time I am saving the changed code both in the design directory and lower HDL directory. I then comile the design at the top level without going into the SOPC Builder at all (i.e. without even re-generation). I see this process has an effect on how the altera board I am playing with reacts, thus I will continue in process for the time being. However from my above observation I would have thouht that I only would need to save the change to the code in the design directory and possibly this new code should be copied into the lower HDL directory ? But does this only happenn if I regenreate ? or maybe only when I add a new instantiation of the component ? or even only when I add new VHDL code to the component ? The other problem is that I found the following problem when I only changed the code in the design directory as I mentioned above :-

    "I tried a couple of times changing my original vhdl code (in my design directory) that I had added to my custom component (even recompiling it) and then compiled the system as a whole at the upper level. I found that my updated version of VHDL code was over written by the old version. I tried different things. I removed the component within SOPC Builder and re-instantiated it (then re-gnerated and then compiled the whole design), I even openned and closed the component editor without making any changes to the component. All with the same result. The only way I manage to incorporate the new VHDL code into the component was to go into the component editor in SOPC Builder and delete the VHDL code that was associated with the custom component and re-add the code to the component. This is very time consuming especially with generation and compilation of the upper design - is there a faster method ?
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    If you just copy the new vhdl sources to the project directory, they will be used when compiling the project(without re-generating in SOPC builder).

    This does not affect the component, however. The files in the component's HDL directory are used, when you re-generate in SOPC builder. As Avishay said, if you change the interface of the component, it must be edited with component editor.