在线咨询
eetop公众号 创芯大讲堂 创芯人才网
切换到宽版

EETOP 创芯网论坛 (原名:电子顶级开发网)

手机号码,快捷登录

手机号码,快捷登录

找回密码

  登录   注册  

快捷导航
搜帖子
查看: 681|回复: 8

[原创] 处理器的计算宽度达512bit,这是什么意思啊?

[复制链接]
发表于 2022-11-14 21:52:09 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?注册

x
我以为最高就是64位了啊!
发表于 2022-11-15 23:18:56 | 显示全部楼层
只要规范制定好每一位bit的用途弄个1Mbit的都没问题,但芯片的面积、功耗就奇大无比。开发周期估计也得很久。
 楼主| 发表于 2022-11-15 23:35:09 | 显示全部楼层


轩辕志瑜 发表于 2022-11-15 23:18
只要规范制定好每一位bit的用途弄个1Mbit的都没问题,但芯片的面积、功耗就奇大无比。开发周期估计也得很久 ...


只要规范制定好每一位bit的用途弄个1Mbit的都没问题

具体怎么弄呢?
发表于 2022-11-16 02:10:00 | 显示全部楼层
本帖最后由 轩辕志瑜 于 2022-11-16 03:28 编辑


orientview 发表于 2022-11-15 23:35
只要规范制定好每一位bit的用途弄个1Mbit的都没问题

具体怎么弄呢?


给你个国内开源的简单的risc-v项目你自己去看看, 这是个32bit的soc https://gitee.com/liangkangnan/tinyriscv

下面这段代码的中文注释是我加的, 加中文注释的地方就是32bit计算宽度有关的。也就是公路的大小,而注释 xxx type inst 下的那些定义就是这条公路里要跑的内容。也就是指令。 之所以没搞1Mbit计算宽度的cpu是因为根本没这个必要。就像公路可以修得跟一个城市一样宽但没那么多车走的话那修出来也没意义。而且宽度越大综合所需的时间就越久, 芯片的面积也就越大。

rtl/core/defines.v

/*                                                                     
Copyright 2019 Blue Liang, liangkangnan@163.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.                                          
*/

`define CpuResetAddr 32'h0 // 定义cpu重置地址大小, 这也就是32个0x0

`define RstEnable 1'b0
`define RstDisable 1'b1
`define ZeroWord 32'h0
`define ZeroReg 5'h0
`define WriteEnable 1'b1
`define WriteDisable 1'b0
`define ReadEnable 1'b1
`define ReadDisable 1'b0
`define True 1'b1
`define False 1'b0
`define ChipEnable 1'b1
`define ChipDisable 1'b0
`define JumpEnable 1'b1
`define JumpDisable 1'b0
`define DivResultNotReady 1'b0
`define DivResultReady 1'b1
`define DivStart 1'b1
`define DivStop 1'b0
`define HoldEnable 1'b1
`define HoldDisable 1'b0
`define Stop 1'b1
`define NoStop 1'b0
`define RIB_ACK 1'b1
`define RIB_NACK 1'b0
`define RIB_REQ 1'b1
`define RIB_NREQ 1'b0
`define INT_ASSERT 1'b1
`define INT_DEASSERT 1'b0

`define INT_BUS 7:0
`define INT_NONE 8'h0
`define INT_RET 8'hff
`define INT_TIMER0 8'b00000001
`define INT_TIMER0_ENTRY_ADDR 32'h4

`define Hold_Flag_Bus   2:0
`define Hold_None 3'b000
`define Hold_Pc   3'b001
`define Hold_If   3'b010
`define Hold_Id   3'b011

// I type inst
`define INST_TYPE_I 7'b0010011
`define INST_ADDI   3'b000 // 加法指令 宽度为3bit, 占32bit的3bit剩下的bit是数据。 以下的类似
`define INST_SLTI   3'b010
`define INST_SLTIU  3'b011
`define INST_XORI   3'b100
`define INST_ORI    3'b110
`define INST_ANDI   3'b111
`define INST_SLLI   3'b001
`define INST_SRI    3'b101

// L type inst
`define INST_TYPE_L 7'b0000011
`define INST_LB     3'b000
`define INST_LH     3'b001
`define INST_LW     3'b010
`define INST_LBU    3'b100
`define INST_LHU    3'b101

// S type inst
`define INST_TYPE_S 7'b0100011
`define INST_SB     3'b000
`define INST_SH     3'b001
`define INST_SW     3'b010

// R and M type inst
`define INST_TYPE_R_M 7'b0110011
// R type inst
`define INST_ADD_SUB 3'b000
`define INST_SLL    3'b001
`define INST_SLT    3'b010
`define INST_SLTU   3'b011
`define INST_XOR    3'b100
`define INST_SR     3'b101
`define INST_OR     3'b110
`define INST_AND    3'b111
// M type inst
`define INST_MUL    3'b000
`define INST_MULH   3'b001
`define INST_MULHSU 3'b010
`define INST_MULHU  3'b011
`define INST_DIV    3'b100
`define INST_DIVU   3'b101
`define INST_REM    3'b110
`define INST_REMU   3'b111

// J type inst
`define INST_JAL    7'b1101111
`define INST_JALR   7'b1100111

`define INST_LUI    7'b0110111
`define INST_AUIPC  7'b0010111
`define INST_NOP    32'h00000001
`define INST_NOP_OP 7'b0000001
`define INST_MRET   32'h30200073
`define INST_RET    32'h00008067

`define INST_FENCE  7'b0001111
`define INST_ECALL  32'h73
`define INST_EBREAK 32'h00100073

