- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi all!!
I implemented a custom instruction with the "Multi-Cycle Custom Instruction" technique. I used: clock, clk_en, reset, start, dataa[31..0], result[31..0]. My custom instruction perform in only 1 clock-cycle, but it isn't a combinatorial logic; I used registers. I simulated it and it works!! I obtain the result in a single clock-cycle. But when I imported it in SOPC Builder, it works only if I write that the operation takes 2 clock-cycle.... http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/sad.gif Anyone encountered this problem? Bye! http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/rolleyes.gifLink Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
My thought : If you use a multicycle instruction is it at minimum 2 cycles. The first is for setting up the data at your data input ports (from the register file), the second is to wait until it sees the ready signal. I did approximatly the same, and have also a minimum of 2 cycles. STefaan- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
http://www.altera.com/literature/an/an188.pdf (http://www.altera.com/literature/an/an188.pdf)
Page 14. You enable your logic with the start bit. If you use a register you can see that on the 2nd rising clock edge your data is latched so on the rising edge of the 3rd clock is when the NIOS latches your result (don't forget it needs to latch your data, so that's your 2 clocks of latency). So it's not really a problem, you just need one more stage of latency. Even if that start came out earlier, since you have a register you'll never get it down to 1 cycle. Cheers.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ok, thanks!
It was only a conventional problem. My c.i. has start bit high at T1 and done bit high at T2 => i called it "1-clock cycle" instruction But it seems Nios speaks about "2 clock cycle" for a similar instruction. Ok. thanks Bye! http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/wink.gif- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ya the latency is with respect to the NIOS itself and not your instruction. I usually just remember to add one to whatever my hardware needs.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page