Skip to content

Commit

Permalink
Add Sean addons to PC NOTE: Code was not compiling I commented the MU…
Browse files Browse the repository at this point in the history
…X that are not done right we need to use the one created in MIPSPackage this will need to be fix
  • Loading branch information
kapare committed Mar 16, 2012
1 parent e723310 commit a17c0fa
Showing 1 changed file with 37 additions and 42 deletions.
79 changes: 37 additions & 42 deletions PC.vhd
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ END PC;

ARCHITECTURE PCArchitechture OF PC is

SIGNAL s_SignImm_sl2, s_PcNext, s_BascOut, s_MuxAddOut, s_PcPlus4, s_PCBranch: STD_LOGIC_VECTOR (31 DOWNTO 0);
SIGNAL s_SignImmSh, s_PcNext, s_BascOut, s_PCNextbr, s_PcPlus4, s_PCBranch, s_PCJump: STD_LOGIC_VECTOR (31 DOWNTO 0);
SIGNAL s_plus4 : STD_LOGIC_VECTOR (31 DOWNTO 0):= "00000000000000000000000000000100";
SIGNAL s_Instr_sl2 : STD_LOGIC_VECTOR (27 DOWNTO 0);
SIGNAL s_NotConnected : STD_LOGIC_VECTOR (31 DOWNTO 0):= "00000000000000000000000000000000";
Expand All @@ -32,61 +32,56 @@ SIGNAL s_NotConnected : STD_LOGIC_VECTOR (31 DOWNTO 0):= "0000000000000000000000
BEGIN
--component mux x 2

--port_assign_mux_add : mux2_1 PORT MAP(
--m2_i0 => ,
--m2_i1 => ,
--m2_sel => PCSrc ,
--m2_q => s_MuxAddOut


--);

--port_assign_mux_pcnext : mux2_1 PORT MAP(
--m2_i0 => ,
--m2_i1 => , --which one is activated by `1`?
-- m2_sel => Jump,
-- m2_q => s_PcNext


--port_assign_mux_add : MUX21Generic PORT MAP(
-- MUXInput0 => s_PcPlus4 ,
-- MUXInput1 => s_PCBranch ,
-- MUXSel => PCSrc ,
-- MUXOutput => s_PCNextbr
-- );

--port_assign_mux_pcnext : MUX21Generic PORT MAP(
-- MUXInput0 => s_PCJump ,
-- MUXInput1 => s_MuxAddOut ,
-- MUXSel => Jump,
-- MUXOutput => s_PcNext
--);


--component adders x 2

--add_plus4 : full_adder_32 PORT MAP(
--a => s_BascOut,
--b => s_plus4,
--c_in => s_NotConnected,
--sum => s_PcPlus4,
--c_out => s_NotConnected
--);
add_plus4 : full_adder_32 PORT MAP(
a => s_BascOut,
b => s_plus4,
c_in => s_NotConnected,
sum => s_PcPlus4,
c_out => s_NotConnected
);


--add_PC_SignImm : full_adder_32 PORT MAP(
--a => s_PcPlus4,
--b => s_SignImm_sl2,
--c_in => s_NotConnected,
--sum => s_PCBranch,
--c_out =>s_NotConnected
--);
add_PC_SignImm : full_adder_32 PORT MAP(
a => s_PcPlus4,
b => s_SignImmSh,
c_in => s_NotConnected,
sum => s_PCBranch,
c_out =>s_NotConnected
);


--component bascules x 1
--bascule : DFlipFlop PORT MAP (
--
-- D => s_PcNext,
-- Clock => Clock,
-- Reset => Reset,
-- Q => s_BascOut
--
--);


bascule : DFlipFlop PORT MAP (

D => s_PcNext,
Clock => Clock,
Reset => Reset,
Q => s_BascOut

);


--lines of code for &

--lines of code for sl x 2
s_SignImmSh <= SignImm sll 2;
s_PCJump <= s_PcPlus4(31 downto 28) & (Instr sll 2);

--lines for the other interconnections

Expand Down

0 comments on commit a17c0fa

Please sign in to comment.