OpenCores
First Prev 2/2 no use no use
RE: A CPU Lecture
by jsauermann on Apr 13, 2011
jsauermann
Posts: 3
Joined: Sep 24, 2003
Last seen: Jul 2, 2015
Hello Richard,

Thank you for the flowers!

Let me answer some of your questions directly.

The main reason for not including the instructions you mentioned (bit field and string ops) is that I tried to stay compatible with the AVR as much as it makes sense. Neither the AVR gcc/g++ compilers, nor the assembler would aware of such opcode extensions, so that you would need to fall back to inline asm with hex values instead of assembler instructions. Such code is ugly and not portable.

The M68k BFFFO instruction should be a 1-cycle instruction. Apart from that, there is a zoo of bitfield instructions (BFCHG, BFCLR, BFEXTS, BFEXTU, BFFFO, BFINS, BFSET, BFTST, but surprisingly not BFFFZ) in M68k, and implementing them all would occupy quite some space in the instraction set.

Reasonable string instructions would normally n-cycle instructions whose execution time would be at least proportional to the string length. You could implement them atomically (which would then give you bad interrupt response time) or non-atomically (which would be very complex because you would need to save some context somewhere.

In my opinion the above reasons rule out both bitfield and string opcodes for the AVR.

The question of I/O-bound vs. CPU-bound should also not be an issue in the FPGA context. If you are CPU-bound in an FPGA then you could try to parallelize your application and to instantiate several CPUs. If you are I/O bound then either you have reached the hardware limit of some interface (like 1 Gig throughput on a 1 Gig ethernet - there isn't anything you can do at all), or you can try to improve you I/O by hardware offloading of some sort.

In any case, I believe in an FPGA context it is more important to identify the bottlenecks in your hardware and to fix them and not so much of what kind (CPU or IO) the bottleneck is.

Kind Regards,
Juergen Sauermann



RE: A CPU Lecture
by FilipPynckels on Apr 1, 2017
FilipPynckels
Posts: 1
Joined: Mar 29, 2017
Last seen: Nov 9, 2018
Dear All,

I'm new in this site, and I don't seem to find the sources of this project, except for the code in the pdf file. It would, of course, be a lot easier for me to poses the real source codes (without line numbers and with correct indentation) to play around with the design in question.

I've tried converting the PDF file to text, but let's say that the results were less than sub-optimal.

Can someone elaborate on this please. Thanks in advance!

Best regards,
Filip
First Prev 2/2 no use no use
© copyright 1999-2025 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.