SAP computer之input and MAR

來源:互聯網
上載者:User

標籤:

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 clock10 CLR : in std_logic;  --! Active high asynchronous clear11 LM : in std_logic;   --! Active low load MAR12 D : in std_logic_vector(3 downto 0); --! MAR 4-bit address input13 Q : out std_logic_vector(3 downto 0) --! MAR 4-bit address output14 );15 end MAR ;16 17 architecture beh of MAR is18 begin19 20 process (CLR,CLK,LM,D)21 begin22 if CLR = ‘1‘ then23 Q <= "0000";24 elsif LM = ‘0‘ then25 if (CLK‘event and CLK = ‘1‘) then26 Q <= D;27 end if;28 end if;29 end process;30 31 end beh;

 

   

SAP computer之input and MAR

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.