Cao 12
Cao 12
Lab No: 12
Introduction:
In the rapidly evolving landscape of digital design and computer
architecture, understanding the intricacies of processor design is
fundamental. The Verilog Design of 16-bit RISC Processor-I lab
serves as a foundational exploration into the realm of RISC (Reduced
Instruction Set Computing) processors, leveraging Verilog HDL
(Hardware Description Language) as the primary tool for
implementation. This lab introduces students to the fundamental
concepts and methodologies involved in designing and simulating a
16-bit RISC processor, aiming to equip them with practical skills and
theoretical insights. The lab begins by familiarizing students with the
underlying principles of RISC architecture, emphasizing its
streamlined instruction set design and efficient execution strategies.
Verilog code for the RISC processor:
1. Verilog code for Instruction Memory :
`include "Parameter.v"
// Verilog code for RISC Processor //
Verilog code for Instruction Memory
module Instruction_Memory( input[15:0]
pc, output[15:0] instruction
);
reg [`col - 1:0] memory [`row_i - 1:0];
wire [3 : 0] rom_addr = pc[4 : 1]; initial
begin
$readmemb("./test/test.prog", memory,0,14); end
assign instruction = memory[rom_addr];
CEL-221 Computer Architecture & Organization Lab Page
endmodule
reg [7:0]datamem[600:0];
always@(posedge
clk) begin
if(MemRead)
begin
datamem[Address+0]<=WriteData[7:0];
datamem[Address+1]<=WriteData[15:8];
datamem[Address+2]<=WriteData[23:16];
datamem[Address+3]<=WriteData[31:24];
end
else if(MemWrite)
begin
DataOut[7:0]<=datamem[Address+0];
DataOut[15:8]<=datamem[Address+1];
DataOut[23:16]<=datamem[Address+2];
DataOut[31:24]<=datamem[Address+3];
end
end
endmodule
Output:
Conclusion:
The Verilog Design of 16-bit RISC Processor-I lab has provided
students with a comprehensive introduction to the principles and
practices of designing a RISC (Reduced Instruction Set Computing)
processor using Verilog HDL (Hardware Description Language).
Throughout this lab, students have navigated through the complexities
of RISC architecture, focusing on the efficient execution of
instructions and the streamlined design of the instruction set. Starting
from the fundamental components such as registers, the Arithmetic
Logic Unit (ALU), control units, and the data path, students have
gained practical experience in translating theoretical concepts into
functional digital circuits.