// J type inst
`define INST_TYPE_B 7'b1100011
`define INST_BEQ    3'b000
`define INST_BNE    3'b001
`define INST_BLT    3'b100
`define INST_BGE    3'b101
`define INST_BLTU   3'b110
`define INST_BGEU   3'b111

// CSR inst
`define INST_CSR    7'b1110011
`define INST_CSRRW  3'b001
`define INST_CSRRS  3'b010
`define INST_CSRRC  3'b011
`define INST_CSRRWI 3'b101
`define INST_CSRRSI 3'b110
`define INST_CSRRCI 3'b111

// CSR reg addr
`define CSR_CYCLE   12'hc00
`define CSR_CYCLEH  12'hc80
`define CSR_MTVEC   12'h305
`define CSR_MCAUSE  12'h342
`define CSR_MEPC    12'h341
`define CSR_MIE     12'h304
`define CSR_MSTATUS 12'h300
`define CSR_MSCRATCH 12'h340

`define RomNum 4096  // rom depth(how many words)

`define MemNum 4096  // memory depth(how many words)
`define MemBus 31:0 // 定义内存总线大小
`define MemAddrBus 31:0 // 定义内存地址总线大小

`define InstBus 31:0 // 定义指令总线大小
`define InstAddrBus 31:0 // 定义指令地址总线大小

// common regs
`define RegAddrBus 4:0
`define RegBus 31:0 // 定义寄存器总线大小
`define DoubleRegBus 63:0
`define RegWidth 32 // 定义寄存器宽度
`define RegNum 32        // reg num | 定义寄存器数量
`define RegNumLog2 5

 楼主| 发表于 2022-11-18 11:09:08 | 显示全部楼层


轩辕志瑜 发表于 2022-11-16 02:10
给你个国内开源的简单的risc-v项目你自己去看看, 这是个32bit的soc https://gitee.com/liangkangnan/tiny ...


512-bit vector register length processorVariable length operations, up to 512-bits of data per cycle

https://www.sifive.com/cores/intelligence-x280
发表于 2022-11-18 12:05:26 | 显示全部楼层
本帖最后由 轩辕志瑜 于 2022-11-18 12:38 编辑


orientview 发表于 2022-11-18 11:09
512-bit vector register length processorVariable length operations, up to 512-bits of data per cyc ...


其实就是把512-bit分拆成8段数据去处理。。。
他的实现方式是把内存和寄存器的数据宽度给加宽然后通过仲裁器分割给8个64bit的CPU核心去处理,也就是一次性把八个核心的64bit数据都读到缓存然后再由仲裁器分割,而这8个核心在仲裁器分配下几乎是可以同时工作。
这样确实可以说是512bit的处理速度,照此可以实现用128核心实现个8Mbit的。。。无非就是加宽存储单元的数据总线宽度和加大存储容量

其实这个U最高可以处理1Mbit的数据,因为他有标注 ”Both with a 4-cluster, quad core per cluster configuration (16-cores)“ | 两者均具有 4 个集群,每个集群配置四核(16 核) ,不做配置的情况下默认是512bit。最小也是128bit。

这是他数据手册里的框架图
微信截图_20221118120930.png

 楼主| 发表于 2022-11-18 22:14:04 | 显示全部楼层


轩辕志瑜 发表于 2022-11-18 12:05
其实就是把512-bit分拆成8段数据去处理。。。
他的实现方式是把内存和寄存器的数据宽度给加宽然后通过仲裁 ...


一个核,应该也可以吧?
https://www.ceva-dsp.com/product/ceva-x2-sound/

Other key features include:

  • 4.5 CoreMark/MHz score,
  • dual 32×32 MAC operations per cycle,
  • quad 16×16 MAC operations per cycle,       是不是说2*32*32=2048,那么,计算宽度就是2048bit ?

发表于 2022-11-18 23:29:22 | 显示全部楼层
本帖最后由 轩辕志瑜 于 2022-11-18 23:31 编辑


The CEVA-X2 is a combined DSP/controller based on a VLIW/SIMD architecture with a 10-stage pipeline, operating at 2GHz in typical conditions of a 16nm process.

你忘了这一段里的 10-stage pipeline, 这是个十级流水的dsp,但他只是个用于处理声音的DSP。
 楼主| 发表于 2022-11-19 06:44:34 | 显示全部楼层


轩辕志瑜 发表于 2022-11-18 23:29
The CEVA-X2 is a combined DSP/controller based on a VLIW/SIMD architecture with a 10-stage pipeline ...


10-stage pipeline跟计算宽度是什么意思啊?
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

站长推荐 上一条 /1 下一条

×

小黑屋| 关于我们| 联系我们| 在线咨询| 隐私声明| EETOP 创芯网
( 京ICP备:10050787号 京公网安备:11010502037710 )

GMT+8, 2024-3-28 20:58 , Processed in 0.027984 second(s), 7 queries , Gzip On, Redis On.

eetop公众号 创芯大讲堂 创芯人才网
快速回复 返回顶部 返回列表