This commit is contained in:
2025-11-06 10:44:25 +08:00
parent 949396519e
commit 40ddda13c4
25 changed files with 66164 additions and 74 deletions

View File

@@ -3,7 +3,7 @@
<!--The data in this file is primarily intended for consumption by Xilinx tools.
The structure and the elements are likely to change over the next few releases.
This means code written to parse this file will need to be revisited each subsequent release.-->
<application name="pa" timeStamp="Wed Jun 18 12:07:36 2025">
<application name="pa" timeStamp="Fri Jun 20 17:48:38 2025">
<section name="Project Information" visible="false">
<property name="ProjectID" value="bf8c3145fb1f463a9279744865a6650a" type="ProjectID"/>
<property name="ProjectIteration" value="1" type="ProjectIteration"/>
@@ -17,81 +17,93 @@ This means code written to parse this file will need to be revisited each subseq
<property name="ImplStrategy" value="Vivado Implementation Defaults" type="ImplStrategy"/>
</item>
<item name="Java Command Handlers">
<property name="AddSources" value="2" type="JavaHandler"/>
<property name="AddSources" value="4" type="JavaHandler"/>
<property name="EditDelete" value="1" type="JavaHandler"/>
<property name="NewProject" value="1" type="JavaHandler"/>
<property name="OpenProject" value="2" type="JavaHandler"/>
<property name="RunSchematic" value="6" type="JavaHandler"/>
<property name="SetTopNode" value="1" type="JavaHandler"/>
<property name="ShowSource" value="1" type="JavaHandler"/>
<property name="SimulationRun" value="7" type="JavaHandler"/>
<property name="RunSchematic" value="29" type="JavaHandler"/>
<property name="SetTopNode" value="3" type="JavaHandler"/>
<property name="ShowSource" value="4" type="JavaHandler"/>
<property name="SimulationRun" value="8" type="JavaHandler"/>
<property name="ToolsSettings" value="1" type="JavaHandler"/>
<property name="ViewTaskRTLAnalysis" value="2" type="JavaHandler"/>
<property name="ZoomFit" value="7" type="JavaHandler"/>
<property name="ZoomIn" value="13" type="JavaHandler"/>
<property name="ZoomOut" value="24" type="JavaHandler"/>
<property name="ViewTaskRTLAnalysis" value="3" type="JavaHandler"/>
<property name="ZoomFit" value="21" type="JavaHandler"/>
<property name="ZoomIn" value="16" type="JavaHandler"/>
<property name="ZoomOut" value="26" type="JavaHandler"/>
</item>
<item name="Gui Handlers">
<property name="AbstractCombinedPanel_REMOVE_SELECTED_ELEMENTS" value="1" type="GuiHandlerData"/>
<property name="AbstractFileView_RELOAD" value="2" type="GuiHandlerData"/>
<property name="AddSrcWizard_SPECIFY_SIMULATION_SPECIFIC_HDL_FILES" value="1" type="GuiHandlerData"/>
<property name="BaseDialog_CANCEL" value="4" type="GuiHandlerData"/>
<property name="BaseDialog_OK" value="16" type="GuiHandlerData"/>
<property name="BaseDialog_CANCEL" value="6" type="GuiHandlerData"/>
<property name="BaseDialog_OK" value="34" type="GuiHandlerData"/>
<property name="CmdMsgDialog_MESSAGES" value="1" type="GuiHandlerData"/>
<property name="CmdMsgDialog_OK" value="2" type="GuiHandlerData"/>
<property name="CmdMsgDialog_OK" value="5" type="GuiHandlerData"/>
<property name="ConfirmSaveTextEditsDialog_NO" value="1" type="GuiHandlerData"/>
<property name="CreateSrcFileDialog_FILE_NAME" value="10" type="GuiHandlerData"/>
<property name="DefaultOptionPane_CLOSE" value="1" type="GuiHandlerData"/>
<property name="FPGAChooser_FPGA_TABLE" value="1" type="GuiHandlerData"/>
<property name="FileSetPanel_FILE_SET_PANEL_TREE" value="17" type="GuiHandlerData"/>
<property name="FlowNavigatorTreePanel_FLOW_NAVIGATOR_TREE" value="16" type="GuiHandlerData"/>
<property name="FileSetPanel_FILE_SET_PANEL_TREE" value="48" type="GuiHandlerData"/>
<property name="FlowNavigatorTreePanel_FLOW_NAVIGATOR_TREE" value="28" type="GuiHandlerData"/>
<property name="GettingStartedView_CREATE_NEW_PROJECT" value="1" type="GuiHandlerData"/>
<property name="GettingStartedView_OPEN_PROJECT" value="2" type="GuiHandlerData"/>
<property name="GraphicalView_ZOOM_FIT" value="1" type="GuiHandlerData"/>
<property name="InstanceMenu_FLOORPLANNING" value="5" type="GuiHandlerData"/>
<property name="GraphicalView_ZOOM_FIT" value="3" type="GuiHandlerData"/>
<property name="InstanceMenu_FLOORPLANNING" value="27" type="GuiHandlerData"/>
<property name="MainMenuMgr_FLOORPLANNING" value="1" type="GuiHandlerData"/>
<property name="MainMenuMgr_IO_PLANNING" value="1" type="GuiHandlerData"/>
<property name="MainMenuMgr_REPORTS" value="2" type="GuiHandlerData"/>
<property name="MainMenuMgr_TOOLS" value="2" type="GuiHandlerData"/>
<property name="MainMenuMgr_WINDOW" value="4" type="GuiHandlerData"/>
<property name="MainWinMenuMgr_LAYOUT" value="2" type="GuiHandlerData"/>
<property name="NetlistSchMenuAndMouse_VIEW" value="5" type="GuiHandlerData"/>
<property name="NetlistSchMenuAndMouse_EXPAND_COLLAPSE" value="4" type="GuiHandlerData"/>
<property name="NetlistSchMenuAndMouse_VIEW" value="26" type="GuiHandlerData"/>
<property name="NetlistSchematicView_SHOW_CELLS_IN_THIS_SCHEMATIC" value="1" type="GuiHandlerData"/>
<property name="NetlistTreeView_NETLIST_TREE" value="14" type="GuiHandlerData"/>
<property name="PACommandNames_AUTO_UPDATE_HIER" value="5" type="GuiHandlerData"/>
<property name="NetlistTreeView_FLOORPLANNING" value="1" type="GuiHandlerData"/>
<property name="NetlistTreeView_NETLIST_TREE" value="64" type="GuiHandlerData"/>
<property name="PACommandNames_ADD_SOURCES" value="2" type="GuiHandlerData"/>
<property name="PACommandNames_AUTO_UPDATE_HIER" value="16" type="GuiHandlerData"/>
<property name="PACommandNames_EXPORT_SCHEMATIC" value="1" type="GuiHandlerData"/>
<property name="PACommandNames_SCHEMATIC" value="5" type="GuiHandlerData"/>
<property name="PACommandNames_SET_AS_TOP" value="4" type="GuiHandlerData"/>
<property name="PACommandNames_SIMULATION_RUN_BEHAVIORAL" value="7" type="GuiHandlerData"/>
<property name="PACommandNames_ZOOM_FIT" value="7" type="GuiHandlerData"/>
<property name="PACommandNames_ZOOM_IN" value="4" type="GuiHandlerData"/>
<property name="PACommandNames_ZOOM_OUT" value="11" type="GuiHandlerData"/>
<property name="PACommandNames_SCHEMATIC" value="22" type="GuiHandlerData"/>
<property name="PACommandNames_SET_AS_TOP" value="6" type="GuiHandlerData"/>
<property name="PACommandNames_SIMULATION_RUN_BEHAVIORAL" value="8" type="GuiHandlerData"/>
<property name="PACommandNames_ZOOM_FIT" value="21" type="GuiHandlerData"/>
<property name="PACommandNames_ZOOM_IN" value="5" type="GuiHandlerData"/>
<property name="PACommandNames_ZOOM_OUT" value="13" type="GuiHandlerData"/>
<property name="PAViews_CODE" value="2" type="GuiHandlerData"/>
<property name="PAViews_SCHEMATIC" value="2" type="GuiHandlerData"/>
<property name="PrimitivesMenu_HIGHLIGHT_LEAF_CELLS" value="10" type="GuiHandlerData"/>
<property name="PAViews_SCHEMATIC" value="10" type="GuiHandlerData"/>
<property name="PrimitivesMenu_HIGHLIGHT_LEAF_CELLS" value="34" type="GuiHandlerData"/>
<property name="ProjectNameChooser_CREATE_PROJECT_SUBDIRECTORY" value="1" type="GuiHandlerData"/>
<property name="ProjectNameChooser_PROJECT_NAME" value="1" type="GuiHandlerData"/>
<property name="ProjectTab_RELOAD" value="4" type="GuiHandlerData"/>
<property name="RDICommands_CUSTOM_COMMANDS" value="1" type="GuiHandlerData"/>
<property name="RDICommands_DELETE" value="2" type="GuiHandlerData"/>
<property name="RDICommands_SETTINGS" value="1" type="GuiHandlerData"/>
<property name="SaveSchematicDialog_ORIENTATION" value="2" type="GuiHandlerData"/>
<property name="SchMenuAndMouse_SAVE_AS_PDF_FILE" value="2" type="GuiHandlerData"/>
<property name="SelectMenu_HIGHLIGHT" value="6" type="GuiHandlerData"/>
<property name="SelectMenu_MARK" value="5" type="GuiHandlerData"/>
<property name="RemoveSourcesDialog_ALSO_DELETE" value="1" type="GuiHandlerData"/>
<property name="SaveSchematicDialog_ORIENTATION" value="10" type="GuiHandlerData"/>
<property name="SaveSchematicDialog_SPECIFY_OUTPUT_PDF_FILE" value="16" type="GuiHandlerData"/>
<property name="SchMenuAndMouse_EXPAND_CONE" value="5" type="GuiHandlerData"/>
<property name="SchMenuAndMouse_SAVE_AS_PDF_FILE" value="19" type="GuiHandlerData"/>
<property name="SchOptionsView_ATTRIBUTES_TABLE" value="4" type="GuiHandlerData"/>
<property name="SchematicView_REMOVE" value="1" type="GuiHandlerData"/>
<property name="SelectMenu_HIGHLIGHT" value="30" type="GuiHandlerData"/>
<property name="SelectMenu_MARK" value="35" type="GuiHandlerData"/>
<property name="SettingsDialog_OPTIONS_TREE" value="1" type="GuiHandlerData"/>
<property name="SettingsEditorPage_CUSTOM_EDITOR" value="1" type="GuiHandlerData"/>
<property name="SettingsEditorPage_ENTER_COMMAND_LINE_FOR_CUSTOM" value="1" type="GuiHandlerData"/>
<property name="SimulationObjectsPanel_SIMULATION_OBJECTS_TREE_TABLE" value="2" type="GuiHandlerData"/>
<property name="SrcChooserPanel_ADD_HDL_AND_NETLIST_FILES_TO_YOUR_PROJECT" value="1" type="GuiHandlerData"/>
<property name="SrcChooserPanel_ADD_HDL_AND_NETLIST_FILES_TO_YOUR_PROJECT" value="3" type="GuiHandlerData"/>
<property name="SrcChooserPanel_CREATE_FILE" value="10" type="GuiHandlerData"/>
<property name="SrcChooserTable_SRC_CHOOSER_TABLE" value="3" type="GuiHandlerData"/>
<property name="SrcMenu_IP_HIERARCHY" value="3" type="GuiHandlerData"/>
<property name="SyntheticaGettingStartedView_RECENT_PROJECTS" value="1" type="GuiHandlerData"/>
<property name="SrcMenu_IP_HIERARCHY" value="15" type="GuiHandlerData"/>
<property name="SyntheticaGettingStartedView_RECENT_PROJECTS" value="4" type="GuiHandlerData"/>
<property name="TclConsoleView_COPY" value="2" type="GuiHandlerData"/>
<property name="TclConsoleView_TCL_CONSOLE_CODE_EDITOR" value="35" type="GuiHandlerData"/>
<property name="WaveformNameTree_WAVEFORM_NAME_TREE" value="4" type="GuiHandlerData"/>
</item>
<item name="Other">
<property name="GuiMode" value="7" type="GuiMode"/>
<property name="GuiMode" value="11" type="GuiMode"/>
<property name="BatchMode" value="0" type="BatchMode"/>
<property name="TclMode" value="4" type="TclMode"/>
<property name="TclMode" value="7" type="TclMode"/>
</item>
</section>
</application>

