Reply by seemanta dutta March 12, 20042004-03-12
<snip>

> The first item is what you seem to be describing. > Besides looking at gdb as others have suggested, look also at Alfred > Arnold's AS http://john.ccac.rwth-aachen.de:8000/as/download.html > This is a universal assembler, with source. >
Thanks for your link.It was great!!
> Since your intention is to provide source, I'd skip the concept of a > table/script simulator, (which will be very slow) and work on > a compiled version, with one Module/DLL per processor core. >
Could explain that a little bit more? I mean, what do you mean exactly by a table/script simulator? Yeah, about DLLs, that's what I plan to do actually. Here's my plan. I shall have a GUI for the simulator-cum-assembler. The GUI will use a shared library that will house all the code for all the micro cores supported by the project. Now the most exciting and beautiful part is that the user can himself add personalised cores to the shared library and hence expand the usefulness of the whole software. For this the user will create a text configuration file whose syntax will be predefined and documented in the project documentation. Next he/she has to run the 'Code Churner' that will parse this text file and generate the code which will then be added to the shared library through a simple automated shell script after compilation. Once added to the shared library, the core added will be immediately visible in the drop down list (or a similar widget) in the GUI. From that point onwards, the GUI will start supporting the new core, assmebling and simulating all code for it. The 'Code Churner' will be embedded as a part of the GUI as well as a command line utility so that both experts and novices are comfortable with it. This leads to a very interesting situation. For example, at the time of releasing it may support just 3-4 cores, but soon after the involvement of several users, the number of supported cores will increase drastically. Besides users can always share the core library at any point of time and hence get immediate results of being able to use already existing cores. The main task is of creating the 'Code Churner' utility, after that time will take its own course and the utility of the project will increase manifold. That is how I perceive my idea. Please feel free to point out if this idea is flawed or not. ( Please pardon me if I am going for Linux...but Linux it will be if at all this takes off..what better way of contributing to the GNU movement!! ) AndtThanks for such a great response!!, Seemanta Dutta
Reply by Ian Bell March 12, 20042004-03-12
Max wrote:

> On Thu, 11 Mar 2004 17:26:49 +0000, Ian Bell wrote: > >>Many years ago, the US Gov't asked Harvard and Princeton universities to >>come up with a computer architecture suitable for computing tables of >>naval >>artillery shell trajectories. The Princeton architecture, with its common >>address space for program and data, is also commonly known by its chief >>scientist's name, Von Neumann. > > Have you got any authoritative reference for that? The only Google > references that I found that call it "Princeton architecture" seem to > be from, errr..., some cow-college called Princeton University. Might > they possibly be biased in some way? > > Googling "von Neumann architecture" or "harvard architecture" produce > thousands of references, of course. >
It is is Myke Predko's book 'Programming and customising the 8051 Microcontroller' as I tried to hint in the sig of the last post. Depends wether or not you consider that authoritative. Ian Ian
Reply by Jim Granville March 11, 20042004-03-11
seemanta dutta wrote:
> Hi, > I have thought of a free software project in my mind. I need your > opinion on it because currently I am familiar only with the 8051 > microcontroller. > > As you would have alreay guessed by now, I am planning to create a > Universal 8-bit Microcontroller simulator for the linux platform. Yes, > there are such software already in the market, but AFIK they are all > proprietary products and are not GPL'ed software. Besides as far as my > information goes, there has never been any Universal simulator that > can run on the Linux environment - proprietary or free. > I am doing this for my undying love for both microcontrollers as well > as the Linux platform. > > What I plan to create is a 'Simulator Engine', that based on a ascii > text configuration file, will churn out the *code* for the > simulator.The user then has to compile this customised code. That way > I don't have to worry about incorporating code for each and every > microprocessor core into my main code. That will also give users a > higher degree of freedom. Everything including register information, > instruction format and instruction operation has to be documented in > this file. I am hopeful that given proper documentation, users will > not feel bugged to create their own configuration files ;-) > > Now my question is: Do the 8-bit microprocessors share that much > degree of similarity that a generic 'Engine' can be created? In case > they do then it will truly be wonderful.If not, the whole idea has to > dropped on the basis that all microprocessor cores are too dissimilar > to enable a generic 'Simulator Engine'. > I have very little idea about other microcontrollers hence I am > counting on you folks for feedback. > In case you give me the go-ahead, I shall start researching about > other microcontrollers and after listing out their similarities, start > working on the Engine. > > > Thanks and regards,( especially for enduring such a long post...) > Seemanta Dutta
There are 3 big portions to a simulator * OpCode Parsing and execution * Peripheral interfaces and simulations * User interface The first item is what you seem to be describing. Besides looking at gdb as others have suggested, look also at Alfred Arnold's AS http://john.ccac.rwth-aachen.de:8000/as/download.html This is a universal assembler, with source. Since your intention is to provide source, I'd skip the concept of a table/script simulator, (which will be very slow) and work on a compiled version, with one Module/DLL per processor core. Each opcode typically needs only a few lines of code, plus the calling structures, which can be case statements, or procedure arrays, or a combination of both. That's the advantage of direct SW code for simulation, you can cover all the tiny wrinkles (once you now what they are... ) -jg
Reply by Jim McGinnis March 11, 20042004-03-11
On Thu, 11 Mar 2004 19:27:24 +0000 (UTC), Max <mtj2@btopenworld.com>
wrote:

