Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
16556 Discussions

customized component got overwriten

Altera_Forum
Honored Contributor II
1,000 Views

Hi, 

 

I have a customized AVMM slave device. I added the component in the QSYS. Everything works.  

 

However, every time after I make any changes to the source code of the component. If I compile it, Quartus overwrites all my changes. It doesn't matter if I run the QSYS to re-generate the code or not. I have to keep making changes at least twice or three times to make the change stay there. 

 

What happened? what overwrites the changes? How can I only make changes once? 

 

thanks 

Peng
0 Kudos
5 Replies
Altera_Forum
Honored Contributor II
256 Views

I don't understand. Your source code file (.v or .vhd) is getting overwritten and reverted back to a prior state? Do you mean the _hw.tcl file is getting overwritten? 

 

In any case, if you make changes to a custom component's source code, it's a good idea to go back into the Component Editor (right click the component in the IP Catalog and select Edit), re-analyze the design on the Files tab, and click OK to recreate the _hw.tcl file. 

 

I think some more detail about exactly what is wrong is required here.
0 Kudos
Altera_Forum
Honored Contributor II
256 Views

Most likely, for a custom component like the one you have produced, Qsys "generate" results in copying source files from their original locations to the (e.g.) synthesis/submodules/ directory of your project outputs. 

 

The "solution" is of course to only modify the sources, and not their copies located within the synthesis/submodules/ folder. 

 

But then you get caught up in the fact that modifying the source then requires you to re-generate Qsys before you invoke Quartus synthesis. 

 

From the sounds of it, when you state that Quartus is picking up old files and overwriting your modified files, if you have added the .qsys file to Quartus then Quartus will execute the Qsys generate prior to synthesis. 

 

So... 

a) if your .qsys is added to your Quartus project, then just modify the component source files and not the files in synthesis/submodules. 

b) if you have added the Qsys created .qip file to your Quartus project, then again you should just modify the source to your component and not the synthesis/submodules/ copies, BUT you need to Qsys generate before each Quartus recompile. 

c) if you have added the Qsys created .qip and haven't performed a Qsys generate, then I don't know what your problem is....
0 Kudos
Altera_Forum
Honored Contributor II
256 Views

Yes, I make changes to my source code (*.v), and start compilation. The source code was reverted back to prior state. I have to make the change again, then the changes stay. It doesn't matter if I run the component analysis or not, nor re-generate the HDL code in the QSYS helps. It's like deja vu all day. Don't know what is wrong with the Quartus. 

 

I'm using Quartus Lite 16.1, working on DE1 evaluation board . I added a customized AVMM slave component in the GHRD.
0 Kudos
Altera_Forum
Honored Contributor II
256 Views

This sounds more likely. I'll check those items. Thanks for all those detail info. 

 

Peng 

 

 

 

--- Quote Start ---  

Most likely, for a custom component like the one you have produced, Qsys "generate" results in copying source files from their original locations to the (e.g.) synthesis/submodules/ directory of your project outputs. 

 

The "solution" is of course to only modify the sources, and not their copies located within the synthesis/submodules/ folder. 

 

But then you get caught up in the fact that modifying the source then requires you to re-generate Qsys before you invoke Quartus synthesis. 

 

From the sounds of it, when you state that Quartus is picking up old files and overwriting your modified files, if you have added the .qsys file to Quartus then Quartus will execute the Qsys generate prior to synthesis. 

 

So... 

a) if your .qsys is added to your Quartus project, then just modify the component source files and not the files in synthesis/submodules. 

b) if you have added the Qsys created .qip file to your Quartus project, then again you should just modify the source to your component and not the synthesis/submodules/ copies, BUT you need to Qsys generate before each Quartus recompile. 

c) if you have added the Qsys created .qip and haven't performed a Qsys generate, then I don't know what your problem is.... 

--- Quote End ---  

0 Kudos
Altera_Forum
Honored Contributor II
256 Views

Ted, thanks for all those clues. What I found out matches what you said. 

 

Basically, when I double click the module under Project Navigator. It brought up the file in the synthesis/submodules/ directory, which is a copy of the original source code. That explains the reason that any change in this file did go to the original source code.  

 

BTW, when you check the file property of the module in the project navigator. It actually points to the original source code, not the file synthesis directory. That's kind of miss-leading.  

 

 

 

 

--- Quote Start ---  

Most likely, for a custom component like the one you have produced, Qsys "generate" results in copying source files from their original locations to the (e.g.) synthesis/submodules/ directory of your project outputs. 

 

The "solution" is of course to only modify the sources, and not their copies located within the synthesis/submodules/ folder. 

 

But then you get caught up in the fact that modifying the source then requires you to re-generate Qsys before you invoke Quartus synthesis. 

 

From the sounds of it, when you state that Quartus is picking up old files and overwriting your modified files, if you have added the .qsys file to Quartus then Quartus will execute the Qsys generate prior to synthesis. 

 

So... 

a) if your .qsys is added to your Quartus project, then just modify the component source files and not the files in synthesis/submodules. 

b) if you have added the Qsys created .qip file to your Quartus project, then again you should just modify the source to your component and not the synthesis/submodules/ copies, BUT you need to Qsys generate before each Quartus recompile. 

c) if you have added the Qsys created .qip and haven't performed a Qsys generate, then I don't know what your problem is.... 

--- Quote End ---  

0 Kudos
Reply