Input and MAR
Below The program counter is the input and MAR block.
It includes the address and data switch registers. These switch registers is part of the that input unit which allow you to send 4 address bits and 8 data bits to RAM. As you recall, instruction and data words is 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 was latched into the MAR. A bit later, the MAR applies this 4-bits address to teh RAM, where a read operation is performed.
1 LibraryIEEE;2 Useieee.std_logic_1164. All;3 use IEEE.NUMERIC_STD.All;
4
6 EntityMAR is7 Port8 (9Class:inch Std_logic;--! Rising Edge ClockTenClr:inch Std_logic;--! Active High Asynchronous clear OneLm:inch Std_logic;--! Active Low Load MAR AD:inch Std_logic_vector(3 Downto 0);--! MAR 4-bit Address Input -Q: out Std_logic_vector(3 Downto 0)--! MAR 4-bit Address Output - ); the EndMAR; - - ArchitectureBeh ofMAR is - begin + - Process(clr,clk,lm,d) + begin A ifCLR ='1' Then atQ <="0000"; -elsif LM ='0' Then - if(CLK'event and CLK ='1') Then -Q <=D; - End if; - End if; in End Process; - to EndBeh
SAP computer input and MAR