Forum Discussion

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

DSP Builder: State Machine Editor within custom library block

Hello ALteraforum!

I am using Matlab R2008a / DSP Builder 8.0 / Quartus II 8.0 and am trying to build custom library blocks as described in the DSP Builder User Guide, Chapter 10. The intention is to create a library with some blocks that we will need frequently.

My problem is that I am unable to include state machine editor blocks in my library blocks. I have successfully used the state machine editor in regular design models. However, when I create a library block with a state machine editor block inside and then include this library block in a design model, I can neither simulate nor synthesize the design.

In the DSP Builder User Guide, page 10-11, it says that this should be possible, but would require the "alt_dspbuilder_refresh_user_library_blocks" command to be run whenever the design is copied or moved. I tried to run this in the directory of the design model, with the design model opened, but it didn't help. I tried the same for the library itself, but again no luck.

So far, I have been able to find out that the problem is related to the external files generated by the Quartus State Machine Editor in the "import" subdirectory.

For simulink simulation, the .vo.simdb file seems to be crucial. The 'vofile' property of the state machine block obviously references this file by its relative path. By using set_param to change this to an absolute path for the state machin inside my library block, I was able to get the design model to simulate correctly. However, synthesis still doesn't work because the source files for the state machine are missing in the Quartus II project. Even manually adding the .vhd file from the library's include directory didn't help.

As you can see, I am stuck somehow and would appreciate any hint on how to solve this problem.

Best regards,

Nico.

2 Replies

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

    Sounds like a potential bug.... (It is quite possible since the state machine editor is pretty new, didn't get introduced till the 8.0 release)... I would file a service request (and attach an example-perhaps one of your library and another design using that library block) and alert Altera of this potential problem...

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

    Ok, I was afraid you would say this. I will propably file a service request.

    Btw, here is a minimalistic example that I created to demonstrate the problem. It would be nice if someone could check this out to verify that it does not only happen on my computer (see devel.zip; when I created this, the devel directory was located at c:\devel).