字号:
------------------------------------------------
-- Model : 8051 Behavioral Model,
-- Top Level Block
--
-- File : mc8051.vhd (MicroController 8051)
--
-- Author : Michael Mayer (mrmayer@computer.org),
-- Dr. Hardy J. Pottinger, advisor
-- Department of Electrical Engineering
-- University of Missouri - Rolla
--
-- Requires : pack8051.vhd (Package containing
-- needed procedures, types, etc.)
-- uart.vhd (UART peripheral)
-- (written by Lingfeng Yuan, Prajakta Kurvey)
-- see also LIBRARY and USE clauses below
--
-- Thanks to : Kyle Mitchel for many comments
--
-- Inspired from : Sundar Subbarayan
-- UC Riverside CS 122a (lab 3)
-- Professor: Dr.Frank Vahid
-- 17th January 1996
--
-- Date Started : September 15, 1997
--
-- Features : Entire command set
-- Support for Intel Hex format
-- Internal program memory (4Kb)
-- Internal data memory (256 Bytes) - 8052
-- Supports external prog mem up to 64 Kb
-- Supports external data mem up to 64 Kb
-- using MOVX instr. with 16 bit data ptr.
-- Supports I/O through 4 ports when not using
-- above features
-- Interrupts w/ Priority
-- Choice of level / edge sensitive interrupts
-- Timer 1 in mode 2 only
-- Serial tx / rx in mode 1
--
-- Limitations : Reset Port does not function
-- LIMITED PERIPHERALS:
-- No timer 0
-- Limited timer 1 (only mode 2)
-- can't read from timer value TL0
-- Limited UART
--
-- REV DATE Description
-- ----- -------- ---------------------------------------
-- 1.0 01/17/97 Work from Sundar Subbarayan and
-- Dr. Frank Vahid
--
-- 2.0 11/04/97 Initial implementation of command
-- interpreter for Hex Code set.
--
-- 2.1 11/12/97 Changed memory to separate lo and hi mem
-- and made all access through functions /
-- procedures / aliases to allow for
-- distinction between indirect and direct
-- accessing of upper 128 bytes of data mem
-- (for 8052 compatibility).
--
-- 2.2 11/21/97 Made program memory access only through
-- the process get_pmem and its two
-- signals: pmem_s1_byte and pmem_s4_byte
-- Added state machine sensitive to xtal which
-- governs the machine cycles, port & mem
-- reads, etc. Built support for external
-- program memory read in process get_pmem.
--
-- 2.3 12/12/97 Corrected bug in get_pmem - resync to pc
-- Moved load_program procedure to pack8051
-- Converted IF..ELSEIF structure to CASE for
-- decoding of opcodes. Completed any missing
-- commands and verified that all 256 were available
--
-- 3.0 12/13/97 Changed port 3 to a single std_logic_vector
-- Differentiated between commands that read the
-- port and those that read the latch.
-- Added output drivers for port3
--
-- 3.1 12/14/97 Modified procedures in main for accessing
-- data bytes. All use get_byte_dmem
-- and set_byte_dmem for any data access, unless
-- they access it through aliases (e.g. acc <= val)
--
-- 3.1.1 01/26/98 Added condition of ea_n to the program rom load
--
-- 3.1.2 02/22/98 Corrected handle_sub's advancing of the pc
-- Corrected JNC to IF cy='0' instead of '1'
--
-- 3.1.3 02/24/98 Corrected MOVX's control of Ports 2 & 3.
--
-- 3.2 07/??/98 Corrections from Kyle Mitchell for
-- 0 or L, 1 or H and for initial boot-up
--
-- 4.0 08/30/98 Added serial UART, timer 1 in mode 2, and
-- the serial interrupt
--
-- 4.1 09/02/98 Added more interrupts.
--
-- 4.2 10/06/98 Corrected MOVX's control of ALE and PSEN_n
-- Fixed PC increment on several instructions
--
-- 4.3 10/08/98 Added level / edge sensitive interrupt support
-- Added priority to interrupts (IP)
-- ------------------------------------------------
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -