Wookie Simulator Setup and Tutorial
Wookie Simulator Setup and Tutorial
The integration of AS11M Assembler and Wookie Simulator creates a cohesive educational toolkit that significantly enhances student learning in 68HC11 microprocessor programming. The AS11M Assembler translates assembly code into machine code, which is a critical learning step as it helps students understand how high-level programming abstractions map to low-level machine instructions . The Wookie Simulator then provides a platform to execute this machine code, offering a virtual representation of a 68HC11 microprocessor . This simulation allows students to step through code execution, observe real-time changes in memory and CPU registers, and modify programs based on outcomes . These experiences help students grasp crucial concepts like instruction execution, register manipulation, and memory management in a controlled, risk-free environment. Furthermore, by allowing students to witness the real-time effects of their code and troubleshoot using detailed feedback, the integrated system promotes deeper understanding and retention of microprocessor programming concepts.
The Wookie Simulator offers a user-friendly interface that allows developers to validate their 68HC11 assembly programs meticulously. Once the machine code is loaded into the simulator, developers can use the 'Code View' to scrutinize the assembly listing through the '.lst' file, ensuring that the instructions are correct and comply with the intended program logic . By utilizing the 'Memory Watch' and 'Browse Mem.' features, they can observe memory changes and verify variable storage and manipulation accuracy . Observing CPU registers via the 'M68HC11 CPU' button provides insights into how different instructions affect the processor's state . The capability to step through code one instruction at a time using the green button ensures that any discrepancies in program execution can be identified and resolved, offering a robust way to confirm the program operates as intended . This combination of features empowers developers to detect and rectify errors effectively, achieving proper program performance.
The Wookie simulator provides several features that significantly support the debugging process for 68HC11 assembly programs. The ability to step through the program one instruction at a time using the green button enables developers to closely monitor the execution flow and detect anomalies . The 'Code View' and '.lst' file offer insights into the assembly instructions being executed, which is crucial for ensuring the program logic is adhered to . The 'Memory Watch' and 'Browse Mem.' features allow users to identify incorrect data storage or retrieval by tracking changes in memory locations . Similarly, the 'M68HC11 CPU' button showcases real-time register states, helping to verify the impact of each instruction on the processor . By providing detailed feedback and visibility into various execution aspects, the simulator enhances developers' ability to swiftly identify and rectify bugs, ensuring the program functions correctly.
Using a simulator like Wookie in embedded systems education offers several pedagogical advantages over physical hardware. Simulators provide a risk-free environment for students to experiment and learn without the fear of damaging physical components, which is especially important for novices . They also allow students to execute instructions and observe outcomes instantaneously, promoting active learning through immediate feedback and iterative problem-solving . This immediate visibility into the memory and CPU operations helps in reinforcing theoretical concepts and understanding microprocessor architecture . Simulators are generally more accessible and cost-effective, enabling institutions to provide scalable resources for large classes without the need for extensive hardware investments . Additionally, simulators can replicate different operational conditions and faults, offering a more comprehensive learning experience that prepares students for real-world challenges in embedded systems development.
Wookie streamlines the editing and testing cycle for 68HC11 assembly programs by providing an integrated environment where users can write, assemble, and simulate code. Initially, developers create the '.asm' assembly file using a text editor such as Notepad . Any syntax errors identified by the AS11M assembler can be corrected by editing the '.asm' file directly . The simulation phase involves loading the successfully compiled '.s19' file into Wookie, where developers can examine the correctness of their program logic and execution . Wookie's interface allows stepping through program execution one instruction at a time, monitoring memory and CPU state changes, which helps in quickly detecting logic errors or unexpected behavior . This cyclical approach of editing, assembling, and simulating facilitates iterative refinement and debugging, enhancing productivity and program reliability.
To set up and run an assembly program simulation using Wookie, first create a directory called 'wookie' on the hard disk . Download the Wookie Simulator and AS11M Assembler from the ECE2210 course website, saving them in the 'wookie' directory . Use Notepad to create your assembly program and save it with the '.asm' extension in the 'wookie' directory . Open the DOS Command Prompt, navigate to the 'wookie' directory, and use the command 'as11m <filename>.asm' to assemble the program . Check and resolve any assembler errors, then load the '.s19' file into Wookie by executing the simulator and selecting 'Load .s19 file...' . Set the HC11 Mode to "Brief Case" and the start address to match your program's start address . Open the '.lst' file in the "Code View" window and monitor memory and CPU registers using "Memory Watch" and the "M68HC11 CPU" buttons, respectively . Step through the program using the green button to ensure proper execution .
Wookie offers several key functionalities for 68HC11 microprocessor simulations that aid developers. The software runs machine code generated by assemblers such as AS11M and provides a simulation of the 68HC11 microprocessor's functionality . Users can load and view '.s19' files that contain the machine code, enabling simulation execution . The 'Code View' allows examination of the '.lst' file to analyze the program's assembly instructions . Users can monitor system memory and browse through specific memory blocks with the 'Memory Watch' and 'Browse Mem.' features, respectively . Additionally, the 'M68HC11 CPU' button provides real-time display of CPU register values, which is crucial for debugging and optimization . These functionalities together create an environment that facilitates thorough testing and analysis, crucial for effective program development and troubleshooting. The capacity to step through the program one instruction at a time further enhances precision in identifying and resolving issues .
If the assembler returns errors during compilation, first carefully read the error messages provided to identify the issues . Typically, these errors might be related to syntax, labels, or incorrect instruction formatting in the '.asm' file. Once identified, open the assembly file using a text editor like Notepad and correct the errors noted . After making the necessary adjustments, save the changes and run the assembler again using the command 'as11m <filename>.asm' . Repeat this process until the assembler compiles the program without any errors, indicating that the program is syntactically correct . If persistent issues occur, reviewing the assembly language syntax and ensuring adherence to the 68HC11 instruction set can help in resolving recurring problems.
The 'Set HC11 Mode' window is a critical component in setting up the execution of a 68HC11 program in the Wookie simulator. This window requires the user to select the appropriate mode, often 'Brief Case', and define the start address for the program being executed . Configuring these settings ensures that the simulator interprets the machine code in a manner consistent with the program’s intended operation, as the mode can affect how instructions are executed . Setting the correct start address is crucial because it aligns with where the program expects to begin execution in memory, allowing for accurate simulation behavior . This setup is essential for simulating real-world operation conditions and verifying program functionality before deployment.
During the simulation using Wookie, you can monitor memory by clicking on the 'Memory Watch' button, which will allow you to input the name and address to watch specific locations . You can also click on 'Browse Mem.' to watch a block of memory . For monitoring CPU registers, click on the 'M68HC11 CPU' button to display the register values in the 'MCU' window . By stepping through the program one line at a time using the green button, you can track program flow and observe changes in registers and memory, ensuring the program runs as expected .