- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
How can I control the clock enable and other signals for implemented custom instruction with hardware inside the NIOS II (sequential)? Maybe some more examples have Altera (not only combinatorial example leading_zero_detector)? Thank you for helpLink Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have the same problem. I need to know how to determine the number of clock cycles per instruction in order to get the results. Thanks in advance for any help you could give.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
A lot of the logic of the custom instruction interface can be seen in the RTL viewer.
I suspect that the 'clock enable' is the signal used to stop the cpu during pipeline stalls - so a variable length custom instruction must assert 'done' while clock enable is asserted (but need not otherwise look at it). A fixed length instruction (where the interface counts the clocks for you) will almost certainly have to apply the clock enable to everything.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for replying. I'm working with Quartus II 12.0 subscription edition. The problem is that I don't have a way to change the instructions to fixed length,because it's automatically assigned the instruction to variable length. Is there any way of doing that?
Thanks in advance.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I would have thought it was best to generate the 'done' signal from within your own logic.
After all you will have an internal signal (or can easily generate one) that is asserted when the result is available. I thought I remembered there being an option for 'fixed length', maybe it can only be set when you create the component. I do remember that it wasn't obvious how to edit the details - IIRC you have to run the component editor. There were certainly a pile of bugs in the version of the sopc builder I was using - it got very confused if you added and removed custom instructions from the cpu itself. All not helped by the only examples just describing how to tick the boxes to include the FP instructions.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks. Yeah. I found the way of set it to fixed length, but we should know the number of cycles needed to set that. Therefore better to use variable length and set the done signal when we need the result. I'll try and check.
Thanks for helping.- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page