流水线CPU的Verilog代码.rar

源代码在线查看: cputop.v

软件大小: 17 K
上传用户: yhb71181491615
关键词: Verilog CPU 流水线
下载地址: 免注册下载 普通下载 VIP

相关代码

				`timescale 1ns/10ps
				`define PERIOD 100
				
				module cputop;
					reg clk;
					reg reset;
					
					initial
						begin
							clk = 1;
							
							system_reset;
						end	
				
					pipelinedCPU CPU_instance(.clk(clk), .reset(reset));
					
					always #(`PERIOD/2) clk = ~ clk;
					
					task system_reset;
						begin
							reset = 0;
							#(`PERIOD * 0.7) reset = 1;
							#(`PERIOD * 1.5) reset = 0;
						end
					endtask
					
				//	task test;
				//	begin
				//		$readmemb ("test.pro", CPU_instance.instruction_fetch_instance.instruction_memory_instance.memory);
				//		$display("instruction_memory loaded successfully!");
				//	end
				//	endtask
					
				
				endmodule			

相关资源