-- G. Kemnitz: Technische Informatik -- Band 2: Entwurf digitaler Schaltungen -- 4.4.1 SRAM -- -- Simulationsmodell für einen asynchronen SRAM-Schaltkreis -- Bei einer Simulation mit ghdl muss der Adressbereich kleiner gewählt -- werden, weil der Stack für eine 4MB-Speichermatrix nicht ausreicht --------------------------------------------------------------------- library ieee; use ieee.std_logic_1164.all; library Tuc; use Tuc.Numeric_Sim.all; use Tuc.Ausgabe.all; use work.RAM_pack.all; entity IS61 is port(adr: tUnsigned(7 downto 0); dat: inout std_logic_vector(15 downto 0); n_oe, n_cs, n_wr: std_logic); end entity; architecture sim of IS61 is signal y: std_logic_vector(15 downto 0); signal W, E: std_logic; begin W <= not n_cs and not n_wr; E <= not n_oe and not n_cs and n_wr after 4 ns; process(oe, y) begin if E='1' then dat <= y; elsif E='0' then dat <= (others=>'Z'); else dat <= (others=>'X'); end if; end process; ram(W=>W, a=>adr, x=>dat, y=>y, thy=> 2 ns, tdy=> 5 ns, tsa=> 2 ns, tna=> 0 ns, twr=> 7 ns, tsx=> 4 ns); end architecture;