Altera_Forum
Honored Contributor
16 years agoSetting a custom component class name
Hi everyone!
I have an SOPC system with some custom components. It was working fine while I was writing some testing software running under uCOS/II, but now when trying to use them under Ecos I'm facing a problem with the automatic generation tools. I don't think the problem is (only) Ecos-related, so I prefer to post my message here. The problem is that I can't set the class names of my components. If I go in the .ptf file generated by SOPC builder after the system generation, I find for each of my components the following lines: class = "no_legacy_module";
class_version = "7.080900";
gtf_class_name = "my_component_name";
gtf_class_version = "0.1"; My component name in the gtf_class_name is the correct one, but I always get the class = "no_legacy_module" line on each of my custom components. Then when I build the Ecos OS for my board, the gtf-generate script picks up the wrong class name and inserts this line in devices.h to instantiate the driver: NO_LEGACY_MODULE_INSTANCE(MY_COMPONENT_NAME, my_component_name) which makes it rather messy, especially if I have several components in the same system. I've tried all kind of magic in the *_hw.tcl file to set the class name, including the undocumented "className" parameter that I found in some of Altera's components, but nothing seems to work. In fact the rare Altera components that don't have a class.ptf file have the same problem. Here is the line generated for the Cyclone III remote update component: NO_LEGACY_MODULE_INSTANCE(REMOTE_UPDATE_CYCLONEIII, remote_update_cycloneiii) What's the difference between "class" and "gtf_class_name"? Where does this "no_legacy_module" come from? And what do you think I should do? 1) trash my *_hw.tcl file and use a good old class.ptf for my component, as Altera is still doing on most of their IPs 2) use a secret undocumented parameter in the tcl file to change the class name 3) modify the template called by gtf-generate to use the gtf_class_name, when available For solution 1, I can't find any documentation bout the class.ptf format. From what I've seen, it has slightly different parameters that the system ptf generated by sopc builder. Is there a kind of *_hw.tcl -> class.ptf converter around? For solution 3 the template is Ecos specific I think. The difficulty is that some components don't have a gtf_class_name and in that case the name in class should be used instead. Can that be done? I'd appreciate any input or ideas on the subject. Thanks!