>On Thu, 11 Mar 2004 17:26:49 +0000, Ian Bell wrote:
>Googling "von Neumann architecture" or "harvard architecture" produce >thousands of references, of course.
It's in common usage. Try Googling for ' "Princeton architecture" computer ' -- Jim McGinnis
Reply by Max March 11, 20042004-03-11
On Thu, 11 Mar 2004 17:26:49 +0000, Ian Bell wrote:

>Many years ago, the US Gov't asked Harvard and Princeton universities to >come up with a computer architecture suitable for computing tables of naval >artillery shell trajectories. The Princeton architecture, with its common >address space for program and data, is also commonly known by its chief >scientist's name, Von Neumann.
Have you got any authoritative reference for that? The only Google references that I found that call it "Princeton architecture" seem to be from, errr..., some cow-college called Princeton University. Might they possibly be biased in some way? Googling "von Neumann architecture" or "harvard architecture" produce thousands of references, of course. -- Max
Reply by Jim Stewart March 11, 20042004-03-11
seemanta dutta wrote:
> Hi, > I have thought of a free software project in my mind. I need your > opinion on it because currently I am familiar only with the 8051 > microcontroller. > > As you would have alreay guessed by now, I am planning to create a > Universal 8-bit Microcontroller simulator for the linux platform. Yes, > there are such software already in the market, but AFIK they are all > proprietary products and are not GPL'ed software. Besides as far as my > information goes, there has never been any Universal simulator that > can run on the Linux environment - proprietary or free. > I am doing this for my undying love for both microcontrollers as well > as the Linux platform. > > What I plan to create is a 'Simulator Engine',
snipped.. Before you go too far, you might want to look at the simh project. The original purpose of the project was to simulate legacy machines rather than current microprocessors. Nonetheless, their work seems to be fairly robust and is open-source. http://simh.trailing-edge.com/
Reply by Ian Bell March 11, 20042004-03-11
Max wrote:

> On Thu, 11 Mar 2004 15:57:10 +0000, Ian Bell wrote: > >>Microcontroller architectures vary considerably so creating a generic >>engine >>will not be at all easy. Apart from fundamental differences like Harvard >>or Princeton architectures > > What's a "Princeton architecture"? Do you mean a von Neumann > architecture, where the same bus is used for data and instruction > fetches? > > I'm aware that John von Neumann was a Prof. at Princeton, but the work > was essentially his alone, as opposed to the team that worked at > Harvard. "von Neumann architecture" is the conventional term, anyhow > (though the original ideas were mostly Turing's). >
Many years ago, the US Gov't asked Harvard and Princeton universities to come up with a computer architecture suitable for computing tables of naval artillery shell trajectories. The Princeton architecture, with its common address space for program and data, is also commonly known by its chief scientist's name, Von Neumann. Ian (with apologies to Myke Predko)
Reply by Hans-Bernhard Broeker March 11, 20042004-03-11
seemanta dutta <seemanta_18@yahoo.com> wrote:
> Hi, > I have thought of a free software project in my mind. I need your > opinion on it because currently I am familiar only with the 8051 > microcontroller.
So let's stick with that family for the moment. As per the latest counting, there are reported to be about four or five *hundred* different variants of 8051s out there (not counting temperature or packaging differences, mind you). That's really your major problem, then: not the machine language of the processor as such, but the timing and behaviour of all those freakin' many different built-in peripherals that come attached to it.
> As you would have alreay guessed by now, I am planning to create a > Universal 8-bit Microcontroller simulator for the linux platform.
You may want to have a look at GNU's GDB sources first. It already comes with a somewhat general CPU simulator construction kit to be used for debugging programs by simulation. And please don't make the same mistake the proprietary simulators already committed to by tying your simulator to the Linux platform. Make it *portable*, as best you can.
> Now my question is: Do the 8-bit microprocessors share that much > degree of similarity that a generic 'Engine' can be created?
Depends on how skillfully that "engine" is made, and how much effort you're willing to put into configuring it. Everything can theoretically be simulated by your PC, of course --- the only real questions are how flexible and how efficient your code generator and the final simulator will be. -- Hans-Bernhard Broeker (broeker@physik.rwth-aachen.de) Even if all the snow were burnt, ashes would remain.
Reply by Max March 11, 20042004-03-11
On Thu, 11 Mar 2004 15:57:10 +0000, Ian Bell wrote:

>Microcontroller architectures vary considerably so creating a generic engine >will not be at all easy. Apart from fundamental differences like Harvard >or Princeton architectures
What's a "Princeton architecture"? Do you mean a von Neumann architecture, where the same bus is used for data and instruction fetches? I'm aware that John von Neumann was a Prof. at Princeton, but the work was essentially his alone, as opposed to the team that worked at Harvard. "von Neumann architecture" is the conventional term, anyhow (though the original ideas were mostly Turing's). -- Max
Reply by CBarn24050 March 11, 20042004-03-11
Hi, great project idea, it's going to be difficult as most micros are
different, some are very different.