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. Python中的可迭代对象/迭代器/For循环工作机制/生成器

    本文分成6个部分: 1.iterable iterator区别 2.iterable的工作机制 3.iterator的工作机制 4.for循环的工作机制 5.generator的原理 6.总结 1.i ...

  2. maven是干什么的?

    最近在研究后台相关的东西,虽然前端还不是很了解吧~但是计算机一年没写后台代码,我快废掉了呀~emmmmm....他们老是和我说maven,恩恩,那就看看到底是啥?从大神聚集的知乎上拉了一篇过来~存档: ...

  3. Contest Round #451 (Div. 2)F/Problemset 898F Restoring the Expression

    题意: 有一个a+b=c的等式,去掉两个符号,把三个数连在一起得到一个数 给出这个数,要求还原等式,length <= 1e6 三个数不能含有前导0,保证有解 解法: 铁头过题法,分类然后各种判 ...

  4. TestNG的安装和使用

    一.TestNG安装 打开这个网址:https://marketplace.eclipse.org/content/testng-eclipse#group-external-install-butt ...

  5. 精彩的linux shell 命令

      1. Star Wars (telnet) telnet是基于Telnet协议的远程登录客户端程序,经常用来远程登录服务器.除此还可以用它来观看星球大战: telnet towel.blinken ...

  6. linux系统监控:记录用户操作轨迹,谁动过服务器

    1.前言 我们在实际工作当中,都碰到过误操作.误删除.误修改过配置文件等等事件.对于没有堡垒机的公司来说,要在linux系统上深究到底谁做过配置文件的修改.做过误删除是很头疼的事情,特别是遇到删库跑路 ...

  7. nyoj_85_有趣的数_201312122130

    有趣的数 时间限制:3000 ms  |           内存限制:65535 KB 难度:2   描述 把分数按下面的办法排成一个数表. 1/1 1/2 1/3 1/4..... 2/1 2/2 ...

  8. C#实现所有经典排序算法汇总

    C#实现所有经典排序算法1.选择排序 class SelectionSorter { private int min; public void Sort(int[] arr) { ; i < a ...

  9. 设计模式学习–Decorator

    What Decorator:动态地给一个对象加入一些额外的职责. 就添加功能来说.Decorator模式相比生成子类更加灵活. Why Decorator模式适用于能够动态的给对象增删职责.比方qq ...

  10. 改动mysqlpassword

    1.假设没有password,则 mysql -u root mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('newpass'); ...