当前位置: 首页 > news >正文

自贡做网站公司今日国际新闻摘抄十条

自贡做网站公司,今日国际新闻摘抄十条,西安市网站建设公司,贵州七星关区疫情最新消息【RISC-V设计-05】- RISC-V处理器设计K0A之GPR 文章目录 【RISC-V设计-05】- RISC-V处理器设计K0A之GPR1.简介2.设计顶层3.内部结构4.端口说明5.设计代码6.总结 1.简介 通用寄存器(General Purpose Register)是处理器设计中的重要组成部分,在…

【RISC-V设计-05】- RISC-V处理器设计K0A之GPR

文章目录

  • 【RISC-V设计-05】- RISC-V处理器设计K0A之GPR
    • 1.简介
    • 2.设计顶层
    • 3.内部结构
    • 4.端口说明
    • 5.设计代码
    • 6.总结

1.简介

通用寄存器(General Purpose Register)是处理器设计中的重要组成部分,在数据处理和指令执行过程中发挥着关键作用,对于计算机系统的整体性能和效率有着至关重要的影响。通用寄存器用于传送和暂存数据,也可参与算术逻辑运算,并保存运算结果。本模块内含有15个32bit的寄存器,一个写操作端口,两个读操作端口,读写可同时操作。

2.设计顶层

3.内部结构

4.端口说明

序号端口方向位宽说明
1core_clkinput1内核时钟
2idu2gpr_weinput1通用寄存器组写使能,高有效
3idu2gpr_waddrinput4通用寄存器组写地址
4idu2gpr_wdatainput32通用寄存器组写数据
5idu2gpr_raddr1input4通用寄存器组读地址1
6gpr2idu_rdata1output32通用寄存器组读数据1
7idu2gpr_raddr2input4通用寄存器组读地址2
8gpr2idu_rdata2output32通用寄存器组读数据2

5.设计代码