View File

@@ -2,8 +2,8 @@
# Webtalk v2018.1 (64-bit)
# SW Build 2188600 on Wed Apr 4 18:40:38 MDT 2018
# IP Build 2185939 on Wed Apr 4 20:55:05 MDT 2018
# Start of session at: Wed Jun 18 20:13:54 2025
# Process ID: 21412
# Start of session at: Fri Jun 20 18:50:01 2025
# Process ID: 32760
# Current directory: D:/Schoolwork/ComputerComposition/LA32R/Hardware/LA32R.sim/sim_1/behav/xsim
# Command line: wbtcv.exe -mode batch -source D:/Schoolwork/ComputerComposition/LA32R/Hardware/LA32R.sim/sim_1/behav/xsim/xsim.dir/cpu_tb_snapshot/webtalk/xsim_webtalk.tcl -notrace
# Log file: D:/Schoolwork/ComputerComposition/LA32R/Hardware/LA32R.sim/sim_1/behav/xsim/webtalk.log

View File

@@ -2,8 +2,8 @@
# Webtalk v2018.1 (64-bit)
# SW Build 2188600 on Wed Apr 4 18:40:38 MDT 2018
# IP Build 2185939 on Wed Apr 4 20:55:05 MDT 2018
# Start of session at: Wed Jun 18 20:13:51 2025
# Process ID: 30320
# Start of session at: Fri Jun 20 18:49:58 2025
# Process ID: 28472
# Current directory: D:/Schoolwork/ComputerComposition/LA32R/Hardware/LA32R.sim/sim_1/behav/xsim
# Command line: wbtcv.exe -mode batch -source D:/Schoolwork/ComputerComposition/LA32R/Hardware/LA32R.sim/sim_1/behav/xsim/xsim.dir/cpu_tb_snapshot/webtalk/xsim_webtalk.tcl -notrace
# Log file: D:/Schoolwork/ComputerComposition/LA32R/Hardware/LA32R.sim/sim_1/behav/xsim/webtalk.log

