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 from MAR and a read operation is performed. In this way, the instuction or data word stored in the RAM is placed on the W bus for use in some other part of the computer.

 library IEEE;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all; entity ROM_16_8 is
port
(
READ : in std_logic; --! Active low enable ROM signal, (tri-state)
ADDRESS : in std_logic_vector ( downto ); --! -bit ROM address bits from MAR
DATA_OUT : out std_logic_vector ( downto ) --! -bit ROM output word to W-bus
);
end ROM_16_8 ; architecture beh of ROM_16_8 is type mem is array ( to ) of std_logic_vector( downto ) ;
signal rom : mem; begin
20 --! This program works as follow:
21 --!
22 --! Load 5 to AC (memory content of 9)
23 --! Output 5 (content of AC)
24 --! Add 7 (memory content of 10) to 5 (AC content)
25 --! Output 12 (content of AC)
26 --! Add 3 (memory content of 11) to 12 (AC content)
27 --! Subtract 4 (memory content of 12) from 15 (AC content)
28 --! Output 11 (content of AC)
rom <= (
=> "" , -- LDA 9h ... Load AC with the content of memory location 9
=> "" , -- OUT
=> "" , -- ADD Ah ... Add the contents of memory location A to the AC content and replace the AC
=> "" , -- OUT
=> "" , -- ADD Bh ... Add the contents of memory location B to the AC content and replace the AC
=> "" , -- SUB Ch ... Sub the contents of memory location C from the AC content and replace the AC
=> "" , -- OUT
=> "" , -- HLT
=> "" ,
=> "" , --5
=> "" , --7
=> "" , --3
=> "" , --4
=> "" ,
=> "" ,
=> "" ); process (READ,ADDRESS)
begin
if READ = '' then
DATA_OUT <= rom(to_integer(unsigned(ADDRESS))) ;
else
DATA_OUT <= (DATA_OUT'range => 'Z');
end if;
end process ; end beh;

SAP computer之RAM的更多相关文章

  1. SAP computer之input and MAR

    Input and MAR Below the program counter is the input and MAR block. It includes the address and data ...

  2. SAP computer之program counter

    Program counter The program is stored in memory with the first instruction at binary address 0000, t ...

  3. SAP computer之architecture

    Simple-As-Possible computer introduces all the cruicial ideas behind computer operation without bury ...

  4. VMware12 安装 CentOS 6.5 64位

    前言:本人在配置Hadoop的过程中,需要搭建Cent OS 64 环境,借此,顺便将Cent OS 64 的安装在此记录,方便自己,也方便大家学习.本次是在VM12虚拟机中实现Cent OS 64 ...

  5. 堆栈 & Stack and Heap

    What's the difference between a stack and a heap? The differences between the stack and the heap can ...

  6. PostgreSQL Hardware Performance Tuning

    Bruce Momjian POSTGRESQL is an object-relational database developed on the Internet by a group of de ...

  7. MongoDB十二种最有效的模式设计【转】

    持续关注MongoDB博客(https://www.mongodb.com/blog)的同学一定会留意到,技术大牛Daniel Coupal 和 Ken W. Alger ,从 今年 2月17 号开始 ...

  8. Client Dataset Basics

    文章出处:  http://www.informit.com/articles/article.aspx?p=24094 In the preceding two chapters, I discus ...

  9. What’s the difference between a stack and a heap?

    http://www.programmerinterview.com/index.php/data-structures/difference-between-stack-and-heap/ The ...

随机推荐

  1. Vue 安装教程

    1.下载node.js https://nodejs.org/en/ 2.检查环境变量: npm init (初始化项目) npm i webpack vue vue-loader 安装依赖: npm ...

  2. Android传递Bitmap的两种简单方式及其缺陷

    Android传递Bitmap的几种简单方式 一,通过Intent的Bundle. 比如有两个activity,A,B,从A进入B.先在A中将Bitmap写进去: Resources res=getR ...

  3. [bzoj3207]花神的嘲讽计划Ⅰ[可持久化线段树,hash]

    将每k个数字求一个哈希值,存入可持久化线段树,直接查询即可 #include <iostream> #include <algorithm> #include <cstd ...

  4. 关于linux中使用vim打开文件出现^M的解决方法

    在linux下,不可避免的会用VIM打开一些windows下编辑过的文本文件.我们会发现文件的每行结尾都会有一个^M符号,这是因为 DOS下的编辑器和Linux编辑器对文件行末的回车符处理不一致, 各 ...

  5. hdu_1213_How Many Tables_201403091126

    How Many Tables Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)T ...

  6. 3D数学读书笔记——多坐标系和向量基础

    本系列文章由birdlove1987编写,转载请注明出处. 文章链接: http://blog.csdn.net/zhurui_idea/article/details/24662453 第一个知识点 ...

  7. Android开发之WebView的开发使用(源码分享)

    假设我们想提供一个web应用程序(或仅仅是一个网页)作为client应用程序的一部分,我们能够使用WebView.WebView类是Android的视图类的扩展,它同意您显示web页面的一部分活动布局 ...

  8. ledisDB底层实现——本质上就是用leveldb这样的底层存储,和ssdb一样,meta里存的是hash、list等的元数据

    Hash hash可以算是一种两级kv,首先通过key找到一个hash对象,然后再通过field找到或者设置相应的值. 在ledisdb里面,我们需要将key跟field关联成一个key,用来存放或者 ...

  9. mtools 是由MongoDB 官方工程师实现的一套工具集,可以很快速的日志查询分析、统计功能,此外还支持本地集群部署管理.

    mtools 是由MongoDB 官方工程师实现的一套工具集,可以很快速的日志查询分析.统计功能,此外还支持本地集群部署管理 https://www.cnblogs.com/littleatp/p/9 ...

  10. B1821 [JSOI2010]Group 部落划分 Group 二分答案&&并查集

    这个题正解是最小生成树,但是...最大值最小?一看就是二分答案啊!不用多想,直接二分答案加暴力验证就行了. 题干: Description 聪聪研究发现,荒岛野人总是过着群居的生活,但是,并不是整个荒 ...