-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPC.vhd
39 lines (30 loc) · 917 Bytes
/
PC.vhd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
-- Praktikum EL3111 Arsitektur Sistem Komputer
-- Modul : 5
-- Percobaan : 1 dan 2
-- Tanggal : 25 November 2021
-- Rombongan : C (tuker dari A)
-- Nama (NIM) : Christian Reivan (13219005)
-- Nama File : PC.vhd
-- Deskripsi : Implementasi blok Program Counter
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.NUMERIC_STD.ALL;
entity PC is
Port ( clock: in STD_LOGIC;
PC_in: in STD_LOGIC_VECTOR(31 DOWNTO 0);
PC_out: out STD_LOGIC_VECTOR (31 downto 0));
end PC;
architecture Behavioral of PC is
SIGNAL wire_in: STD_LOGIC_VECTOR(31 DOWNTO 0);
SIGNAL wire_out: STD_LOGIC_VECTOR(31 DOWNTO 0);
BEGIN
--Kombinasional
wire_in <= PC_in;
PC_out <= wire_out;
process(clock)
begin
if(rising_edge(clock)) then
wire_out <= wire_in;
end if;
end process;
end Behavioral;