View File

@@ -2,8 +2,8 @@
# xsim v2018.1 (64-bit)
# SW Build 2188600 on Wed Apr 4 18:40:38 MDT 2018
# IP Build 2185939 on Wed Apr 4 20:55:05 MDT 2018
# Start of session at: Wed Jun 18 20:13:51 2025
# Process ID: 20256
# Start of session at: Fri Jun 20 18:49:58 2025
# Process ID: 27168
# Current directory: D:/Schoolwork/ComputerComposition/LA32R/Hardware/LA32R.sim/sim_1/behav/xsim
# Command line: xsim.exe -log ..\..\..\..\..\simulation.log -mode tcl -source {xsim.dir/cpu_tb_snapshot/xsim_script.tcl}
# Log file: D:/Schoolwork/ComputerComposition/LA32R/Hardware/LA32R.sim/sim_1/behav/xsim/../../../../../simulation.log

View File

@@ -31,8 +31,6 @@
** - "program.hex" 的路径在 `instruction_memory.v` 模块中指定
*******************************************************************************/
`timescale 1ns / 1ps
module cpu_tb;
// --- 信号声明 ---
@@ -66,7 +64,7 @@ module cpu_tb;
// 2. 设定仿真运行时间后停止
// 由于测试程序末尾通常是无限循环因此需要手动设置仿真停止时间
#500; // 仿真运行500纳秒
#5000; // 仿真运行5000纳秒
// 3. 仿真结束前打印寄存器堆的最终状态
$display("\n------------------------------------------------------------");
@@ -89,13 +87,10 @@ module cpu_tb;
// 在每个时钟周期的下降沿采样并显示信息以确保在该时刻所有待显示的信号值均已稳定
always @(negedge clk) begin
if (!rst) begin //仅在非复位状态下显示
$display("时间: %0t ns | PC: 0x%08h | 指令: 0x%08h | R4=0x%h R5=0x%h R6=0x%h",
$display("时间: %0t ns | PC: 0x%08h | 指令: 0x%08h",
$time, // 当前仿真时间
uut.pc_out, // PC的当前值
uut.instr, // 当前PC指向的指令
uut.u_reg_file.registers[4], // R4寄存器的值
uut.u_reg_file.registers[5], // R5寄存器的值
uut.u_reg_file.registers[6] // R6寄存器的值
uut.instr // 当前PC指向的指令
);
end
end

View File

@@ -31,7 +31,7 @@
<Option Name="EnableBDX" Val="FALSE"/>
<Option Name="DSAVendor" Val="xilinx"/>
<Option Name="DSANumComputeUnits" Val="60"/>
<Option Name="WTXSimLaunchSim" Val="6"/>
<Option Name="WTXSimLaunchSim" Val="7"/>
<Option Name="WTModelSimLaunchSim" Val="0"/>
<Option Name="WTQuestaLaunchSim" Val="0"/>
<Option Name="WTIesLaunchSim" Val="0"/>