首页 星云 工具 资源 星选 资讯 热门工具
:

PDF转图片 完全免费 小红书视频下载 无水印 抖音视频下载 无水印 数字星空

物联网开发习题集,c,c++

前端 111.5KB 11 需要积分: 1
立即下载

资源介绍:

物联网开发习题集,c,c++ 【项目资源】:包含前端、后端、移动开发、操作系统、人工智能、物联网、信息化管理、数据库、硬件开发、大数据、课程资源、音视频、网站开发等各种技术项目的源码。包括STM32、ESP8266、PHP、QT、Linux、iOS、C++、Java、python、web、C#、EDA、proteus、RTOS等项目的源码。 【项目质量】:所有源码都经过严格测试,可以直接运行。功能在确认正常工作后才上传。 【适用人群】:适用于希望学习不同技术领域的小白或进阶学习者。可作为毕设项目、课程设计、大作业、工程实训或初期项目立项。 【附加价值】:项目具有较高的学习借鉴价值,也可直接拿来修改复刻。对于有一定基础或热衷于研究的人来说,可以在这些基础代码上进行修改和扩展,实现其他功能。 【沟通交流】:有任何使用上的问题,欢迎随时与博主沟通,博主会及时解答。鼓励下载和使用,并欢迎大家互相学习,共同进步。
Computer Architecture 2022-23
Assessed Exercise 2
Processor Circuit
Introduction
The purpose of this exercise is to learn in detail how a processor works: how a
digital circuit can execute instructions and run programs. The exercise requires
you to understand a working circuit called M1 that implements the Sigma16
architecture, and then to work out how to modify it.
Part 1. Implementing a new instruction: loadxi
Add a new instruction loadxi to the M1 circuit for the Sigma16 architecture.
Modify the datapath and control, as needed, in order to implement the new
instruction in the M1 circuit, and modify the simulation driver so the operation
of the instruction can be observed. Demonstrate the execution of the instruction
using a machine language test program.
The new instruction is load with automatic index increment (the loadxi
instruction). Its format is RX: there are two words; the first word has a 4-bit
opcode f, a 4-bit destination register (the d field), a 4-bit index register (the sa
field), and a 4-bit secondary opcode of f (the sb field). As with all RX instruc-
tions, the second word is a 16-bit constant called the displacement. In assembly
language the instruction is written, for example, as loadxi R1,$12ab[R2].
The effect of executing the instruction is to perform a load, and also to incre-
ment the index register automatically. The effective address is calculated using
the old value of the index register (i.e. the value before it was incremented).
Thus the instruction loadxi R1,$12ab[R2] performs R1 := mem[12ab+R2], R2
:= R2+1.
(Historical note: many real computers have this instruction. The idea is
that computers spend a lot of time iterating over arrays, and in each iteration
you need to load x[i] into a register and also increment i. The loadxi instruction
lets you do this work in one instruction rather than two.)
Test your new instruction using a machine language program that calculates
the sum of the elements of an array X, which contains n elements (this program
is one of the unassessed exercises, and you may use the model solution). To
do this, start with a program that simply calculates the sum using an ordinary
iteration, with an index i that goes from 0 to n 1. Then change the program
by replacing the load instruction for x[i] by a loadxi instruction, and getting rid
of the explicit add instruction to increment i. Run the modified program on the
circuit, and verify that it gets the correct result.
If you simply remove the add instruction that increments i from the model
solution, the subsequent memory addresses will shift down, which is inconvenient
for comparing the execution of the two versions of the program. Instead of
deleting the instruction, just replace it with something like add R0,R0,R0 which
won’t do anything and will leave all the instructions and data values with the
same address as before.
1
Part 2. Implementing logic instructions
The M1 circuit implements several RRR instructions, but it leaves the RRR
instructions with opcodes 5, 6, 7, 8 as unimplemented. Modify M1 to implement
the following new RRR instructions. These are “bitwise logic” instructions: bit
i in the result depends on bit i in the operands.
inv R1,R2. Opcode 5. Meaning is R1 := inv R2
and R1,R2,R3. Opcode 6. Meaning is R1 := R2 AND R3.
or R1,R2,R3. Opcode 7. Meaning is R1 := R2 OR R3.
xor R1,R2,R3. Opcode 8. Meaning is R1 := R2 XOR R3.
Note that you are implementing these machine language instructions in the
M1 circuit, but the assembler in the Sigma16 emulator doesn’t know about them.
You can generate these new instructions in an assembly language program by
writing out the machine language in a data statement. For example:
data $5120 ; inv R1,R2
data $83c5 ; xor R3,R12,R5
Remember that the M1 circuit implements only the Core Sigma16 instruc-
tion set, but the full Sigma16 has additional instructions, including some logic
instructions which are different from the ones described here. Warning: do not
use Sigma16 logic instructions in your test program!
Here is a test program TestLogic.asm.txt for your modified circuit:
; Test the new logic instructions for Assessed Exercise
; Test data
lea R1,$0003[R0] ; R1 := 0003
lea R2,$0005[R0] ; R2 := 0005
; Logic instructions
data $5312 ; inv R3,R1 R3 := fffc
data $6412 ; and R4,R1,R2 R4 := 0001
data $7512 ; or R5,R1,R2 R5 := 0007
data $8612 ; xor R6,R1,R2 R6 := 0006
trap R0,R0,R0 ; terminate
; Expected results (use regs command after running circuit)
; R1 = 0003
; R2 = 0005
; R3 = fffc
; R4 = 0001
; R5 = 0007
; R6 = 0006
Here is the object code TestLogic.obj.txt:
2

