Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
08/10/08 21:09
Read: times


 
#157380 - Maybe you should start with an ARM chip
Responding to: ???'s previous message
Per Westermark said:
If you poke around the www looking for a compiler called XPL0 (that last digit is a zero) you'll find a compiler that was written for the MCS6502 but which emulates a 16-bit machine.

I hadn't actually seen the XPL0 language. Quite a lot of nice applications written using it. The last updates to the web page just a couple of days ago, so it is definitely active.

Back in the old days, I was active in the 6502 community and, in fact, once built a TTL model of a 6502 that executed the Rockwell 65C02 instruction set via a tentacle in an Apple ][+. There were some problems with APPLE's use of invalid instructions.

I'm not sure what you mean by "emulating 16-bit" on the 6502, but I assume that you mean it will behave similarly to any 8-bit environment when using a C compiler, since the C standard requires the compiler to use at least 16-bit integers.

What I meant by that was that the XPL0 compiler produced an intermediate code which was executed by a resident interpreter called I2L (intermediate interpreted language) which emulated a 16-bit stack-driven processor core. The result was that, in order to port the compiler to another architecture, be it a different machine enviroment with the same processor or an entirely different processor, all one had to do was to write a new I2L interpreter.

That's the theory, though the results I've observed have often been disappointing.

Which is why the war between RISC and CISC seems to have come to an end. Intel tried their NetBurst architecture to get RISC-like long pipelines but found that the power consumption can sky-rocket but the cost of every single stall made AMD chips run rings around it for random-jump applications.

What's even more important, is that the author of that particular MIPS implementation has provided a simulator-compatible testbench, which will show you how to verify that your implementation works.

I still think the MIPS core is a bit too high-end for my goal, i.e. running tiny applications at a non-critical pace.

On your current PC, these will simulate the Z80 at many times the Z80's performance, yet provide perfectly useable code.

Did write a Spectrum emulator somewhere around 1990. Ended the project (run out of time) somewhere when trying to figure out why it booted but presented all display output upside down :) Hand to slow down the emulation on a 25MHz 486 to get real-time speed. Too bad for me, I did the emulator in assembler so I can't just reuse the code, but it does work as a validation reference.

I haven't brought myself totally up-to-date with Z80 tools, but M$ is quickly killing off the DOS prompt which should mean that both under Linux and Windows, a DOS emulator would be needed. An alternative is of course to go the full loop: With a Z80 emulator, a PC can emulate a CP/M machine and run any CP/M tool at a very high speed. The end user may not even have to see a command line - a GUI that picks up a file name and presents back a list-box with compilation results should be enough. A lot of CP/M tools are available for free. The question is if the CP/M OS is available for free. I have seen a number of download links, but for specific hardware and without any license information.

That's a good reason to keep a solid version of DOS around. That way you can do useful work under DOS and just do the OFFICE and Internet stuff that needs and benefits from Windows under Windows. I do my SPICE, Schematics, SPLD development, and PCB routing under DOS, because Windows makes it take 10-100x as long and does, at best, half the job. I haven't yet figured out how to get much useful work out of LINUX, yet, but I'll get there. If I were a journeyman LINUX user, I'd keep a version that emulates DOS properly around, too. It's too hard to get useful work out of Windows.

As for licenses, I still have 50 or so paid-for CP/M licenses, Most of them aren't even numbered, though those have been entirely unnecessary for over two decades. I don't know about the applications, but the software police haven't yet bothered anyone I know.

Further, if you intend to add an MMU to an existing architecture, you may be disappointed with the performance.

If you note, I do not want to emulate a processor with MMU. There would be no need/use since the target applications are expected to be small. And in an emulated environment, every memory access would be completely safe anyway - and the emulator would anyway have to catch accesses outside the available memory range.


I'm confused about where you really want to go with this effort. I'd suggest you focus on a proper paging scheme, perhaps a hardware MMU that works with one of the fast single chippers, if that's your goal. I'd recommmend trying one of the ARM's before you fool around with an ARM emulator. Some pretty powerful and fast ARMs cost less than the high-end AVR's and 805x's. Moreover, they have direct interfaces to SDRAM, where 64MB SDRAM costs about the same as a ~128KB SRAM, and hey have a separate interface to an SRAM/FLASH channel. IIRC, last time I bought 100-MIPS ARM CPU chips they cost about $8 in small quantity.

RE


List of 20 messages in thread
TopicAuthorDate
Virtual or existing architecture for emulation            01/01/70 00:00      
   Additional info about host/usage            01/01/70 00:00      
      How about MIPS?            01/01/70 00:00      
         VHDL            01/01/70 00:00      
            take a look at the content            01/01/70 00:00      
               I think 8 or 16 bit is optimum            01/01/70 00:00      
                  Maybe you should start with an ARM chip            01/01/70 00:00      
                     I2L sounds interesting            01/01/70 00:00      
                        It's probably best to check with the maintainers            01/01/70 00:00      
                           Doesn't seem to be a C to I2L            01/01/70 00:00      
                              The LLVM Compiler Infrastructure            01/01/70 00:00      
                              Since there's help available ...            01/01/70 00:00      
      With the low price of 8-bit single chip MCUs...            01/01/70 00:00      
         Slave processors not an alternative            01/01/70 00:00      
   Users            01/01/70 00:00      
      Probably debugging on PC            01/01/70 00:00      
         Are you really going to do that!            01/01/70 00:00      
            Existing building blocks helps            01/01/70 00:00      
               It hasn't been done for you but ...            01/01/70 00:00      
            When I was in school ...            01/01/70 00:00      

Back to Subject List