Abstrak - In this practicum, module III there are sederhana dalam bahasa assembly yang
4 assignments experiments related to component dapat dieksekusi pada MIPS32®.
design MIPS32® microprocessor. Software used
Praktikan dapat melakukan simulasi
for pratikum including functioning Altera
eksekusi program MIPS32® pada
Quartus® II v9.1 sp2 to do circuit synthesis and
simulation and Notepad ++ to create program program simulasi SPIM dan memahami
code in VHDL Language. That result obtained in cara setiap instruksi dieksekusi.
this experiment that is praktikan know how to Praktikan dapat membuat instruction
make instruction memory, data memory and memory, data memory dan register dari
registers in VHDL Language as well as doing MIPS32® dalam kode VHDL yang
synthesizable and functional simulations and synthesizable dan dapat disimulasikan
timings. dengan Altera® Quartus® II v9.1sp2.
Terdapat tiga jenis concurent signal assignment Selain concurent signal assignment, dalam
(CSA) dalam bahasa VHDL, yaitu simple CSA, bahasa VHDL juga dikenal dengan construct
conditionalCSA, dan selected CSA. Ketiga jenis PROCESS yang berfungsi melakukan
assignment sinyal secara se kuensial. Sebuah
proses (PROCESS) dapat dianalogikan sebagai tergantung implementasi). Sedangkan D Flip-
bagian dari rangkaian yang dapat aktif dan dapat flop memiliki karakteristik yaitu output akan
nonaktif. Sebuah proses akan diaktifkan ketika berubah mengikuti input saat transisi clock dari
sinyal-sinyal (SIGNAL) dalam daftar sensitivitas low ke high (atau high ke low, tergantung
(sensitivity list) mengalami perubahan nilai. implementasi). Untuk elemen memory lain
Ketika diaktifkan, semua ekspresi dan pernyataan seperti GatedS-R Latch, T Flip-flop, dan JK Flip-
(statement) akan dieksekusi secara sekuensial flop juga dapat diimplementasikan pada bahasa
hingga akhir dari proses tersebut. VHDL namun mereka jarang digunakan.
ENTITY instruction_memory IS
PORT ( imemory.mif
ADDR : IN
STD_LOGIC_VECTOR (15 DOWNTO 0); WIDTH=32; -- number of bits of data per
clock : IN STD_LOGIC := word
'1'; DEPTH=256; -- the number of addresses
INSTR : OUT ADDRESS_RADIX=HEX;
STD_LOGIC_VECTOR(31 DOWNTO 0) DATA_RADIX=HEX;
); CONTENT
END ENTITY; BEGIN
00 : 8c020000;
ARCHITECTURE structural OF 04 : 8c030001;
instruction_memory IS 08 : 00430820;
SIGNAL sub_wire0 : 0C : ac010003;
STD_LOGIC_VECTOR(31 DOWNTO 0); 10 : 1022ffff;
COMPONENT altsyncram 14 : 1021fffa;
GENERIC 06 : 0043282a;
( 07 : 10a00002;
init_file : STRING; 09 : 1000fffb;
10 : ac040000; ARCHITECTURE structural OF
11 : 1000ffff; data_memory IS
END
COMPONENT altsyncram
-- komponen memori
Tugas 3 GENERIC
(
data_memory.vhd init_file : STRING; -- name
of the .mif file
operation_mode : STRING; -
-- Praktikum ELS3102 Arsitektur Sistem
- the operation mode
Komputer
widthad_a : NATURAL; --
-- Modul
width of address_a[ ]
:3
width_a : NATURAL --
-- Percobaan :3
width of data_a[ ]
-- Tanggal
);
: 06 November 2019
PORT
-- Nama (NIM) 1 : Sari
(
Feronika Nadapdap (1417017)
wren_a : IN STD_LOGIC; --
-- Nama File :
Write Enable Activation
data_memory.vhd
clock0 : IN STD_LOGIC ; --
-- Deskripsi :
Clock
Desain data memory dengan menggunakan
address_a : IN
template desain Altera MegaFunction
STD_LOGIC_VECTOR (7 DOWNTO 0); --
ALTSYNCRAM
Address Input
q_a : OUT
LIBRARY ieee;
STD_LOGIC_VECTOR (7 DOWNTO 0); --
USE ieee. std_logic_1164. all;
Data Output
LIBRARY altera_mf;
data_a : IN
USE altera_mf. all;
STD_LOGIC_VECTOR (7 DOWNTO 0) --
Data Input
ENTITY data_memory IS
);
PORT (
END COMPONENT;
ADDR : IN
STD_LOGIC_VECTOR (7 DOWNTO 0); --
BEGIN
alamat
WR_EN : IN
altsyncram_component : altsyncram
STD_LOGIC; --Indikator Penulisan
RD_EN : IN
GENERIC MAP
STD_LOGIC; --Indikator Pembacaan
(
clock : IN
init_file =>
STD_LOGIC := '1' ; -- clock
"dmemory.mif",
RD_Data :
operation_mode =>
OUT STD_LOGIC_VECTOR (7 DOWNTO
"SINGLE_PORT",
0) ;
widthad_a => 8,
WR_Data : IN
width_a => 8
STD_LOGIC_VECTOR (7 DOWNTO 0)
)
);
PORT MAP
END data_memory ;
(
wren_a => WR_EN
AND not RD_EN, -- isi yang sesuai
address_a => ADDR, USE IEEE. STD_LOGIC_1164. ALL;
clock0 => clock, USE IEEE. STD_LOGIC_ARITH. ALL;
q_a => RD_Data, -- USE IEEE. STD_LOGIC_UNSIGNED. ALL;
isi yang sesuai LIBRARY altera_mf;
data_a => WR_Data USE altera_mf. ALL;
);
END structural; ENTITY reg_file IS
PORT (
clock : IN
dememory.mif STD_LOGIC; -- clock
WR_EN : IN
WIDTH= 8; -- number of bits of data per STD_LOGIC; -- write enable
word ADDR_1 : IN
DEPTH= 256; -- the number of addresses STD_LOGIC_VECTOR (4 DOWNTO 0); --
ADDRESS_RADIX=HEX; Input 1
DATA_RADIX=HEX; ADDR_2 : IN
CONTENT STD_LOGIC_VECTOR (4 DOWNTO 0); --
BEGIN Input 2
00 : 8c; ADDR_3 : IN
01 : 8c; STD_LOGIC_VECTOR (4 DOWNTO 0); --
02 : 00; Input 3
03 : ac; WR_Data_3 : IN
04 : 10; STD_LOGIC_VECTOR (31 DOWNTO 0); --
05 : 10; write data
06 : 00; RD_Data_1 : OUT
07 : 10; STD_LOGIC_VECTOR(31 DOWNTO 0); --
08 : 10; read data 1
09 : ac; RD_Data_2 : OUT
0a : 10; STD_LOGIC_VECTOR(31 DOWNTO 0) --
END; read data 2
);
Tugas 4 END ENTITY;