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 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的更多相关文章
- SAP computer之input and MAR
Input and MAR Below the program counter is the input and MAR block. It includes the address and data ...
- SAP computer之program counter
Program counter The program is stored in memory with the first instruction at binary address 0000, t ...
- SAP computer之architecture
Simple-As-Possible computer introduces all the cruicial ideas behind computer operation without bury ...
- VMware12 安装 CentOS 6.5 64位
前言:本人在配置Hadoop的过程中,需要搭建Cent OS 64 环境,借此,顺便将Cent OS 64 的安装在此记录,方便自己,也方便大家学习.本次是在VM12虚拟机中实现Cent OS 64 ...
- 堆栈 & Stack and Heap
What's the difference between a stack and a heap? The differences between the stack and the heap can ...
- PostgreSQL Hardware Performance Tuning
Bruce Momjian POSTGRESQL is an object-relational database developed on the Internet by a group of de ...
- MongoDB十二种最有效的模式设计【转】
持续关注MongoDB博客(https://www.mongodb.com/blog)的同学一定会留意到,技术大牛Daniel Coupal 和 Ken W. Alger ,从 今年 2月17 号开始 ...
- Client Dataset Basics
文章出处: http://www.informit.com/articles/article.aspx?p=24094 In the preceding two chapters, I discus ...
- What’s the difference between a stack and a heap?
http://www.programmerinterview.com/index.php/data-structures/difference-between-stack-and-heap/ The ...
随机推荐
- python--(socket与粘包解决方案)
python--(socket与粘包解决方案) 一.socket: Socket 是任何一种计算机网络通讯中最基础的内容.例如当你在浏览器地址栏中输入 http://www.cnblogs.com/ ...
- BZOJ 1602 USACO 2008 Oct. 牧场行走
[题解] 要求出树上两点间的距离,树上的边有边权,本来应该是个LCA. 看他数据小,Xjb水过去了...其实也算是LCA吧,一个O(n)的LCA... #include<cstdio> # ...
- vue 中全局filter过滤器的配置及使用
在项目中使用到的经常用到过滤器,比如时间,数据截取等过滤器,如果在每个.vue中都可以复制同一个过滤器,这可以达到目的,但是遇到方法有bug时就需要诸葛修改进入不同的页面修改,这样既费时又费力,优先可 ...
- “从客户端(content="XXXX")中检测到有潜在危险的 Request.Form值” 解决方案
解决方案一: 在.aspx文件头中加: <%@Page validateRequest="false" %> 解决方案二: 修改web.config文件: <co ...
- [Bzoj4195] [NOI2015] 程序自动分析 [并查集,哈希,map] 题解
用并查集+离散化,注意:并查集数组大小不是n而是n*2 #include <iostream> #include <algorithm> #include <cstdio ...
- 洛谷 P2195 HXY造公园
P2195 HXY造公园 题目描述 现在有一个现成的公园,有n个休息点和m条双向边连接两个休息点.众所周知,HXY是一个SXBK的强迫症患者,所以她打算施展魔法来改造公园并即时了解改造情况.她可以进行 ...
- Spring MVC-集成(Integration)-集成LOG4J示例(转载实践)
以下内容翻译自:https://www.tutorialspoint.com/springmvc/springmvc_log4j.htm 说明:示例基于Spring MVC 4.1.6. 以下示例说明 ...
- [转]十五天精通WCF——第三天 client如何知道server提供的功能清单
通常我们去大保健的时候,都会找姑娘问一下这里能提供什么服务,什么价格,这时候可能姑娘会跟你口述一些服务或者提供一份服务清单,这样的话大 家就可以做到童嫂无欺,这样一份活生生的例子,在wcf中同样是一 ...
- 详略。。设计模式1——单例。。。。studying
设计模式1--单例 解决:保证了一个类在内存中仅仅能有一个对象. 怎么做才干保证这个对象是唯一的呢? 思路: 1.假设其它程序可以任意用new创建该类对象,那么就无法控制个数.因此,不让其它程序用ne ...
- 南昌互联网行业协会筹办者祝真和华罡团队-2014年12月江西IDC排行榜
他出自军营,拥有一身正气. 他在南昌创业,立意卓越. 从站点開始.到微营销.到线上教育,全面开花. 他在朋友圈看到不对的内容,就会即时批评. 他对朋友,又是很的和蔼可亲. 他就是南昌华罡网络创办 ...