Einführung in Computer Microsystems
Einführung in Computer Microsystems
Einführung in Computer Microsystems
Sie wollen auch ein ePaper? Erhöhen Sie die Reichweite Ihrer Titel.
YUMPU macht aus Druck-PDFs automatisch weboptimierte ePaper, die Google liebt.
) Operand 1: Control=0 und Daten=Adresse von Operand 1 im RAM.<br />
c) Operand 2: Control=0 und Daten=Adresse von Operand 2 im RAM.<br />
d) Ergebnis: Control=0 und Daten=Adresse im RAM an die das Ergebnis geschrieben werden soll.<br />
Die mitgelieferte Testbench enthält jeweils e<strong>in</strong>en Test für die Addition und für die Multiplikation. Nach der Addition sollte an<br />
ram(6) = 006911 16 stehen. Bei der Multiplikation entsprechend ram(6) = 010B81 16 .<br />
Der Automat für die Kommunikation für den FSL:<br />
library IEEE;<br />
use IEEE.STD_LOGIC_1164.ALL;<br />
use IEEE.STD_LOGIC_ARITH.ALL;<br />
use IEEE.STD_LOGIC_UNSIGNED.ALL;<br />
use work.datatypes.all;<br />
entity fsl is<br />
Port(<br />
-- Bus protocol ports , do not add or delete.<br />
FSL_Clk : <strong>in</strong> std_logic;<br />
FSL_Rst : <strong>in</strong> std_logic;<br />
FSL_S_Read : out std_logic;<br />
FSL_S_Data : <strong>in</strong> std_logic_vector(0 to 7);<br />
FSL_S_Control : <strong>in</strong> std_logic;<br />
FSL_S_Exists : <strong>in</strong> std_logic<br />
-- DO NOT EDIT ABOVE THIS LINE ---------------------<br />
);<br />
end fsl;<br />
architecture Behavioral of fsl is<br />
component fsm is<br />
Port ( clock : <strong>in</strong> STD_LOGIC;<br />
reset : <strong>in</strong> STD_LOGIC;<br />
op1_addr : <strong>in</strong> type_wd_addr;<br />
op2_addr : <strong>in</strong> type_wd_addr;<br />
result_addr : <strong>in</strong> type_wd_addr;<br />
operation : <strong>in</strong> operation_type;<br />
start : <strong>in</strong> STD_LOGIC;<br />
ready : out STD_LOGIC);<br />
end component fsm;<br />
for all: fsm use entity work.fsm(Behavioral);<br />
type fsl_state_type is (WAIT_READY , CMD , OP1 , OP2 , RES , WAIT_READY_ZERO);<br />
signal r_op1 : type_wd_addr;<br />
signal r_op2 : type_wd_addr;<br />
signal r_res : type_wd_addr;<br />
signal r_operation : operation_type;<br />
signal r_start : STD_LOGIC;<br />
signal r_ready : STD_LOGIC;<br />
signal r_read : STD_LOGIC;<br />
signal FSL_STATE : fsl_state_type;<br />
beg<strong>in</strong><br />
component_fsm : fsm port map(<br />
clock => FSL_Clk ,<br />
reset => FSL_Rst ,<br />
op1_addr => r_op1 ,<br />
op2_addr => r_op2 ,<br />
result_addr => r_res ,<br />
operation => r_operation ,<br />
start => r_start ,<br />
ready => r_ready<br />
);<br />
FSL_S_Read