资源文件列表:

CA_22-23_exercise2.zip 大约有1个文件
  1. CA_22-23_exercise2.pdf 112.98KB
0评论
提交 加载更多评论
其他资源 alibabacloud-oss-cpp-sdk mingw编译版
鑫通态alibabacloud-oss-cpp-sdk mingw64编译版,使用eclipse cdt的ide进行编译,含libcurl, libssl, libcrypto.
国外外企笔试面试题-例题
外企笔试面试题-例题 【项目资源】:包含前端、后端、移动开发、操作系统、人工智能、物联网、信息化管理、数据库、硬件开发、大数据、课程资源、音视频、网站开发等各种技术项目的源码。包括STM32、ESP8266、PHP、QT、Linux、iOS、C++、Java、python、web、C#、EDA、proteus、RTOS等项目的源码。 【项目质量】:所有源码都经过严格测试,可以直接运行。功能在确认正常工作后才上传。 【适用人群】:适用于希望学习不同技术领域的小白或进阶学习者。可作为毕设项目、课程设计、大作业、工程实训或初期项目立项。 【附加价值】:项目具有较高的学习借鉴价值,也可直接拿来修改复刻。对于有一定基础或热衷于研究的人来说,可以在这些基础代码上进行修改和扩展,实现其他功能。 【沟通交流】:有任何使用上的问题,欢迎随时与博主沟通,博主会及时解答。鼓励下载和使用,并欢迎大家互相学习,共同进步。
国外外企笔试面试题-例题 国外外企笔试面试题-例题 国外外企笔试面试题-例题
课程设文档,C,C++,java
课程设文档,C,C++,java 【项目资源】:包含前端、后端、移动开发、操作系统、人工智能、物联网、信息化管理、数据库、硬件开发、大数据、课程资源、音视频、网站开发等各种技术项目的源码。包括STM32、ESP8266、PHP、QT、Linux、iOS、C++、Java、python、web、C#、EDA、proteus、RTOS等项目的源码。 【项目质量】:所有源码都经过严格测试,可以直接运行。功能在确认正常工作后才上传。 【适用人群】:适用于希望学习不同技术领域的小白或进阶学习者。可作为毕设项目、课程设计、大作业、工程实训或初期项目立项。 【附加价值】:项目具有较高的学习借鉴价值,也可直接拿来修改复刻。对于有一定基础或热衷于研究的人来说,可以在这些基础代码上进行修改和扩展,实现其他功能。 【沟通交流】:有任何使用上的问题,欢迎随时与博主沟通,博主会及时解答。鼓励下载和使用,并欢迎大家互相学习,共同进步。
课程设文档,C,C++,java 课程设文档,C,C++,java 课程设文档,C,C++,java
帝国CMS7.5后台模板美化版GBK+UTF.zip
帝国CMS7.5响应式后台美化模板 支持GBK+UTF 1、支持帝国CMS7.5版本,GBK、UTF编码 2、采用ZUI前端框架开发 3、响应式布局,兼容多终端分辨率,包含:19201080,1400900,1366768,1024768,10241366,7681024,414736,375667等分辨率 4、兼容桌面浏览器: IE 8+ Opera 12+ Firefox 8+ Safari 6+ Chrome 20+ , 兼容移动浏览器 IOS 6+ Safari Chrome for Android 4+ Chrome for iOS Windows 10 Mobile Edage 5、增加多个便捷功能:后台样式切换、全屏预览模式、小屏预览模板、临时锁屏、标签页功能
帝国CMS7.5后台模板美化版GBK+UTF.zip
人脸识别毕设,python
人脸识别毕设 【项目资源】:包含前端、后端、移动开发、操作系统、人工智能、物联网、信息化管理、数据库、硬件开发、大数据、课程资源、音视频、网站开发等各种技术项目的源码。包括STM32、ESP8266、PHP、QT、Linux、iOS、C++、Java、python、web、C#、EDA、proteus、RTOS等项目的源码。 【项目质量】:所有源码都经过严格测试,可以直接运行。功能在确认正常工作后才上传。 【适用人群】:适用于希望学习不同技术领域的小白或进阶学习者。可作为毕设项目、课程设计、大作业、工程实训或初期项目立项。 【附加价值】:项目具有较高的学习借鉴价值,也可直接拿来修改复刻。对于有一定基础或热衷于研究的人来说,可以在这些基础代码上进行修改和扩展,实现其他功能。 【沟通交流】:有任何使用上的问题,欢迎随时与博主沟通,博主会及时解答。鼓励下载和使用,并欢迎大家互相学习,共同进步。
故障处理说明书 zishubuding
故障处理说明书 【项目资源】:包含前端、后端、移动开发、操作系统、人工智能、物联网、信息化管理、数据库、硬件开发、大数据、课程资源、音视频、网站开发等各种技术项目的源码。包括STM32、ESP8266、PHP、QT、Linux、iOS、C++、Java、python、web、C#、EDA、proteus、RTOS等项目的源码。 【项目质量】:所有源码都经过严格测试,可以直接运行。功能在确认正常工作后才上传。 【适用人群】:适用于希望学习不同技术领域的小白或进阶学习者。可作为毕设项目、课程设计、大作业、工程实训或初期项目立项。 【附加价值】:项目具有较高的学习借鉴价值,也可直接拿来修改复刻。对于有一定基础或热衷于研究的人来说,可以在这些基础代码上进行修改和扩展,实现其他功能。 【沟通交流】:有任何使用上的问题,欢迎随时与博主沟通,博主会及时解答。鼓励下载和使用,并欢迎大家互相学习,共同进步。
基于web3和cnn的新闻分析系统
基于web3和cnn的新闻分析系统 【项目资源】:包含前端、后端、移动开发、操作系统、人工智能、物联网、信息化管理、数据库、硬件开发、大数据、课程资源、音视频、网站开发等各种技术项目的源码。包括STM32、ESP8266、PHP、QT、Linux、iOS、C++、Java、python、web、C#、EDA、proteus、RTOS等项目的源码。 【项目质量】:所有源码都经过严格测试,可以直接运行。功能在确认正常工作后才上传。 【适用人群】:适用于希望学习不同技术领域的小白或进阶学习者。可作为毕设项目、课程设计、大作业、工程实训或初期项目立项。 【附加价值】:项目具有较高的学习借鉴价值,也可直接拿来修改复刻。对于有一定基础或热衷于研究的人来说,可以在这些基础代码上进行修改和扩展,实现其他功能。 【沟通交流】:有任何使用上的问题,欢迎随时与博主沟通,博主会及时解答。鼓励下载和使用,并欢迎大家互相学习,共同进步。
一款摩尔斯电码发报练习软件Lakey
乳山市业余无线电知识库文件 ////此处仅为软件备份,软件相关权益归原作者所有//// Lakey是一款摩尔斯电码发报练习软件,具有摩尔斯电码解析、音频频谱分析、摩尔斯电码听抄练习、可进行多主机网络通联练习或试验等特点。 主要特性: 1、利用键盘或鼠标进行摩尔斯电码发报练习,支持键盘直接录入,支持手键和自动键方式; 2、摩尔斯电码听抄练习,可以将听抄音频转换为WAV文件,用于通过手机或其他移动设备进行听抄练习; 3、摩尔斯电码解析,可以用做发报练习参考; 4、音频频谱分析,可以对电脑音频模拟输入(Line in、Aux in或Mic in等)进行音频分析并显示; 5、发报键状态可以输出到计算机I/O接口,对外围设备进行简单控制; 6、可进行多主机网络通联练习或试验。