// -------------------------------------------------------------------------------------------------
// Copyright 2024 Kearn Chen, kearn.chen@aliyun.com
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// 
//     http://www.apache.org/licenses/LICENSE-2.0
// 
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// -------------------------------------------------------------------------------------------------
// Description :
//             1. General Purpose Register, 32bit * 15 = 480bit
// -------------------------------------------------------------------------------------------------module k0a_core_gpr (input               core_clk       ,input               idu2gpr_we     ,input   [3:0]       idu2gpr_waddr  ,input   [31:0]      idu2gpr_wdata  ,input   [3:0]       idu2gpr_raddr1 ,output  [31:0]      gpr2idu_rdata1 ,input   [3:0]       idu2gpr_raddr2 ,output  [31:0]      gpr2idu_rdata2
);reg  [31:0]  x1_ra;
reg  [31:0]  x2_sp;
reg  [31:0]  x3_gp;
reg  [31:0]  x4_tp;
reg  [31:0]  x5_t0;
reg  [31:0]  x6_t1;
reg  [31:0]  x7_t2;
reg  [31:0]  x8_s0;
reg  [31:0]  x9_s1;
reg  [31:0]  xa_a0;
reg  [31:0]  xb_a1;
reg  [31:0]  xc_a2;
reg  [31:0]  xd_a3;
reg  [31:0]  xe_a4;
reg  [31:0]  xf_a5;wire x1_rd1 = (idu2gpr_raddr1 == 4'h1);
wire x2_rd1 = (idu2gpr_raddr1 == 4'h2);
wire x3_rd1 = (idu2gpr_raddr1 == 4'h3);
wire x4_rd1 = (idu2gpr_raddr1 == 4'h4);
wire x5_rd1 = (idu2gpr_raddr1 == 4'h5);
wire x6_rd1 = (idu2gpr_raddr1 == 4'h6);
wire x7_rd1 = (idu2gpr_raddr1 == 4'h7);
wire x8_rd1 = (idu2gpr_raddr1 == 4'h8);
wire x9_rd1 = (idu2gpr_raddr1 == 4'h9);
wire xa_rd1 = (idu2gpr_raddr1 == 4'ha);
wire xb_rd1 = (idu2gpr_raddr1 == 4'hb);
wire xc_rd1 = (idu2gpr_raddr1 == 4'hc);
wire xd_rd1 = (idu2gpr_raddr1 == 4'hd);
wire xe_rd1 = (idu2gpr_raddr1 == 4'he);
wire xf_rd1 = (idu2gpr_raddr1 == 4'hf);wire x1_rd2 = (idu2gpr_raddr2 == 4'h1);
wire x2_rd2 = (idu2gpr_raddr2 == 4'h2);
wire x3_rd2 = (idu2gpr_raddr2 == 4'h3);
wire x4_rd2 = (idu2gpr_raddr2 == 4'h4);
wire x5_rd2 = (idu2gpr_raddr2 == 4'h5);
wire x6_rd2 = (idu2gpr_raddr2 == 4'h6);
wire x7_rd2 = (idu2gpr_raddr2 == 4'h7);
wire x8_rd2 = (idu2gpr_raddr2 == 4'h8);
wire x9_rd2 = (idu2gpr_raddr2 == 4'h9);
wire xa_rd2 = (idu2gpr_raddr2 == 4'ha);
wire xb_rd2 = (idu2gpr_raddr2 == 4'hb);
wire xc_rd2 = (idu2gpr_raddr2 == 4'hc);
wire xd_rd2 = (idu2gpr_raddr2 == 4'hd);
wire xe_rd2 = (idu2gpr_raddr2 == 4'he);
wire xf_rd2 = (idu2gpr_raddr2 == 4'hf);wire x1_wr  = (idu2gpr_waddr == 4'h1) & idu2gpr_we;
wire x2_wr  = (idu2gpr_waddr == 4'h2) & idu2gpr_we;
wire x3_wr  = (idu2gpr_waddr == 4'h3) & idu2gpr_we;
wire x4_wr  = (idu2gpr_waddr == 4'h4) & idu2gpr_we;
wire x5_wr  = (idu2gpr_waddr == 4'h5) & idu2gpr_we;
wire x6_wr  = (idu2gpr_waddr == 4'h6) & idu2gpr_we;
wire x7_wr  = (idu2gpr_waddr == 4'h7) & idu2gpr_we;
wire x8_wr  = (idu2gpr_waddr == 4'h8) & idu2gpr_we;
wire x9_wr  = (idu2gpr_waddr == 4'h9) & idu2gpr_we;
wire xa_wr  = (idu2gpr_waddr == 4'ha) & idu2gpr_we;
wire xb_wr  = (idu2gpr_waddr == 4'hb) & idu2gpr_we;
wire xc_wr  = (idu2gpr_waddr == 4'hc) & idu2gpr_we;
wire xd_wr  = (idu2gpr_waddr == 4'hd) & idu2gpr_we;
wire xe_wr  = (idu2gpr_waddr == 4'he) & idu2gpr_we;
wire xf_wr  = (idu2gpr_waddr == 4'hf) & idu2gpr_we;assign gpr2idu_rdata1 = ({32{x1_rd1}} & x1_ra) | ({32{x2_rd1}} & x2_sp) |({32{x3_rd1}} & x3_gp) | ({32{x4_rd1}} & x4_tp) |({32{x5_rd1}} & x5_t0) | ({32{x6_rd1}} & x6_t1) |({32{x7_rd1}} & x7_t2) | ({32{x8_rd1}} & x8_s0) |({32{x9_rd1}} & x9_s1) | ({32{xa_rd1}} & xa_a0) |({32{xb_rd1}} & xb_a1) | ({32{xc_rd1}} & xc_a2) |({32{xd_rd1}} & xd_a3) | ({32{xe_rd1}} & xe_a4) |({32{xf_rd1}} & xf_a5) ;assign gpr2idu_rdata2 = ({32{x1_rd2}} & x1_ra) | ({32{x2_rd2}} & x2_sp) |({32{x3_rd2}} & x3_gp) | ({32{x4_rd2}} & x4_tp) |({32{x5_rd2}} & x5_t0) | ({32{x6_rd2}} & x6_t1) |({32{x7_rd2}} & x7_t2) | ({32{x8_rd2}} & x8_s0) |({32{x9_rd2}} & x9_s1) | ({32{xa_rd2}} & xa_a0) |({32{xb_rd2}} & xb_a1) | ({32{xc_rd2}} & xc_a2) |({32{xd_rd2}} & xd_a3) | ({32{xe_rd2}} & xe_a4) |({32{xf_rd2}} & xf_a5) ;always @(posedge core_clk) if(x1_wr) x1_ra <= idu2gpr_wdata;
always @(posedge core_clk) if(x2_wr) x2_sp <= idu2gpr_wdata;
always @(posedge core_clk) if(x3_wr) x3_gp <= idu2gpr_wdata;
always @(posedge core_clk) if(x4_wr) x4_tp <= idu2gpr_wdata;
always @(posedge core_clk) if(x5_wr) x5_t0 <= idu2gpr_wdata;
always @(posedge core_clk) if(x6_wr) x6_t1 <= idu2gpr_wdata;
always @(posedge core_clk) if(x7_wr) x7_t2 <= idu2gpr_wdata;
always @(posedge core_clk) if(x8_wr) x8_s0 <= idu2gpr_wdata;
always @(posedge core_clk) if(x9_wr) x9_s1 <= idu2gpr_wdata;
always @(posedge core_clk) if(xa_wr) xa_a0 <= idu2gpr_wdata;
always @(posedge core_clk) if(xb_wr) xb_a1 <= idu2gpr_wdata;
always @(posedge core_clk) if(xc_wr) xc_a2 <= idu2gpr_wdata;
always @(posedge core_clk) if(xd_wr) xd_a3 <= idu2gpr_wdata;
always @(posedge core_clk) if(xe_wr) xe_a4 <= idu2gpr_wdata;
always @(posedge core_clk) if(xf_wr) xf_a5 <= idu2gpr_wdata;endmodule

6.总结

本文实现了一个基本的通用寄存器组,支持一写双读操作。对于一写双读操作,这可以显著提高数据处理的并行性,在诸如流水线处理等场景中能够提高系统的性能。比如,在一个 CPU 的指令执行阶段,可能同时需要读取两个寄存器的值进行运算,而新的数据又可以在同一周期被写入另一个寄存器。

每个寄存器都是32位宽,包含0地址寄存器,总共有16个的寄存器。设计中的寄存器全部采用无复为寄存器,优化时序,减少面积。无复位寄存器的选择可能会简化电路结构,但也需要在系统初始化和异常处理时特别注意数据的初始状态和稳定性。例如,在系统启动时,需要通过软件初始化来确保寄存器中的值是合理的起始值。事实上,软件也不应该依赖于寄存器的默认值。

在综合时,工具会为15个寄存器插入时钟门控Clocke Gating Cell,以降低动态功耗。由于汇编代码中使用的为ABI名称,所以寄存器命名带有ABI名称,方便调试和查看。通过逐一对每个寄存器编写逻辑代码,避免了对X0寄存器的译码,减少综合后电路面积。


文章转载自:
http://astonishment.xhqr.cn
http://verbiage.xhqr.cn
http://technicalization.xhqr.cn
http://accruement.xhqr.cn
http://objettrouve.xhqr.cn
http://concretively.xhqr.cn
http://analects.xhqr.cn
http://roadsigns.xhqr.cn
http://jacobinical.xhqr.cn
http://terminology.xhqr.cn
http://muttnik.xhqr.cn
http://thiaminase.xhqr.cn
http://regermination.xhqr.cn
http://cladophyll.xhqr.cn
http://borofluoride.xhqr.cn
http://underdone.xhqr.cn
http://snopesian.xhqr.cn
http://ratisbon.xhqr.cn
http://xeromorphy.xhqr.cn
http://hindoo.xhqr.cn
http://bebryces.xhqr.cn
http://multigerm.xhqr.cn
http://lithosol.xhqr.cn
http://flavicant.xhqr.cn
http://stuffy.xhqr.cn
http://toxophilitic.xhqr.cn
http://tetragynous.xhqr.cn
http://languistics.xhqr.cn
http://noria.xhqr.cn
http://doubleness.xhqr.cn
http://spumescence.xhqr.cn
http://mim.xhqr.cn
http://vizir.xhqr.cn
http://saturation.xhqr.cn
http://sympathizer.xhqr.cn
http://viand.xhqr.cn
http://claqueur.xhqr.cn
http://forgo.xhqr.cn
http://vice.xhqr.cn
http://sparklet.xhqr.cn
http://orthotics.xhqr.cn
http://eutectic.xhqr.cn
http://grassbox.xhqr.cn
http://stimy.xhqr.cn
http://perivisceral.xhqr.cn
http://ramachandra.xhqr.cn
http://midmost.xhqr.cn
http://industrious.xhqr.cn
http://metasilicate.xhqr.cn
http://download.xhqr.cn
http://lyricism.xhqr.cn
http://roentgenotherapy.xhqr.cn
http://circumspect.xhqr.cn
http://narcotist.xhqr.cn
http://climatization.xhqr.cn
http://minigunner.xhqr.cn
http://scoliosis.xhqr.cn
http://esophagitis.xhqr.cn
http://merton.xhqr.cn
http://utwa.xhqr.cn
http://nuplex.xhqr.cn
http://deemphasis.xhqr.cn
http://psalm.xhqr.cn
http://bilharziosis.xhqr.cn
http://chitling.xhqr.cn
http://tuckahoe.xhqr.cn
http://hemanalysis.xhqr.cn
http://transferee.xhqr.cn
http://saturnalia.xhqr.cn
http://sofa.xhqr.cn
http://nicholas.xhqr.cn
http://challenge.xhqr.cn
http://pastedown.xhqr.cn
http://newswriting.xhqr.cn
http://containerize.xhqr.cn
http://polyandrous.xhqr.cn
http://ergodicity.xhqr.cn
http://intercede.xhqr.cn
http://deimos.xhqr.cn
http://pyrimethamine.xhqr.cn
http://chronical.xhqr.cn
http://capillaceous.xhqr.cn
http://brawler.xhqr.cn
http://maundy.xhqr.cn
http://typing.xhqr.cn
http://lumina.xhqr.cn
http://rheumatic.xhqr.cn
http://convenient.xhqr.cn
http://fantod.xhqr.cn
http://afl.xhqr.cn
http://wristdrop.xhqr.cn
http://koniscope.xhqr.cn
http://ichnology.xhqr.cn
http://horsing.xhqr.cn
http://exorability.xhqr.cn
http://unsay.xhqr.cn
http://cocoonery.xhqr.cn
http://voivode.xhqr.cn
http://hypoproteinosis.xhqr.cn
http://literal.xhqr.cn
http://www.15wanjia.com/news/66064.html

相关文章:

  • 盐田网站建设郑州网站推广公司哪家好
  • 山东建设厅网站网址济南网站运营公司
  • 赤壁市住房建设委员会网站深圳网站设计制作
  • 盐城网站建设制作搜索引擎关键词竞价排名
  • 平湖网站建设服务项目湖南正规seo公司
  • 武进网站建设价格百度推广客户端官方下载
  • dw做的网站 图片的路径如何在百度上做推广
  • 宁波网站制作联系方式郑州网站关键词优化外包
  • 开发网站用什么语言河源今日头条新闻最新
  • 青岛网站建设公司外包cpc广告点击日结联盟
  • 济南网站建设铭盛信息网络营销推广机构
  • 公司网站建设攻略百度登录账号首页
  • 是想建个网站 用本地做服务器上海优化网站方法
  • 昆明市城市建设档案馆网站营销技巧五步推销法
  • 柳州做网站哪家好织梦seo排名优化教程
  • 优化网站找哪家seo优化专员编辑
  • 静态网站设计怎么做世界新闻
  • wordpress转移空间最优化方法
  • 做网站学哪些语言搜索引擎营销名词解释
  • 如何在手机上做网站为什么sem的工资都不高
  • 自己在公司上班做网站宣传 侵权吗seo推广排名
  • 公司网站突然404广东seo推广费用
  • 可口可乐网站建设目的app推广公司
  • 免费网站建设哪家好静态网站开发
  • 自己做网站卖衣服郑州seo哪家好
  • 在县城做哪个招聘网站比较赚钱电商平台推广费用大概要多少
  • 超酷的网站设计网站搭建服务
  • 股票群彩票网站做慈善域名注册查询软件
  • 深圳分销网站制作建网站赚钱
  • 网做网站seo网站推广杭州