Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

CPU32 simulation for assembly code

Status
Not open for further replies.

holmeschang

Newbie level 3
Joined
Oct 30, 2011
Messages
4
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,312
Hi all,

I am a student and were given a laboratory work to work on. I had work on it few days but got stuck.

We are suppose to design and simulate a CPU32 simple processor using ModelSim 10.0c. The coding is in VHDL. The program are design to process assembly code. First we have to design a few entity in VHDL

CPU32.vhd
CPUpakage.vhd
ALU.vhd
Register.vhd (use distributed ram)
Control.vhd
and a Testbench which only run clock and print complete.

I am suppose to finish up all the coding above which i had done that. Next step is i had to write an assembly code in codememory.s. The provided small program is

asm32.exe - This will assemble a source code file to a binary file in motorola format. For example,
If you drag & drop the file tst.s on asm32.exe then it will produce tst.mot. It will
also produce a listing file tst.lst.

convert.exe - This will convert a motorola binary file into a .coe file for the Xilinx coregen
utility and a .mif file for simulation. For example, if you drag & drop tst.mot
from above on to convert.exe it will produce tst.coe and tst.mif. tst.mif should
be copied into the simulation directory and renamed to codememory.mif when simulating
with Modelsim. The .coe file may be used with coregen to regenerate the codememory when
creating the actual hardware.

doit.bat - batch file that runs the above assembler and converter on the file codememory.s and
copies the relevent files to the simulation and synthesis directories.

Somehow I dunno how to use the file produced. I try to copy all the file produced in the directory but the simulation result doesn't show any sign the instruction register is loaded with any code.

Urgently need help. Thanks

View attachment simulate.zipView attachment simulate.zip This is the directory i use o simulate
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top