[導(dǎo)讀]本CPU設(shè)計(jì)基于16bitRISC指令集、哈佛結(jié)構(gòu)完成,架構(gòu)圖如下:CPU架構(gòu)A.MemoryAccessInstructions1.LoadWord:????????LDws,offset(rs1)ws:=Mem16[rs1offset]2.StoreWord:????????...
本
CPU設(shè)計(jì)基于16bit RISC指令集、哈佛結(jié)構(gòu)完成,架構(gòu)圖如下:
CPU架構(gòu)A. Memory Access Instructions1. Load Word:? ? ? ? ? ? ? ?LD ws, offset(rs1) ws:=Mem16[rs1 offset]2. Store Word:? ? ? ? ? ? ? ?ST rs2, offset(rs1) Mem16[rs1 offset]=rs2
B. Data Processing Instructions1. Add:? ? ? ? ? ? ? ?ADD ws, rs1, rs2 ws:=rs1 rs22. Subtract:? ? ? ? ? ? ? ?SUB ws, rs1, rs2 ws:=rs1 – rs23. Invert (1‘s complement):? ? ? ? ? ? ? ?INV ws, rs1 ws:=!rs14. Logical Shift Left:? ? ? ? ? ? ? ?LSL ws, rs1, rs2 ws:=rs1 << rs25. Logical Shift Right:? ? ? ? ? ? ? ?LSR ws, rs1, rs2 ws:=rs1 >> rs26. Bitwise AND:? ? ? ? ? ? ? ?AND ws, rs1, rs2 ws:=rs1 ? rs27. Bitwise OR:? ? ? ? ? ? ? OR ws, rs1, rs2 ws:=rs1 | rs28. Set on Less Than:
? ? ? ? ? ? ?SLT ws, rs1, rs2 ws:=1 if rs1 < rs2; ws:=0 if rs1 ≥ rs2
C. Control Flow Instructions1. Branch on Equal:
? ? ? ? ? ? ? ?BEQ rs1, rs2, offset
? ? ? ? ? ? ? ?Branch to (PC 2 (offset << 1)) when rs1 = rs22. Branch on Not Equal:
? ? ? ? ? ? ? BNE rs1, rs2, offset
? ? ? ? ? ? ? Branch to (PC 2 (offset << 1)) when rs1 != rs23. Jump: JMP offset Jump to {PC [15:13], (offset << 1)}Instruction Format of the RISCProcessor Control Unit Design:
ALU Control Unit Design:Verilog code for the RISC processor:
1. Verilog code for?Instruction Memory?:
`include "Parameter.v"// fpga4student.com // FPGA projects, VHDL projects, Verilog projects // Verilog code for RISC Processor // Verilog code for Instruction Memorymodule 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];
endmodule2. Verilog code for?register file:
`timescale 1ns / 1ps// fpga4student.com // FPGA projects, VHDL projects, Verilog projects // Verilog code for RISC Processor // Verilog code for register filemodule GPRs( input clk, // write port input reg_write_en, input [2:0] reg_write_dest, input [15:0] reg_write_data, //read port 1 input [2:0] reg_read_addr_1, output [15:0] reg_read_data_1, //read port 2 input [2:0] reg_read_addr_2, output [15:0] reg_read_data_2); reg [15:0] reg_array [7:0]; integer i; // write port //reg [2:0] i; initial begin for(i=0;i<8;i=i 1) reg_array[i] <= 16'd0; end always @ (posedge clk ) begin if(reg_write_en) begin reg_array[reg_write_dest] <= reg_write_data; end end? assign reg_read_data_1 = reg_array[reg_read_addr_1];?assign?reg_read_data_2?=?reg_array[reg_read_addr_2];
endmodule3. Verilog code for Data Memory:
`include "Parameter.v"// fpga4student.com // FPGA projects, VHDL projects, Verilog projects // Verilog code for RISC Processor // Verilog code for data Memorymodule Data_Memory( input clk, // address input, shared by read and write port input [15:0] mem_access_addr, // write port input [15:0] mem_write_data, input mem_write_en, input mem_read, // read port output [15:0] mem_read_data);
reg [`col - 1:0] memory [`row_d - 1:0];integer f;wire [2:0] ram_addr=mem_access_addr[2:0];initial begin $readmemb("./test/test.data", memory); f = $fopen(`filename); $fmonitor(f, "time = %d\n", $time, "\tmemory[0] = %b\n", memory[0], "\tmemory[1] = %b\n", memory[1], "\tmemory[2] = %b\n", memory[2], "\tmemory[3] = %b\n", memory[3], "\tmemory[4] = %b\n", memory[4], "\tmemory[5] = %b\n", memory[5], "\tmemory[6] = %b\n", memory[6], "\tmemory[7] = %b\n", memory[7]); `simulation_time; $fclose(f); end always @(posedge clk) begin if (mem_write_en) memory[ram_addr] <= mem_write_data; end assign mem_read_data = (mem_read==1'b1) ? memory[ram_addr]: 16'd0;
endmodule
4. Verilog code for ALU unit:
// fpga4student.com // FPGA projects, VHDL projects, Verilog projects // Verilog code for RISC Processor // Verilog code for ALUmodule ALU( input [15:0] a, //src1 input [15:0] b, //src2 input [2:0] alu_control, //function sel output reg [15:0] result, //result output zero );
always @(*)begin case(alu_control) 3'b000: result = a b; // add 3'b001: result = a - b; // sub 3'b010: result = ~a; 3'b011: result = a< 3'b100: result = a>>b; 3'b101: result = a
欲知詳情,請(qǐng)下載word文檔
下載文檔
本站聲明: 本文章由作者或相關(guān)機(jī)構(gòu)授權(quán)發(fā)布,目的在于傳遞更多信息,并不代表本站贊同其觀點(diǎn),本站亦不保證或承諾內(nèi)容真實(shí)性等。需要轉(zhuǎn)載請(qǐng)聯(lián)系該專欄作者,如若文章內(nèi)容侵犯您的權(quán)益,請(qǐng)及時(shí)聯(lián)系本站刪除。
北京2022年10月19日 /美通社/ -- 隨著云計(jì)算、大數(shù)據(jù)的普及發(fā)展,過(guò)去的"云"是服務(wù)于大企業(yè)的計(jì)算模型,而十多年過(guò)去了,越來(lái)越多的應(yīng)用及業(yè)務(wù)走上"云端",對(duì)計(jì)算核心數(shù)需求...
關(guān)鍵字:
ARM
大數(shù)據(jù)
云游戲
CPU
在這篇文章中,小編將對(duì)CPU中央處理器的相關(guān)內(nèi)容和情況加以介紹以幫助大家增進(jìn)對(duì)CPU中央處理器的了解程度,和小編一起來(lái)閱讀以下內(nèi)容吧。
關(guān)鍵字:
CPU
中央處理器
晶圓
在桌面級(jí)處理器上,AMD多年來(lái)一直在多核上有優(yōu)勢(shì),不過(guò)12代酷睿開(kāi)始,Intel通過(guò)P、E核異構(gòu)實(shí)現(xiàn)了反超,13代酷睿做到了24核32線程,核心數(shù)已經(jīng)超過(guò)了銳龍7000的最大16核。在服務(wù)器處理器上,AMD優(yōu)勢(shì)更大,64...
關(guān)鍵字:
AMD
CPU
Intel
EUV
華為麒麟芯片(HUAWEI Kirin)是華為技術(shù)有限公司于2019年9月6日在德國(guó)柏林和北京同時(shí)發(fā)布的一款新一代旗艦芯片。華為麒麟在3G芯片大戰(zhàn)中,扮演了“黑馬”的角色。
關(guān)鍵字:
麒麟
CPU
華為Mate 50
據(jù)業(yè)內(nèi)信息,近日ADM的一份內(nèi)部報(bào)告顯示,ADM正在計(jì)劃降低其銳龍 7000 CPU的生產(chǎn)計(jì)劃。現(xiàn)階段全球市場(chǎng)PC的低迷和銷量下滑,再加上AM5平臺(tái)整體反響不佳等等一系列原因?qū)е翧DM采取這一行動(dòng)計(jì)劃。
關(guān)鍵字:
PC
ADM
銳龍 7000
CPU
北京2022年10月17日 /美通社/ -- "天下武功、唯快不破",數(shù)字經(jīng)濟(jì)時(shí)代尤甚。 數(shù)據(jù)極富價(jià)值,堪比新時(shí)代的石油。數(shù)字經(jīng)濟(jì)時(shí)代,數(shù)據(jù)價(jià)值如何快速、高效地釋放顯得尤為重要。自20...
關(guān)鍵字:
軟件
IO
SSD
CPU
Linux內(nèi)核是從V2.6開(kāi)始引入設(shè)備樹(shù)的概念,其起源于OF:OpenFirmware, 用于描述一個(gè)硬件平臺(tái)的硬件資源信息,這些信息包括:CPU的數(shù)量和類別、內(nèi)存基地址和大小、總線和橋、外設(shè)連接、中斷控制器和中斷使用情...
關(guān)鍵字:
Linux內(nèi)核
硬件
CPU
(微控制單元 MCU(Microcontroller Unit),又稱單片機(jī),是把中央處理器(CentralProcess Unit; CPU)的頻率與規(guī)格做適當(dāng)縮減,并將內(nèi)存(memory)、計(jì)數(shù)器(Timer)、US...
關(guān)鍵字:
單片機(jī)
芯片
CPU
日前,瀾起科技宣布其第三代津逮?CPU系列產(chǎn)品通過(guò)了VMware公司的產(chǎn)品兼容性認(rèn)證,達(dá)到VMware ESXi 7.0 U3虛擬化平臺(tái)的通用兼容性及性能、可靠性要求,滿足用戶的關(guān)鍵應(yīng)用需要。
關(guān)鍵字:
瀾起科技
CPU
VMware兼容性
CPU內(nèi)部自帶的定時(shí)器模塊,通過(guò)初始化、配置可以實(shí)現(xiàn)定時(shí),定時(shí)時(shí)間到以后就會(huì)執(zhí)行相應(yīng)的定時(shí)器中斷處理函數(shù)。硬件定時(shí)器一般都帶有其它功能,比如PWM輸出、輸入捕獲等等功能。但是缺點(diǎn)是硬件定時(shí)器數(shù)量少?。?/p>
關(guān)鍵字:
軟件定時(shí)器
硬件定時(shí)器
CPU
為了提高代碼密度,處理器選擇支持16位的壓縮指令集,因此程序會(huì)出現(xiàn)32bit和16bit同時(shí)出現(xiàn)的場(chǎng)景,32bit指令可能存在與32位地址邊界不對(duì)齊的情況,E203采用剩余緩存技術(shù)(Leftover Buffer)。IT...
關(guān)鍵字:
E203
CPU
SMIC的64bit SRAM
今晚NVIDIA的RTX 4090顯卡正式解禁,售價(jià)12999元的新一代顯卡旗艦展示出了強(qiáng)大的性能水平,之前官方表示在DLSS3、RTX等技術(shù)加成下,性能可是3-4倍于上代的RTX 3090顯卡。當(dāng)然,不考慮這些技術(shù)的話...
關(guān)鍵字:
CPU
顯卡
NVIDIA
銳龍7
最新的爆料顯示,英特爾第13代酷睿處理器 Raptor Lake CPU 和 700 系列主板價(jià)格將在第四季度上漲,預(yù)計(jì)漲幅降達(dá)20%。
此前就有消息稱,英特爾將在四季度對(duì)部分CPU和相關(guān)組件進(jìn)行漲價(jià)。近日,Boa...
關(guān)鍵字:
CPU
主板芯片
英特爾
近日,安謀科技(中國(guó))有限公司(以下簡(jiǎn)稱“安謀科技”)與此芯科技(上海)有限公司(以下簡(jiǎn)稱“此芯科技”)宣布深化合作。雙方將結(jié)合各自優(yōu)勢(shì)資源,依托安謀科技的高性能Arm IP及自研IP產(chǎn)品,以及此芯科技在CPU內(nèi)核、So...
關(guān)鍵字:
ARM
CPU
安謀科技
此芯科技
近日,央視《面對(duì)面》欄目專訪了中科院計(jì)算技術(shù)研究所總工程師、龍芯總設(shè)計(jì)師胡偉武,他講述了自己和中國(guó)“芯”的故事。一場(chǎng)工業(yè)產(chǎn)品發(fā)布會(huì)引發(fā)關(guān)注,主辦方龍芯中科聯(lián)合合作伙伴發(fā)布了29款自主工業(yè)系列產(chǎn)品,這些產(chǎn)品全部基于國(guó)產(chǎn)的自...
關(guān)鍵字:
龍芯
半導(dǎo)體
芯片
CPU
在下述的內(nèi)容中,小編將會(huì)對(duì)工控主板的相關(guān)消息予以報(bào)道,如果工控主板是您想要了解的焦點(diǎn)之一,不妨和小編共同閱讀這篇文章哦。
關(guān)鍵字:
工控主板
主板
CPU
為了應(yīng)對(duì)海量數(shù)據(jù)挑戰(zhàn),近日Arm對(duì)Arm? Neoverse? 路線圖進(jìn)行了再次更新——推出Neoverse V2平臺(tái)(代號(hào)“Demeter”)。
關(guān)鍵字:
ARM
CPU
云計(jì)算
據(jù)業(yè)內(nèi)消息,昨天國(guó)芯科技發(fā)布公告表示,國(guó)芯科技將使用自有資金大約五千萬(wàn)設(shè)立全資子公司無(wú)錫國(guó)芯微電子有限公司,目的是為了推進(jìn)RISC-V CPU研發(fā)和應(yīng)用業(yè)務(wù)的持續(xù)發(fā)展。
關(guān)鍵字:
RISC-V
CPU
Arm近日宣布Arm? Neoverse? 路線圖再添新員,新產(chǎn)品植根于Arm的可擴(kuò)展效率和技術(shù)領(lǐng)先地位,同時(shí)強(qiáng)化了Arm支持合作伙伴持續(xù)快速創(chuàng)新的承諾。
關(guān)鍵字:
ARM
CPU
云計(jì)算
9月9日,Intel CEO基辛格宣布在美國(guó)俄亥俄州投資200億美元新建大型晶圓廠,這是Intel IDM 2.0戰(zhàn)略的一部分,整個(gè)投資計(jì)劃高達(dá)1000億美元,新工廠預(yù)計(jì)2025年量產(chǎn),屆時(shí)“1.8nm”工藝將讓Inte...
關(guān)鍵字:
Intel
芯片工廠
CPU