24.03.2013 Views

ModelSim SE User's Manual - Electrical and Computer Engineering

ModelSim SE User's Manual - Electrical and Computer Engineering

ModelSim SE User's Manual - Electrical and Computer Engineering

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

UM-106 4 - VHDL simulation<br />

<strong>ModelSim</strong> <strong>SE</strong> User’s <strong>Manual</strong><br />

BEGIN<br />

END COMPONENT;<br />

-------------------------------------------<br />

-- Intermediate signals <strong>and</strong> constants<br />

-------------------------------------------<br />

SIGNAL addr : unsigned(19 DOWNTO 0);<br />

SIGNAL inaddr : unsigned(3 DOWNTO 0);<br />

SIGNAL outaddr : unsigned(3 DOWNTO 0);<br />

SIGNAL data_in : unsigned(31 DOWNTO 0);<br />

SIGNAL data_in1 : std_logic_vector(7 DOWNTO 0);<br />

SIGNAL data_sp1 : std_logic_vector(7 DOWNTO 0);<br />

SIGNAL we : std_logic;<br />

SIGNAL clk : std_logic;<br />

CONSTANT clk_pd : time := 100 ns;<br />

---------------------------------------------------<br />

-- instantiations of single-port RAM architectures.<br />

-- All architectures behave equivalently, but they<br />

-- have different implementations. The signal-based<br />

-- architecture (rtl) is not a recommended style.<br />

--------------------------------------------------spram1<br />

: entity work.sp_syn_ram_protected<br />

GENERIC MAP (<br />

data_width => 8,<br />

addr_width => 12)<br />

PORT MAP (<br />

inclk => clk,<br />

outclk => clk,<br />

we => we,<br />

addr => addr(11 downto 0),<br />

data_in => data_in1,<br />

data_out => data_sp1);<br />

-------------------------------------------<br />

-- clock generator<br />

------------------------------------------clock_driver<br />

: PROCESS<br />

BEGIN<br />

clk

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!