URL
https://opencores.org/ocsvn/light52/light52/trunk
Subversion Repositories light52
[/] [light52/] [trunk/] [doc/] [quickstart.txt] - Rev 10
Compare with Previous | Blame | View Log
Until a proper design document is made, this quickstart file will help youset up one of the included software demos on a development board. Plus, there'sa brief explanation of the cosimulation verification scheme.All of this stuff will eventually be properly explained in a design document.This file is just a stopgap until that document is written.Software demos===============All the demos included in the project (in directory /test) come pre-compiled(that is, the repository includes the object code package necessary to build thesystem), so it isn't necessary to install any MCS51 assembler or compiler if allyou want to do is play a little with the core.The project includes ready-made support files for the following developmentboards:* Terasic's DE-1 (Cyclone-2): directory /boards/terasic_de1* Avnet's Spartan-3A Evaluation Kit: directory /boards/avnet_s3aevalFor each board, the following is supplied:1.- A suitable project file is included for Quartus-2 or ISE Webpack.2.- A 'top entity' VHDL module with a light52 MCU instance connected tothe on-board devices (most of which are unused).3.- A constraints file, including the pin locations. This info is already inthe project file but is supplied separately for convenience.The project files in all cases use the object code package from the Dhrystonedemo. It is trivially easy to set up the project for some other demo: replacethe object code package (file obj_code_pkg.vhdl).The demos only use a serial port connector (when available) and some LEDs and7-segment displays (when available). It would be very easy to port the demosto some other development board.FPGA configuration files are NOT included, so you will need a synthesis tool.How a software simulator has been used as a verification tool==============================================================This project includes a software simulator for the light52 core called b51. B isfor 'batch', because the simulator is not interactive; it runs from reset tothe end of the program (identified by a timeout or a single-instruction loop),logging the execution as it goes along, and then quits.This simulator can be found in directory /tools/b51, together with a CodeBlocksproject file. The simulator has been developed on Win32/Cygwin but should workon Linux unmodified (only a Win32 binary is provided).The simulator is meant to be used as a cosimulation tool: you run the sameprogram in b51 and in a Modelsim vhdl test bench.Each of the simulations will log its evolution on a text file ('sw_log.txt' forb51 and 'hw_sim_log.txt' for Modelsim). If the hardware model matches thesoftware model, the log files should be identical (this is a little trickierthan it seems, as will be explained in the design document).Thus, the software model can be used as a 'golden model' of sorts.I'm calling this scheme 'cosimulation', even though the simulations don'tinteract directly (you have to match the log files yourself).The b51 simulator is still not finished but it already can execute all thesoftware demos included with this project. Each demo includes a DOS BAT filefor launching the simulator. Until better documentation is available, youare referred to those BAT files and the source code of b51 for details.The log file format will also be described eventually in the design document.Why a software simulator?--------------------------By using a software simulator as a 'golden model' that the hardware must matchclosely, we can use far simpler test benches than would otherwise be necessary.Besides, development and debugging become much easier and quicker.The downside, of course, is that an accurate software model has to be developedin addition to the hardware design. In this project, it has been built fromscratch -- and yet I think I have saved an awful lot of development time.This scheme (software model + hardware simulation + software-only test bench)is nothing new; it has been used to test new computers since at least the 70's.
