數(shù)據(jù)通路
CPU輸入的、運算的、存儲的、輸出的數(shù)據(jù)都在組合邏輯和時序邏輯電路上流轉(zhuǎn),這些邏輯電路稱為數(shù)據(jù)通路
。
PC
32位處理器用32位觸發(fā)器來存放PC。PC的輸出送到虛實地址轉(zhuǎn)換部件進行轉(zhuǎn)換
,PC的輸入有兩個,一個是復位值0xBFC00000,一個是復位撤銷后每執(zhí)行一條指令更新為當前PC+4得到的值。
虛實地址轉(zhuǎn)換
在實現(xiàn)TLB MMU之前,CPU都采用固定映射的地址映射機制,以段為單位進行虛實地址轉(zhuǎn)換,轉(zhuǎn)換的方式是硬件固定的,而不是軟件可配置的。
映射算法
虛地址kseg0段(0x8000000 ~ 0x9FFFFFFF)映射到物理地址最低512MB(0x00000000~0x1FFFFFFF)。
虛地址kseg1段(0xA0000000 ~ 0xBFFFFFFF)映射到物理地址最低512MB(0x00000000~0x1FFFFFFF)。
其余三個段都是物理地址的值等于虛地址的值。
指令RAM
采用片上RAM作為內(nèi)存,將RAM進一步拆為指令RAM和數(shù)據(jù)RAM,兩塊物理上獨立的RAM。
目前工程實踐常用的都是同步讀RAM。第一拍發(fā)讀請求和讀地址,第二拍RAM才會輸出讀數(shù)據(jù)。這種RAM無法實現(xiàn)單周期CPU,所以暫時使用異步RAM。異步RAM讀時序行為類似寄存器堆的讀,當拍給地址、當拍出數(shù)據(jù),其時序行為和同步讀RAM的一樣。
ADDU和ADDIU
加法器可復用。
差異一
ADDU:第二個操作數(shù)是通用寄存器堆讀端口2的輸出數(shù)據(jù)rdata2。
ADDIU:第二個源操作數(shù)是指令碼的15-0位有符號擴展至32位后形成的數(shù)據(jù)。
加法器的第二個輸入數(shù)據(jù)來源要分情況處理,電路設(shè)計上是通過引入一個32位的二選一部件來體現(xiàn)的
。
二選一的in1—rdata2
in2—指令碼的15-0位有符號擴展到32位后形成的數(shù)據(jù)
out—加法器第二個數(shù)據(jù)輸入
sel—控制信號(ADDUI和ADDU在編碼上是可區(qū)分的,利用這一點作為產(chǎn)生多路選擇器的控制信號)
差異二
ADDU的結(jié)果寫入rd中,ADDUI寫到rt中。通用寄存器的寫端口地址不再唯一,再引入一個二選一
,從指令碼rd域數(shù)值和rt域數(shù)值中選擇一個結(jié)果,再連接到通用寄存器堆寫端口的寫地址端口waddr上。
SUBU
與ADDU的區(qū)別在于前者做的是減法,后者做的是加法??紤]到補碼加減運算的屬性
A補-B補=(A-B)補=A補+(-B)補=A補+(~ B補)+1
對加法器對的源操作數(shù)2的進位和輸入添加二選一部件。
源操作數(shù)2—src2,處理減法時按位取反
進位輸入在處理加法時是0,在處理減法時是1
選擇信號是通過不同指令間指令碼的差異實現(xiàn)控制信號的區(qū)分
LW和SW
在取指方面的功能與ADDU一樣。
- 訪存地址生成
- 數(shù)據(jù)RAM
- 寄存器堆寫回結(jié)果選擇
- SW指令和LW指令的區(qū)別在于LW讀RAM寫通用寄存器而SW讀通用寄存器寫RAM。對于sw要在lw的基礎(chǔ)上對寫RAM功能增加新的數(shù)據(jù)通路。寫入內(nèi)存的是第rt號寄存器的值。
將通用寄存器堆讀端口2的輸出rdata2連接到數(shù)據(jù)RAM的寫數(shù)據(jù)端口wdata上
$rt–>rdata2–>wdata
==========================================================
好多二選一,我也沒有跟著畫,我腦子已經(jīng)糊了,一點也不想
學。。。。。。。。。。。
==========================================================
BEQ和BNE
(1)判斷分支條件
(2)計算跳轉(zhuǎn)目標
(3)PC更新
JAL和JR
JAL
(1)不用進行分支條件判斷,一定會跳轉(zhuǎn)
(2)計算跳轉(zhuǎn)目標地址是轉(zhuǎn)移延遲槽指令的PC和指令碼中的立即數(shù)
,就算方式是拼接
不是相加
(3)不僅要修改PC,還要寫通用寄存器
注意一下link操作,call,return兩個跳轉(zhuǎn)
JR
(1)不需要進行條件判斷,一定會跳轉(zhuǎn)
(2)跳轉(zhuǎn)的目標地址來自通用寄存器堆的rs
STL和STLU
算術(shù)運算類指令
從源操作數(shù)輸入到結(jié)果的運算過程和ADD,ADDU不一樣,其他是一樣的。所以增加一個能處理兩個32位數(shù)據(jù)有符號和無符號大小比較的比較器。
輸入
與連接到加法器的數(shù)據(jù)輸入相同
控制信號的輸入用于標識有符號比較還是無符號比較
輸出
輸出比較結(jié)果為0或1
增加一個32位二選一部件,in0接入原有加法器的輸出,in1接入比較器的結(jié)果。
如果用"<“或者”>"去比較,會消耗一定的邏輯電路資源。
通過復用加法器GR[rs]-GR[rt]的運算,根據(jù)源操作數(shù)的正負,和(sum)的正負,進位(cout)的正負就可以得到SLT和SLTU的結(jié)果。這些結(jié)果和原有的加法器結(jié)果通過一個二選一部件得到運算類指令的執(zhí)行結(jié)果,然后輸入到產(chǎn)生最終寫通用寄存器值的那個二選一部件上。
SLL,SRL,SRA
移位指令。分別是邏輯左移,邏輯右移,算術(shù)右移。
添加一個“移位器”數(shù)據(jù)通路。
輸入/輸出
輸入:
- 32位的被移位數(shù)值src
- 5位的移位量sa
- 控制輸入用于確定移位操作的類型op
輸出:
- 32位移位結(jié)果res
src<-rdata2
sa<-sa
執(zhí)行結(jié)果的最終選擇電路要從“二選一”擴展為“三選一”。根據(jù)shft_op
選擇shft_res
一種面積優(yōu)化電路設(shè)計
基本思想是將被移位的數(shù)據(jù)逆序排列后,左移操作被轉(zhuǎn)換為右移操作
=============================================================
任務(wù)和實踐
實踐一:簡單CPU參考設(shè)計調(diào)試
簡要步驟:
- 打開
cpu132_gettrace(cpu132_gettrace.xpr)
工程,進行IP核升級 - 運行
cpu132_gettrace(cpu132_gettrace.xpr)
工程的仿真,生成新的參考Trace文件golden_trace.txt
,等仿真運行完成后,golden_trace.txt才會有新的內(nèi)容 - 打開
myCPU
工程,進行IP核的升級 - 運行
myCPU
的仿真,進行運行以及調(diào)試 -
myCPU
仿真通過后,綜合實現(xiàn)還有生成比特流文件,進行上板驗證
仿真結(jié)果的判斷
下面是控制臺的輸出:
如果全都是PASS就是運行通過了,這是發(fā)布包給的樣例CPU,肯定是都沒有任何問題的,所以理所當然89個
測試點都通過了。
==============================================================
Test begin!
----[ 14055 ns] Number 8'd01 Functional Test Point PASS!!!
[ 22000 ns] Test is running, debug_wb_pc = 0xbfc5e4bc
[ 32000 ns] Test is running, debug_wb_pc = 0xbfc5f45c
----[ 40555 ns] Number 8'd02 Functional Test Point PASS!!!
[ 42000 ns] Test is running, debug_wb_pc = 0xbfc89418
----[ 49475 ns] Number 8'd03 Functional Test Point PASS!!!
[ 52000 ns] Test is running, debug_wb_pc = 0xbfc3ac78
[ 62000 ns] Test is running, debug_wb_pc = 0xbfc3bf94
[ 72000 ns] Test is running, debug_wb_pc = 0xbfc3d278
----[ 73845 ns] Number 8'd04 Functional Test Point PASS!!!
[ 82000 ns] Test is running, debug_wb_pc = 0xbfc24530
[ 92000 ns] Test is running, debug_wb_pc = 0xbfc2568c
[ 102000 ns] Test is running, debug_wb_pc = 0xbfc26c18
----[ 111715 ns] Number 8'd05 Functional Test Point PASS!!!
[ 112000 ns] Test is running, debug_wb_pc = 0xbfc00768
[ 122000 ns] Test is running, debug_wb_pc = 0xbfc4a308
----[ 127355 ns] Number 8'd06 Functional Test Point PASS!!!
[ 132000 ns] Test is running, debug_wb_pc = 0xbfc6a758
[ 142000 ns] Test is running, debug_wb_pc = 0xbfc6b6f8
[ 152000 ns] Test is running, debug_wb_pc = 0xbfc6c698
----[ 153775 ns] Number 8'd07 Functional Test Point PASS!!!
[ 162000 ns] Test is running, debug_wb_pc = 0xbfc50aa0
[ 172000 ns] Test is running, debug_wb_pc = 0xbfc51a40
----[ 177225 ns] Number 8'd08 Functional Test Point PASS!!!
[ 182000 ns] Test is running, debug_wb_pc = 0xbfc03c5c
[ 192000 ns] Test is running, debug_wb_pc = 0xbfc04bfc
----[ 195165 ns] Number 8'd09 Functional Test Point PASS!!!
[ 202000 ns] Test is running, debug_wb_pc = 0xbfc3e0a4
[ 212000 ns] Test is running, debug_wb_pc = 0xbfc3f044
----[ 213105 ns] Number 8'd10 Functional Test Point PASS!!!
[ 222000 ns] Test is running, debug_wb_pc = 0xbfc6f88c
[ 232000 ns] Test is running, debug_wb_pc = 0xbfc7082c
----[ 232405 ns] Number 8'd11 Functional Test Point PASS!!!
[ 242000 ns] Test is running, debug_wb_pc = 0xbfc02484
----[ 249835 ns] Number 8'd12 Functional Test Point PASS!!!
[ 252000 ns] Test is running, debug_wb_pc = 0xbfc3f558
[ 262000 ns] Test is running, debug_wb_pc = 0xbfc406ec
[ 272000 ns] Test is running, debug_wb_pc = 0xbfc418ac
----[ 278055 ns] Number 8'd13 Functional Test Point PASS!!!
[ 282000 ns] Test is running, debug_wb_pc = 0xbfc63e60
[ 292000 ns] Test is running, debug_wb_pc = 0xbfc64f80
[ 302000 ns] Test is running, debug_wb_pc = 0xbfc660bc
[ 312000 ns] Test is running, debug_wb_pc = 0xbfc671ac
----[ 316265 ns] Number 8'd14 Functional Test Point PASS!!!
[ 322000 ns] Test is running, debug_wb_pc = 0xbfc8439c
[ 332000 ns] Test is running, debug_wb_pc = 0xbfc854f8
[ 342000 ns] Test is running, debug_wb_pc = 0xbfc86654
[ 352000 ns] Test is running, debug_wb_pc = 0xbfc877b0
----[ 354995 ns] Number 8'd15 Functional Test Point PASS!!!
----[ 358265 ns] Number 8'd16 Functional Test Point PASS!!!
----[ 361535 ns] Number 8'd17 Functional Test Point PASS!!!
[ 362000 ns] Test is running, debug_wb_pc = 0xbfc39ab8
----[ 363495 ns] Number 8'd18 Functional Test Point PASS!!!
----[ 365975 ns] Number 8'd19 Functional Test Point PASS!!!
----[ 368455 ns] Number 8'd20 Functional Test Point PASS!!!
[ 372000 ns] Test is running, debug_wb_pc = 0xbfc7f790
[ 382000 ns] Test is running, debug_wb_pc = 0xbfc80730
----[ 390305 ns] Number 8'd21 Functional Test Point PASS!!!
[ 392000 ns] Test is running, debug_wb_pc = 0xbfc0a8dc
[ 402000 ns] Test is running, debug_wb_pc = 0xbfc0b87c
----[ 410745 ns] Number 8'd22 Functional Test Point PASS!!!
[ 412000 ns] Test is running, debug_wb_pc = 0xbfc329ac
[ 422000 ns] Test is running, debug_wb_pc = 0xbfc3394c
[ 432000 ns] Test is running, debug_wb_pc = 0xbfc348ec
----[ 432145 ns] Number 8'd23 Functional Test Point PASS!!!
[ 442000 ns] Test is running, debug_wb_pc = 0xbfc61e2c
[ 452000 ns] Test is running, debug_wb_pc = 0xbfc62dcc
----[ 458595 ns] Number 8'd24 Functional Test Point PASS!!!
[ 462000 ns] Test is running, debug_wb_pc = 0xbfc7ac48
[ 472000 ns] Test is running, debug_wb_pc = 0xbfc7bbe8
[ 482000 ns] Test is running, debug_wb_pc = 0xbfc7cb88
----[ 482045 ns] Number 8'd25 Functional Test Point PASS!!!
[ 492000 ns] Test is running, debug_wb_pc = 0xbfc4dae4
[ 502000 ns] Test is running, debug_wb_pc = 0xbfc4ea84
----[ 507425 ns] Number 8'd26 Functional Test Point PASS!!!
[ 512000 ns] Test is running, debug_wb_pc = 0xbfc6d62c
[ 522000 ns] Test is running, debug_wb_pc = 0xbfc6e5cc
----[ 525365 ns] Number 8'd27 Functional Test Point PASS!!!
[ 532000 ns] Test is running, debug_wb_pc = 0xbfc8a9b4
[ 542000 ns] Test is running, debug_wb_pc = 0xbfc8b954
----[ 551795 ns] Number 8'd28 Functional Test Point PASS!!!
[ 552000 ns] Test is running, debug_wb_pc = 0xbfc00d80
[ 562000 ns] Test is running, debug_wb_pc = 0xbfc78f58
[ 572000 ns] Test is running, debug_wb_pc = 0xbfc79ef8
----[ 572235 ns] Number 8'd29 Functional Test Point PASS!!!
[ 582000 ns] Test is running, debug_wb_pc = 0xbfc47bd8
[ 592000 ns] Test is running, debug_wb_pc = 0xbfc48b78
----[ 598685 ns] Number 8'd30 Functional Test Point PASS!!!
[ 602000 ns] Test is running, debug_wb_pc = 0xbfc088e4
[ 612000 ns] Test is running, debug_wb_pc = 0xbfc09884
----[ 619125 ns] Number 8'd31 Functional Test Point PASS!!!
[ 622000 ns] Test is running, debug_wb_pc = 0xbfc761b4
[ 632000 ns] Test is running, debug_wb_pc = 0xbfc77154
----[ 641295 ns] Number 8'd32 Functional Test Point PASS!!!
[ 642000 ns] Test is running, debug_wb_pc = 0xbfc42400
[ 652000 ns] Test is running, debug_wb_pc = 0xbfc433a0
----[ 660535 ns] Number 8'd33 Functional Test Point PASS!!!
[ 662000 ns] Test is running, debug_wb_pc = 0xbfc0cb00
[ 672000 ns] Test is running, debug_wb_pc = 0xbfc0daa0
[ 682000 ns] Test is running, debug_wb_pc = 0xbfc0ea40
----[ 682945 ns] Number 8'd34 Functional Test Point PASS!!!
[ 692000 ns] Test is running, debug_wb_pc = 0xbfc0710c
[ 702000 ns] Test is running, debug_wb_pc = 0xbfc080ac
----[ 702315 ns] Number 8'd35 Functional Test Point PASS!!!
[ 712000 ns] Test is running, debug_wb_pc = 0xbfc5c1e8
[ 722000 ns] Test is running, debug_wb_pc = 0xbfc5d188
----[ 724735 ns] Number 8'd36 Functional Test Point PASS!!!
[ 732000 ns] Test is running, debug_wb_pc = 0xbfc56c68
[ 742000 ns] Test is running, debug_wb_pc = 0xbfc57fb8
[ 752000 ns] Test is running, debug_wb_pc = 0xbfc59398
[ 762000 ns] Test is running, debug_wb_pc = 0xbfc5a760
----[ 767945 ns] Number 8'd37 Functional Test Point PASS!!!
[ 772000 ns] Test is running, debug_wb_pc = 0xbfc1e714
[ 782000 ns] Test is running, debug_wb_pc = 0xbfc1faec
[ 792000 ns] Test is running, debug_wb_pc = 0xbfc20ea4
[ 802000 ns] Test is running, debug_wb_pc = 0xbfc222a8
----[ 810875 ns] Number 8'd38 Functional Test Point PASS!!!
[ 812000 ns] Test is running, debug_wb_pc = 0xbfc70a80
[ 822000 ns] Test is running, debug_wb_pc = 0xbfc71e88
[ 832000 ns] Test is running, debug_wb_pc = 0xbfc73224
[ 842000 ns] Test is running, debug_wb_pc = 0xbfc745bc
[ 852000 ns] Test is running, debug_wb_pc = 0xbfc759e0
----[ 854085 ns] Number 8'd39 Functional Test Point PASS!!!
[ 862000 ns] Test is running, debug_wb_pc = 0xbfc52f9c
[ 872000 ns] Test is running, debug_wb_pc = 0xbfc541dc
[ 882000 ns] Test is running, debug_wb_pc = 0xbfc5543c
----[ 887675 ns] Number 8'd40 Functional Test Point PASS!!!
[ 892000 ns] Test is running, debug_wb_pc = 0xbfc29238
[ 902000 ns] Test is running, debug_wb_pc = 0xbfc2a478
[ 912000 ns] Test is running, debug_wb_pc = 0xbfc2b690
[ 922000 ns] Test is running, debug_wb_pc = 0xbfc2c8e8
[ 932000 ns] Test is running, debug_wb_pc = 0xbfc2db98
----[ 935465 ns] Number 8'd41 Functional Test Point PASS!!!
[ 942000 ns] Test is running, debug_wb_pc = 0xbfc1901c
[ 952000 ns] Test is running, debug_wb_pc = 0xbfc1a2cc
[ 962000 ns] Test is running, debug_wb_pc = 0xbfc1b51c
[ 972000 ns] Test is running, debug_wb_pc = 0xbfc1c75c
[ 982000 ns] Test is running, debug_wb_pc = 0xbfc1d98c
----[ 985425 ns] Number 8'd42 Functional Test Point PASS!!!
[ 992000 ns] Test is running, debug_wb_pc = 0xbfc11cac
[1002000 ns] Test is running, debug_wb_pc = 0xbfc12cb4
[1012000 ns] Test is running, debug_wb_pc = 0xbfc13ccc
[1022000 ns] Test is running, debug_wb_pc = 0xbfc14cc0
[1032000 ns] Test is running, debug_wb_pc = 0xbfc15cc8
----[1040415 ns] Number 8'd43 Functional Test Point PASS!!!
[1042000 ns] Test is running, debug_wb_pc = 0xbfc7d848
[1052000 ns] Test is running, debug_wb_pc = 0xbfc7dd00
[1062000 ns] Test is running, debug_wb_pc = 0xbfc7e1b0
[1072000 ns] Test is running, debug_wb_pc = 0xbfc7e648
[1082000 ns] Test is running, debug_wb_pc = 0xbfc7eae0
[1092000 ns] Test is running, debug_wb_pc = 0xbfc7efac
----[1098085 ns] Number 8'd44 Functional Test Point PASS!!!
[1102000 ns] Test is running, debug_wb_pc = 0xbfc0ed60
[1112000 ns] Test is running, debug_wb_pc = 0xbfc0f210
[1122000 ns] Test is running, debug_wb_pc = 0xbfc0f6c8
[1132000 ns] Test is running, debug_wb_pc = 0xbfc0fb60
[1142000 ns] Test is running, debug_wb_pc = 0xbfc0fff8
[1152000 ns] Test is running, debug_wb_pc = 0xbfc104bc
[1162000 ns] Test is running, debug_wb_pc = 0xbfc10960
[1172000 ns] Test is running, debug_wb_pc = 0xbfc10df8
----[1181995 ns] Number 8'd45 Functional Test Point PASS!!!
[1182000 ns] Test is running, debug_wb_pc = 0xbfc1129c
[1192000 ns] Test is running, debug_wb_pc = 0xbfc34df4
[1202000 ns] Test is running, debug_wb_pc = 0xbfc352f8
[1212000 ns] Test is running, debug_wb_pc = 0xbfc35808
[1222000 ns] Test is running, debug_wb_pc = 0xbfc35cf4
[1232000 ns] Test is running, debug_wb_pc = 0xbfc361dc
[1242000 ns] Test is running, debug_wb_pc = 0xbfc366f8
[1252000 ns] Test is running, debug_wb_pc = 0xbfc36b98
----[1256455 ns] Number 8'd46 Functional Test Point PASS!!!
[1262000 ns] Test is running, debug_wb_pc = 0xbfc81bec
[1272000 ns] Test is running, debug_wb_pc = 0xbfc820d8
[1282000 ns] Test is running, debug_wb_pc = 0xbfc825c4
[1292000 ns] Test is running, debug_wb_pc = 0xbfc82ad0
[1302000 ns] Test is running, debug_wb_pc = 0xbfc82fd8
[1312000 ns] Test is running, debug_wb_pc = 0xbfc834c0
[1322000 ns] Test is running, debug_wb_pc = 0xbfc83984
----[1323235 ns] Number 8'd47 Functional Test Point PASS!!!
[1332000 ns] Test is running, debug_wb_pc = 0xbfc89108
----[1332805 ns] Number 8'd48 Functional Test Point PASS!!!
[1342000 ns] Test is running, debug_wb_pc = 0xbfc183e4
----[1342355 ns] Number 8'd49 Functional Test Point PASS!!!
----[1351285 ns] Number 8'd50 Functional Test Point PASS!!!
[1352000 ns] Test is running, debug_wb_pc = 0xbfc280f4
----[1356455 ns] Number 8'd51 Functional Test Point PASS!!!
[1362000 ns] Test is running, debug_wb_pc = 0xbfc03448
----[1364545 ns] Number 8'd52 Functional Test Point PASS!!!
[1372000 ns] Test is running, debug_wb_pc = 0xbfc01474
----[1373275 ns] Number 8'd53 Functional Test Point PASS!!!
----[1381685 ns] Number 8'd54 Functional Test Point PASS!!!
[1382000 ns] Test is running, debug_wb_pc = 0xbfc7d024
----[1390415 ns] Number 8'd55 Functional Test Point PASS!!!
[1392000 ns] Test is running, debug_wb_pc = 0xbfc16c68
----[1399785 ns] Number 8'd56 Functional Test Point PASS!!!
[1402000 ns] Test is running, debug_wb_pc = 0xbfc3a32c
----[1408515 ns] Number 8'd57 Functional Test Point PASS!!!
[1412000 ns] Test is running, debug_wb_pc = 0xbfc4f9ec
----[1414895 ns] Number 8'd58 Functional Test Point PASS!!!
[1422000 ns] Test is running, debug_wb_pc = 0xbfc37a30
[1432000 ns] Test is running, debug_wb_pc = 0xbfc3873c
[1442000 ns] Test is running, debug_wb_pc = 0xbfc39438
----[1442695 ns] Number 8'd59 Functional Test Point PASS!!!
[1452000 ns] Test is running, debug_wb_pc = 0xbfc684b0
[1462000 ns] Test is running, debug_wb_pc = 0xbfc691d0
[1472000 ns] Test is running, debug_wb_pc = 0xbfc69eb0
----[1472445 ns] Number 8'd60 Functional Test Point PASS!!!
[1482000 ns] Test is running, debug_wb_pc = 0xbfc2ee34
[1492000 ns] Test is running, debug_wb_pc = 0xbfc2fb84
----[1494295 ns] Number 8'd61 Functional Test Point PASS!!!
[1502000 ns] Test is running, debug_wb_pc = 0xbfc4b370
[1512000 ns] Test is running, debug_wb_pc = 0xbfc4c094
----[1519125 ns] Number 8'd62 Functional Test Point PASS!!!
[1522000 ns] Test is running, debug_wb_pc = 0xbfc44460
[1532000 ns] Test is running, debug_wb_pc = 0xbfc451b8
[1542000 ns] Test is running, debug_wb_pc = 0xbfc45f64
----[1550155 ns] Number 8'd63 Functional Test Point PASS!!!
[1552000 ns] Test is running, debug_wb_pc = 0xbfc30068
[1562000 ns] Test is running, debug_wb_pc = 0xbfc30dc8
[1572000 ns] Test is running, debug_wb_pc = 0xbfc31b78
----[1579395 ns] Number 8'd64 Functional Test Point PASS!!!
[1582000 ns] Test is running, debug_wb_pc = 0xbfc003f0
----[1585025 ns] Number 8'd65 Functional Test Point PASS!!!
----[1590865 ns] Number 8'd66 Functional Test Point PASS!!!
[1592000 ns] Test is running, debug_wb_pc = 0xbfc7cc14
----[1597545 ns] Number 8'd67 Functional Test Point PASS!!!
[1602000 ns] Test is running, debug_wb_pc = 0xbfc003b0
----[1604135 ns] Number 8'd68 Functional Test Point PASS!!!
----[1610815 ns] Number 8'd69 Functional Test Point PASS!!!
[1612000 ns] Test is running, debug_wb_pc = 0xbfc015b8
----[1618185 ns] Number 8'd70 Functional Test Point PASS!!!
[1622000 ns] Test is running, debug_wb_pc = 0xbfc00690
----[1625575 ns] Number 8'd71 Functional Test Point PASS!!!
[1632000 ns] Test is running, debug_wb_pc = 0xbfc0c890
----[1632945 ns] Number 8'd72 Functional Test Point PASS!!!
----[1640605 ns] Number 8'd73 Functional Test Point PASS!!!
[1642000 ns] Test is running, debug_wb_pc = 0xbfc5d698
----[1648265 ns] Number 8'd74 Functional Test Point PASS!!!
[1652000 ns] Test is running, debug_wb_pc = 0xbfc00564
----[1655825 ns] Number 8'd75 Functional Test Point PASS!!!
[1662000 ns] Test is running, debug_wb_pc = 0xbfc39fc4
----[1662755 ns] Number 8'd76 Functional Test Point PASS!!!
----[1671965 ns] Number 8'd77 Functional Test Point PASS!!!
[1672000 ns] Test is running, debug_wb_pc = 0xbfc00be0
[1682000 ns] Test is running, debug_wb_pc = 0xbfc003ac
----[1687255 ns] Number 8'd78 Functional Test Point PASS!!!
[1692000 ns] Test is running, debug_wb_pc = 0xbfc0047c
[1702000 ns] Test is running, debug_wb_pc = 0xbfc003b4
----[1702545 ns] Number 8'd79 Functional Test Point PASS!!!
[1712000 ns] Test is running, debug_wb_pc = 0xbfc003bc
----[1717835 ns] Number 8'd80 Functional Test Point PASS!!!
[1722000 ns] Test is running, debug_wb_pc = 0xbfc00478
[1732000 ns] Test is running, debug_wb_pc = 0xbfc7a72c
----[1733125 ns] Number 8'd81 Functional Test Point PASS!!!
[1742000 ns] Test is running, debug_wb_pc = 0xbfc004c4
----[1748415 ns] Number 8'd82 Functional Test Point PASS!!!
[1752000 ns] Test is running, debug_wb_pc = 0xbfc0048c
[1762000 ns] Test is running, debug_wb_pc = 0xbfc005ac
----[1763705 ns] Number 8'd83 Functional Test Point PASS!!!
[1772000 ns] Test is running, debug_wb_pc = 0xbfc88290
----[1779005 ns] Number 8'd84 Functional Test Point PASS!!!
[1782000 ns] Test is running, debug_wb_pc = 0xbfc00484
[1792000 ns] Test is running, debug_wb_pc = 0xbfc00688
----[1794315 ns] Number 8'd85 Functional Test Point PASS!!!
[1802000 ns] Test is running, debug_wb_pc = 0xbfc289b8
----[1809615 ns] Number 8'd86 Functional Test Point PASS!!!
[1812000 ns] Test is running, debug_wb_pc = 0xbfc00458
[1822000 ns] Test is running, debug_wb_pc = 0xbfc006a0
----[1824915 ns] Number 8'd87 Functional Test Point PASS!!!
[1832000 ns] Test is running, debug_wb_pc = 0xbfc00384
----[1840215 ns] Number 8'd88 Functional Test Point PASS!!!
[1842000 ns] Test is running, debug_wb_pc = 0xbfc0044c
[1852000 ns] Test is running, debug_wb_pc = 0xbfc006b4
----[1855515 ns] Number 8'd89 Functional Test Point PASS!!!
==============================================================
gettrace end!
----Succeed in generating trace file!
$finish called at time : 1856145 ns : File "D:/nscscc-group/func_test_v0.01/cpu132_gettrace/testbench/tb_top.v" Line 221
run: Time (s): cpu = 00:01:32 ; elapsed = 00:03:02 . Memory (MB): peak = 1279.668 ; gain = 9.594
golden_trace.txt也自動更新了。
這里省略第二種驗證方法,懶得看仿真波形了。文章來源:http://www.zghlxwxcb.cn/news/detail-520722.html
上板驗證(89個功能點測試)
測試了一下我的爛筆記本電腦和移動硬盤以及爛擴展塢都是沒有問題的,龍芯的實驗板子也沒有問題。這篇里面測試的是龍芯發(fā)布包里面的完整且正確的代碼。
這里就先測一下89個功能測試,記憶力測試什么的,下一個再寫。。文章來源地址http://www.zghlxwxcb.cn/news/detail-520722.html
到了這里,關(guān)于【CPU設(shè)計實戰(zhàn)】簡單流水線CPU設(shè)計的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!