⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sim.readme

📁 another 8051 core porocesssor vhdl source code
💻 README
字号:
This is the sim.readme file for the m8051 soft core.General=======A general demonstration test bench is provided in the sub-directory,sim and is called m8051_tb.v(hd)  This testbenchmay be used with either the RTL or synthesised M8051 Soft Core.The test bench contains external stimuli for the soft core and references RTL models for I/O cells, internal and external memory functions.The testbench loads an M8051 assembled test program, func1, into theinternal program memory model at the beginning of simulation.  Thistest program exercises the M8051 instruction set and many peripheral functions.Statement and branch code coverage with this testbench and the func1 assemblercode is about 97% and 94% respectively.  Almost all unexecuted statements areRTL X-handlers.Simulation Shell Scripts========================This directory contains two shell scripts, msim.scr and vxl.scr, for runningthe customer-deliverable testbench simulation of m8051 at RTL andsynthesised gate-level using the Modelsim 5.2d simulator or VerilogXL. Bothsimulators generate a tabular listing file of results,Both scripts may take the same optional arguments:msim.scr [-c] [-g] - For Modelsimvxl.scr  [-c] [-g] - for VerilogXL-c  causes simulation to be run in command line mode, i.e. without a GUI.    By default a GUI session is started.-g  causes a gate-level simulation to be run, using a Verilog netlist and SDF    file.  The default is to compile and simulate the RTL.Simulation takes place with the contents of the Verilog memory filedefault_rom.rom loaded in the program memory model, rom.v  (for Verilog) orthe hex record file default_rom.hex loaded in the model, rom.vhd (for VHDL).Simulation generates a listing that is written to the file m8051uni.lis togetherwith a log file named as follows:msim_rtl.log   - Modelsim RTL simulation log file;msim_gate.log  - Modelsim netlist simulation log file;vxl_rtl.log    - VerilogXL RTL simulation log file;vxl_gate.log   - VerilogXL netlist simulation log file;See below for language-specific details of running the script.Running VHDL Simulations========================Simulations have been carried out using Mentor Modelsim. Inorder to do so the working sub-directory vhdl/sim/work iscreated to store the compiled model. The script msim.scr in the vhdl/simsubdirectory should be run in the vhdl/sim directory.This creates the sub-directory work and into it compiles the M8051 RTLsource files from the rtl subdirectory or a netlist from gates/synopsub-directory and testbench files from the vhdl/simdirectory.  The script sets out the correct order for compilation of thishierarchical design.Link files are used for referencing program and data memory contents. One of these links is called default_rom.hex whichshould be either a pointer to or a copy of func1.hex, which is the deliverable assembler test program code in Intel hex record format.The second link is called ram.hex and may optionally point to a filecontaining initial contents for the internal data memory.  Asdelivered, this link is a file of zero length.The script msim.scr then runs the Mentor Modelsim simulator.  This runs742 us of simulation time using an input clock period of 20 ns and producestwo simulation listing files, m8051uni.lis and m8051bir.lis. m8051uni.lis contains a listing for each signal at the Soft Coretop-level boundary, i.e. the unidirectional signals listed in theM8051 Product Specification.   m8051bir.lis contains a listing for the I/O padsof bidirectional cells in the testbench giving a listing which correspondsto the pins found on the original device.Gate-level simulations have been run using Mentor Modelsim on a netlistsynthesised from the RTL by Synopsys Design Compiler.  Simulationuses an SDF file containing pre-layout delay estimates. Timing violationwarnings for vector 1 have been seen and can be ignored.Gate level simulations can be run using the option -g as an argument to thescript msim.scr.  The script compiles the synthesised netlist file, m8051.vhd,and SDF file, m8051.sdffrom the vhdl/gates/synop directory.  The script runs the Mentor Modelsimsimulator referencing the SDF file.The VHDL testbench is self-checking against the reference filesm8051uni.ref and m8051bir.ref.  Any difference from the referenceresults is logged at run time in the corresponding fault filem8051uni.flt or m8051bir.flt.  Typically, gate level simulationscontain some failures for vector number 1 only.  These are acceptablesimulator initialisation differences. Running Verilog Simulations============================Simulations have been carried using Mentor Modelsim. Inorder to so the working sub-directory verilog/sim/work iscreated. The script msim.scr in the verilog/simsubdirectory should be run in the verilog/sim directory.  This creates thesub-directory work and into it compiles theM8051 Verilog RTL source files from verilog/rtl or netlist from gates/synop and testbench files from the verilog/sim directory.  The compile script setsout the correct order for compilation of this hierarchical design.A link file called default_rom.rom is created by the script for referencingprogram memory contents in a Verilog-readable format.  This file shouldbe either a link or copy of the file func1.rom, which is the deliverable assembler test program code in Verilog readable format.Optionally a link called ram.rom may point to a filecontaining initial contents for the internal data memory.  This is notimplemented in the deliverables.Files in the Verilog readable format may be generated from thecorresponding Intel hex record (.hex file) using the the Mentor  utility hex2rom8 which performs the text format conversion.  Thisprogram is compiled to run under Solaris on Sun Sparc stations.With the RTL compiled and the program code linked, the script then runs theModelsim simulator.  This executes 742 us of simulation time using an inputclock period of 20 ns and producestwo simulation listing files, m8051uni.lis and m8051bir.lis. m8051uni.lis contains a listing for each signal at the Soft Coretop-level boundary, i.e. the unidirectional signals listed in theM8051 Product Specification.   m8051bir.lis contains a listing for the I/O padsof bidirectional cells in the testbench giving a listing which correspondsto the pins found on the original device.Gate-level simulations have been run using Mentor Modelsim on a netlistsynthesised from the RTL by Synopsys Design Compiler.  Simulationuses an SDF file containing pre-layout delay estimates. Timingviolation warnings for vector 1 have been seen and can be ignored.Gate level simulations can be run using the option -g with the script msim.scr(or vxl.scr) to compile and simulate the synthesised netlist file, m8051.v,and SDF file, m8051.sdf, from the verilog/gates/synop directory. The Verilog version of the test bench is not self-checking.  Insteadsimulation results are verified by comparing the m8051uni.lis filewith the reference file vhdl/sim/m8051uni.ref  This isperformed using a UNIX diff command in the run script msim.scrThe file m8051.rtl.diff (RTL) or m8051.gates.diff (netlist) may acceptablycontain differences for vector number 1. 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -