SAP computer之input and MAR

Input and MAR

  Below the program counter is the input and MAR block.

  It includes the address and data switch registers. These switch registers are part of the input unit which allow you to send 4 address bits and 8 data bits to RAM. As you recall, instruction and data words are written into the RAM before a computer run.

  The memory address register(MAR) is part of teh memory. During a computer run, the address in the program counter is latched into the MAR. A bit later, the MAR applies this 4-bits address to teh RAM, where a read operation is performed.

  

 1 library IEEE;
 2 use ieee.std_logic_1164.all;
 3 use ieee.numeric_std.all; 4 6 entity MAR is
 7 port
 8 (
 9     CLK        : in  std_logic;                     --! Rising edge clock
10     CLR        : in  std_logic;                     --! Active high asynchronous clear
11     LM         : in  std_logic;                     --! Active low load MAR
12     D          : in  std_logic_vector(3 downto 0);   --! MAR 4-bit address input
13     Q          : out std_logic_vector(3 downto 0)    --! MAR 4-bit address output
14 );
15 end MAR ;
16
17 architecture beh of MAR is
18 begin
19
20 process (CLR,CLK,LM,D)
21 begin
22     if CLR = ‘1‘ then
23         Q <= "0000";
24     elsif LM = ‘0‘ then
25         if (CLK‘event and CLK = ‘1‘) then
26             Q <= D;
27         end if;
28     end if;
29 end process;
30
31 end beh;

  

时间: 2024-12-14 23:32:13

SAP computer之input and MAR的相关文章

SAP computer之RAM

RAM The RAM is a 16 X 8 static TTL RAM. We can program the RAM by means of the address and data switch registers. This allows us to store a program and data in the memory before a computer run. During a computer run, the RAM receive 4-bit addresses f

SAP computer之program counter

Program counter The program is stored in memory with the first instruction at binary address 0000, the second instruction at address 0001, the third at address 0010 and so on.  The program counter, which is part of the control unit, counts from 0000

SAP computer之architecture

Simple-As-Possible computer introduces all the cruicial ideas behind computer operation without burying you in unnecessary detail. The figure shows the architecture of SAP-1, a bus-organized computer. All register outputs to the W bus are three-state

Video for Linux Two API Specification revision0.24【转】

转自:http://blog.csdn.net/jmq_0000/article/details/7536805#t136 Video for Linux Two API Specification Revision 0.24 Michael H Schimek <[email protected]> Bill Dirks Hans Verkuil Martin Rubli Copyright © 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,

Video for Linux Two API Specification Revision 2.6.32【转】

转自:https://www.linuxtv.org/downloads/legacy/video4linux/API/V4L2_API/spec-single/v4l2.html Video for Linux Two API Specification Revision 2.6.32 Michael H Schimek <[email protected]> Bill Dirks Original author of the V4L2 API and documentation. Hans

UVA796 - Critical Links(Tarjan求桥)

In a computer network a link L, which interconnects two servers, is considered critical if there are atleast two servers A and B such that all network interconnection paths between A and B pass through L.Removing a critical link generates two disjoin

JAVA语言程序设计基础课后习题第四章

//exercise 4.1 package fourthchapterexercise1; import java.util.Scanner; public class first { public static void main(String[] args) { // TODO Auto-generated method stub int integer=0,sum=0,positive=0,negative=0; Scanner in=new Scanner(System.in); Sy

JAVA语言程序设计基础课后习题第三章

//exercise 3.1 package thirdchapterexercise1; import java.util.Scanner; public class first { public static void main(String[] args) { // TODO Auto-generated method stub Scanner in =new Scanner(System.in); System.out.print("Enter a,b,c:"); double

sdut 3-5 学生成绩统计

3-5 学生成绩统计 Time Limit: 1000MS Memory limit: 65536K 题目描述 通过本题目练习可以掌握对象数组的用法,主要是对象数组中数据的输入输出操作. 设计一个学生类Student它具有私有的数据成员:学号.姓名.数学成绩.英语成绩.计算机成绩:具有公有的成员函数:求三门课总成绩的函数int sum();求三门课平均成绩的函数double average();输出学生基本信息.总成绩和平均成绩的函数void print():设置学生数据信息的函数voidset