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. TypeError与ValueError的区别

    typeerror:函数或方法接受了不适当的[类型]的参数,比如sum('nick'),sum函数不接受字符串类型:valueerror:函数或方法虽然接受了正确的[类型]的参数,但是该参数的[值]不 ...

  2. 6.3.4 使用marshal 模块操作二进制文件

    Python 标准库 marshal 也可以进行对象的序列化和反序列化,下面的代码进行了简单演示. import marshal x1 = 30 x2 = 5.0 x3 = [1,2,3] x4 = ...

  3. ES6的let和var声明变量的区别

    关于let的描述 let允许你声明一个作用域被限制在块级中的变量.语句或者表达式.与var关键字不同的是,它声明的变量只能是全局或者整个函数块的. 作用域规则 let声明的变量只在其声明的块或子块中可 ...

  4. POJ River Hopscotch 二分搜索

    Every year the cows hold an event featuring a peculiar version of hopscotch that involves carefully ...

  5. keras与sklearn的结合使用

    keras与sklearn的结合使用 新建 模板 Fly Time: 2017-4-14 引言 代码 引言 众所周知,keras目前没有提供交叉验证的功能,我们要向使用交叉验证,就需要与sklearn ...

  6. 2014年辛星解读css第二节

    第一节我们简单介绍了一下CSS的工作流程,我相信读者会有一个大体的认识,那么接下来我们将会深入的研究一下CSS的细节问题,这些问题的涉及将会使我们的工作更加完好. *************凝视*** ...

  7. HTML导航 - 点击更改背景

    步骤一: 在须要添加效果的<li>标签中添加onclick事件:<li onclick="setcurrent(this)"> 步骤二: 加入JS代码: f ...

  8. Android - Error: &quot;java.io.IOException: setDataSource failed.: status=0x80000000&quot;

    Error: "java.io.IOException: setDataSource failed.: status=0x80000000" 本文地址: http://blog.c ...

  9. 卡尔曼滤波(Kalman Filter) 的进一步讨论

    我们在上一篇文章中通过一个简单的样例算是入门卡尔曼滤波了.本文将以此为基础讨论一些技术细节. 卡尔曼滤波(Kalman Filter) http://blog.csdn.net/baimafujinj ...

  10. React-Router 中文简明教程(上)

    概述 说起 前端路由,如果你用过前端 MV* 框架构建 SPA 应用(单页面应用),对此一定不陌生. 传统开发中的 路由,是由服务端根据不同的用户请求地址 URL,返回不同内容的页面,而前端路由则将这 ...